/* Red Flag: static site, one page per language. No external resource (fonts, scripts, statistics). */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../fonts/bricolage-grotesque.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* Same palette as the app: navy and cream of the logo, coral flag as the only accent. */
    --navy: #0f1b2d;
    --navy-deep: #0a1320;
    --navy-soft: #1b2a40;
    --coral: #ff7a5c;
    --coral-light: #ff9f86;
    --coral-dark: #d9502f;
    --sand: #e9e3d6;
    --on-navy: #f5f1e8;
    --on-navy-muted: #c7ced8;
    --bg: #f5f1e8;
    --card: #fffcf5;
    --ink: #0f1b2d;
    --muted: #44556e;
    --line: #e4ddcf;
    --ok: #1f9d6b;
    --radius: 20px;
    --shadow: 0 10px 30px rgba(15, 27, 45, 0.14);
    --font-title: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
    --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --header-h: 64px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.65;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--navy);
}

h1,
h2,
h3 {
    font-family: var(--font-title);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

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

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    background: var(--coral);
    color: var(--navy);
    padding: 10px 16px;
    border-radius: 10px;
    z-index: 100;
    font-weight: 600;
}

.skip:focus {
    top: 12px;
}

:focus-visible {
    outline: 3px solid var(--coral-dark);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- En-tête et menu ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(15, 27, 45, 0.96);
    backdrop-filter: blur(8px);
    color: var(--on-navy);
}

.site-header .container {
    width: min(1240px, 100% - 40px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--on-navy);
    text-decoration: none;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.15rem;
    white-space: nowrap;
}

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

.nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    color: var(--on-navy-muted);
    text-decoration: none;
    text-align: center;
    white-space: nowrap; /* jamais de retour à la ligne dans une entrée du menu */
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--on-navy);
}

.nav a.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: var(--on-navy);
}

.lang {
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    min-width: 46px;
    margin-left: 6px;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--on-navy);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle svg {
    width: 26px;
    height: 26px;
}

@media (max-width: 1180px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 20px 20px;
        background: var(--navy);
        box-shadow: 0 16px 24px rgba(0, 0, 0, 0.25);
        display: none;
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        justify-content: center;
        min-height: 48px;
        font-size: 1.05rem;
    }

    .lang {
        margin: 6px 0 0;
        text-align: center;
    }
}

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

section {
    padding: clamp(56px, 9vw, 104px) 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--sand);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 62ch;
}

/* Héros */

.hero {
    background: var(--navy);
    color: var(--on-navy);
    padding-block: clamp(48px, 8vw, 96px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    right: -140px;
    top: -140px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: var(--navy-soft);
}

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

.hero h1 {
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    font-weight: 800;
}

.hero h1 em {
    font-style: normal;
    color: var(--coral);
}

.hero p {
    color: var(--on-navy-muted);
    font-size: 1.2rem;
    max-width: 52ch;
}

.hero .eyebrow {
    background: rgba(255, 255, 255, 0.12);
    color: var(--coral-light);
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-text);
}

.btn-primary {
    background: var(--coral);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--coral-light);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--on-navy);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-dark {
    background: var(--navy);
    color: var(--on-navy);
}

.btn-dark:hover {
    background: var(--navy-soft);
}

.hero-phone {
    justify-self: center;
}

@media (max-width: 860px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-phone {
        order: -1;
    }

    .hero-phone .phone {
        width: min(250px, 62vw);
    }
}

/* Cadre de téléphone autour des captures */

.phone {
    width: min(300px, 100%);
    background: var(--navy-deep);
    border-radius: 38px;
    padding: 9px;
    box-shadow: var(--shadow);
}

.phone img {
    display: block;
    width: 100%;
    border-radius: 30px;
}

/* Principes */

.pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 36px;
}

.pillar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 26px 22px;
    border: 1px solid var(--line);
}

.pillar .icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--sand);
    color: var(--navy);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.pillar .icon svg {
    width: 26px;
    height: 26px;
}

.pillar h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.pillar p {
    color: var(--muted);
    font-size: 0.98rem;
    margin: 0;
}

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

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

/* Étapes */

.alt {
    background: var(--card);
}

.steps {
    display: grid;
    gap: clamp(36px, 6vw, 72px);
    margin-top: 44px;
}

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

.step:nth-child(even) .step-text {
    order: 2;
}

.step-number {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 4rem;
    line-height: 1;
    color: var(--coral-dark);
}

.step-media {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.step-media .phone {
    width: min(250px, 44%);
    min-width: 170px;
}

@media (max-width: 800px) {
    .step {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .step:nth-child(even) .step-text {
        order: 0;
    }
}

/* Galerie */

.gallery {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 8px 4px 26px;
    margin-top: 32px;
    scroll-snap-type: x mandatory;
}

.gallery figure {
    margin: 0;
    flex: 0 0 auto;
    width: 240px;
    scroll-snap-align: start;
    text-align: center;
}

.gallery figcaption {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--muted);
}

.gallery .phone {
    width: 100%;
}

/* FAQ : <details> imbriqués, sans JavaScript */

.faq {
    margin-top: 32px;
    display: grid;
    gap: 14px;
}

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

/* On the light section, the FAQ cards take the page color to stay visible. */
.alt .faq details {
    background: var(--bg);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

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

.faq summary::after {
    content: "";
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--muted);
    border-bottom: 2.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-right: 4px;
}

.faq details[open] > summary::after {
    transform: rotate(-135deg);
}

.faq .theme > summary {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 800;
}

.faq .theme > summary small {
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--muted);
    margin-left: 10px;
}

.faq .questions {
    padding: 0 22px 8px;
}

.faq .question {
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
    border-radius: 0;
    background: none;
}

.faq .question > summary {
    padding: 16px 0;
    font-weight: 600;
}

.faq .answer {
    padding: 0 0 8px;
    color: var(--muted);
}

/* Confidentialité */

.privacy .card {
    background: var(--card);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid var(--line);
    max-width: 820px;
    margin-top: 28px;
}

.privacy h3 {
    margin-top: 1.4em;
}

.privacy h3:first-child {
    margin-top: 0;
}

.privacy ul {
    padding-left: 1.2em;
    margin: 0 0 1em;
}

.privacy .updated {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Téléchargement */

.download {
    background: var(--navy);
    color: var(--on-navy);
}

.download h2 {
    color: var(--on-navy);
}

.download p {
    color: var(--on-navy-muted);
    max-width: 60ch;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--coral-light);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 800px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

form {
    background: var(--card);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--line);
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.97rem;
}

input,
textarea {
    font: inherit;
    padding: 12px 14px;
    border: 1.5px solid #cdc4b0;
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    width: 100%;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--navy);
    outline: 3px solid rgba(255, 122, 92, 0.45);
    outline-offset: 0;
}

.form-note {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

/* Pied de page */

.site-footer {
    background: var(--navy-deep);
    color: var(--on-navy-muted);
    padding: 36px 0;
    font-size: 0.95rem;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    justify-content: space-between;
}

.site-footer a {
    color: var(--on-navy-muted);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .faq summary::after {
        transition: none;
    }
}

/* Screenshot viewer (slideshow) */

.phone.is-zoomable {
    cursor: zoom-in;
    transition: transform 0.15s ease;
}

.phone.is-zoomable:hover {
    transform: translateY(-3px);
}

body.viewer-open {
    overflow: hidden;
}

.viewer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: rgba(10, 19, 32, 0.97);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--on-navy);
}

.viewer[hidden] {
    display: none;
}

.viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 0.95rem;
}

.viewer-tools {
    display: flex;
    gap: 8px;
}

.viewer-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
}

.viewer-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.viewer-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 16px 16px;
}

.viewer-nav {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
}

.viewer-figure {
    margin: 0;
    min-width: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.viewer-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 170px);
    max-height: calc(100dvh - 170px);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.viewer-figure figcaption {
    min-height: 1.4em;
    font-size: 1rem;
    color: var(--on-navy-muted);
}

@media (max-width: 640px) {
    .viewer-stage {
        gap: 0;
        padding: 0 8px 12px;
        position: relative;
    }

    .viewer-nav {
        position: absolute;
        bottom: 12px;
        width: 44px;
        height: 44px;
    }

    .viewer-prev {
        left: 12px;
    }

    .viewer-next {
        right: 12px;
    }

    .viewer-figure img {
        max-height: calc(100vh - 190px);
        max-height: calc(100dvh - 190px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .phone.is-zoomable {
        transition: none;
    }
}
