/* ==========================================================================
   MDZ — landing page de démonstration
   Feuille de style autonome (aucune dépendance externe).
   ========================================================================== */

:root {
    --green: #006233;
    --green-dark: #004626;
    --green-soft: #e6f1ea;
    --gold: #c9a227;
    --ink: #0f1f17;
    --muted: #5b6b62;
    --line: #e3e8e4;
    --bg: #f4f5f7;
    --card: #ffffff;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 18px 45px rgba(15, 31, 23, 0.08);
    --shadow-sm: 0 8px 20px rgba(15, 31, 23, 0.06);
    --container: 1160px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p {
    margin: 0;
}

h1, h2, h3 {
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 100;
    background: var(--green);
    color: #fff;
    padding: 12px 18px;
    border-radius: 0 0 12px 0;
}

.skip-link:focus {
    inset-inline-start: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(244, 245, 247, 0.82);
    border-bottom: 1px solid rgba(227, 232, 228, 0.9);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.brand small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
}

.header-nav a {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.15s ease, background 0.15s ease;
}

.header-nav a:hover {
    color: var(--ink);
    background: #fff;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.lang-switch a {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.lang-switch a[aria-current="true"] {
    background: var(--green);
    color: #fff;
}

.header-cta {
    display: inline-flex;
}

@media (max-width: 960px) {
    .header-nav {
        display: none;
    }

    .header-cta {
        margin-inline-start: auto;
    }

    .site-header .container {
        height: 64px;
        gap: 12px;
    }
}

/* Sur téléphone, l'en-tête doit garder les mêmes marges que le contenu :
   on compacte la marque et le sélecteur de langue au lieu de laisser le
   bouton de téléchargement déborder. */
@media (max-width: 640px) {
    .site-header .container {
        height: 60px;
        gap: 8px;
    }

    .brand {
        gap: 8px;
        font-size: 18px;
    }

    .brand img {
        width: 32px;
        height: 32px;
    }

    .brand small {
        display: none;
    }

    .lang-switch {
        padding: 2px;
    }

    .lang-switch a {
        padding: 3px 6px;
        font-size: 11px;
    }

    .header-cta {
        gap: 8px;
        padding-inline: 10px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .header-cta-label {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 98, 51, 0.24);
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: #c8d2cb;
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 10px;
}

.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.btn .icon {
    width: 18px;
    height: 18px;
    flex: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding: 72px 0 56px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto auto;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle at center, rgba(0, 98, 51, 0.12), transparent 62%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.hero h1 {
    margin-top: 22px;
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 800;
}

.hero-sub {
    margin-top: 20px;
    max-width: 560px;
    font-size: 18px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 26px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-meta svg {
    width: 15px;
    height: 15px;
    color: var(--green);
}

/* Téléphones */

.phones {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    min-height: 520px;
}

.phone {
    width: 30%;
    max-width: 176px;
    border: 7px solid #101b15;
    border-radius: 26px;
    overflow: hidden;
    background: #101b15;
    box-shadow: 0 30px 60px rgba(15, 31, 23, 0.22);
    transform: rotate(-5deg) translateY(14px);
}

.phone img {
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.phone--main {
    width: 38%;
    max-width: 220px;
    z-index: 2;
    transform: translateY(-6px);
}

.phone--last {
    transform: rotate(5deg) translateY(14px);
}

@media (max-width: 900px) {
    .hero {
        padding-top: 44px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-sub {
        font-size: 16px;
    }

    .phones {
        min-height: 0;
        margin-top: 8px;
    }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
    padding: 68px 0;
}

.section--tint {
    background: #fff;
    border-block: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin-bottom: 36px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
}

.section-head p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Fonctionnalités
   -------------------------------------------------------------------------- */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature {
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green-dark);
}

.feature-icon svg {
    width: 21px;
    height: 21px;
}

.feature h3 {
    font-size: 17px;
    font-weight: 800;
}

.feature p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 900px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Galerie
   -------------------------------------------------------------------------- */

.gallery {
    display: flex;
    gap: 18px;
    padding: 6px 4px 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.gallery figure {
    flex: 0 0 228px;
    margin: 0;
    scroll-snap-align: start;
}

.gallery img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.gallery figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Installation
   -------------------------------------------------------------------------- */

.install-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
}

.steps {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.step-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}

.step h3 {
    font-size: 16px;
    font-weight: 800;
}

.step p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.install-card {
    position: sticky;
    top: 96px;
    padding: 26px;
    background: var(--ink);
    color: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.install-card h3 {
    font-size: 18px;
    font-weight: 800;
}

.install-card p {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

.install-card .btn {
    width: 100%;
    margin-top: 16px;
}

.install-card .qr {
    display: grid;
    place-items: center;
    margin-top: 20px;
    padding: 14px;
    background: #fff;
    border-radius: 16px;
}

.install-card .qr canvas,
.install-card .qr img {
    width: 190px;
    height: 190px;
}

.install-note {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
}

.install-warn {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.86);
}

.install-warn strong {
    color: #fff;
}

@media (max-width: 900px) {
    .install-grid {
        grid-template-columns: 1fr;
    }

    .install-card {
        position: static;
    }

    .install-card .qr {
        justify-self: center;
        padding: 10px;
    }
}

/* --------------------------------------------------------------------------
   Comptes
   -------------------------------------------------------------------------- */

.accounts-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.accounts-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}

.accounts-table th,
.accounts-table td {
    padding: 15px 18px;
    text-align: start;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
}

.accounts-table thead th {
    background: #f8faf8;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.accounts-table tbody tr:last-child td {
    border-bottom: 0;
}

.accounts-table tbody tr:hover {
    background: #fbfcfb;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--ink);
}

.role-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.who {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

code.cred {
    padding: 4px 9px;
    border-radius: 8px;
    background: #f2f5f3;
    color: var(--ink);
    font-family: "SFMono-Regular", ui-monospace, Consolas, monospace;
    font-size: 13px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
    color: var(--green);
    border-color: #b9d3c2;
}

.copy-btn svg {
    width: 13px;
    height: 13px;
}

.copy-btn.is-copied {
    color: var(--green);
    border-color: var(--green);
}

/* --------------------------------------------------------------------------
   Back-office
   -------------------------------------------------------------------------- */

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
}

.admin-shots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-shots img {
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    background: #fff;
}

.admin-shots img:first-child {
    grid-column: 1 / -1;
}

.admin-copy h2 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
}

.admin-copy p {
    margin-top: 14px;
    color: var(--muted);
}

.admin-copy .btn {
    margin-top: 22px;
}

.admin-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12.5px;
}

.admin-note svg {
    width: 15px;
    height: 15px;
    color: var(--green);
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Vidéo
   -------------------------------------------------------------------------- */

.video-wrap {
    display: flex;
    justify-content: center;
}

.video-frame {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 9 / 16;
    border-radius: 24px;
    overflow: hidden;
    background: #0b130e;
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-poster {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(6, 20, 13, 0.15), rgba(6, 20, 13, 0.7));
}

.video-poster[hidden] {
    display: none;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.play-btn svg {
    width: 16px;
    height: 16px;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
    display: grid;
    gap: 10px;
    max-width: 860px;
}

.faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 20px;
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    padding: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
    max-width: 70ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    padding: 40px 0 34px;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer .brand {
    color: #fff;
}

.site-footer .brand small {
    color: rgba(255, 255, 255, 0.55);
}

.site-footer p {
    font-size: 13px;
}

.site-footer a:hover {
    color: #fff;
}

.footer-note {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Porte d'entrée back-office
   -------------------------------------------------------------------------- */

.gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 10%, rgba(0, 98, 51, 0.14), transparent 45%),
        var(--bg);
}

.gate-card {
    width: min(100%, 420px);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.gate-card .brand {
    margin-bottom: 22px;
}

.gate-card h1 {
    font-size: 24px;
    font-weight: 800;
}

.gate-card > p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.field {
    margin-top: 22px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfb;
    font-family: inherit;
    font-size: 15px;
}

.field input:focus {
    outline: 2px solid rgba(0, 98, 51, 0.35);
    border-color: var(--green);
    background: #fff;
}

.field-error {
    margin-top: 8px;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
}

.gate-card .btn {
    width: 100%;
    margin-top: 18px;
}

.gate-back {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.gate-back:hover {
    color: var(--green);
}

.gate-hint {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   RTL
   -------------------------------------------------------------------------- */

[dir="rtl"] .hero::before {
    inset: -30% auto auto -10%;
}

[dir="rtl"] .phone {
    transform: rotate(5deg) translateY(14px);
}

[dir="rtl"] .phone--main {
    transform: translateY(-6px);
}

[dir="rtl"] .phone--last {
    transform: rotate(-5deg) translateY(14px);
}

[dir="rtl"] .faq summary::after {
    order: -1;
}

[dir="rtl"] .brand small {
    letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */

@media print {
    .site-header,
    .hero-actions,
    .install-card,
    .video-wrap,
    .site-footer .btn {
        display: none !important;
    }

    body {
        background: #fff;
    }
}
