/* ==========================================================================
   EducGest — Landing « Cahier & Bulletin »
   Fond de cahier Seyès, encre indigo, annotations au stylo rouge.
   ========================================================================== */

:root {
    --ink: #2b2f9e;
    --ink-hover: #22268a;
    --ink-deep: #141a45;
    --text: #18204d;
    --text-muted: #3a4170;
    --text-soft: #5d6491;
    --paper: #fbfcff;
    --surface: #ffffff;
    --surface-alt: #f3f5fc;
    --line: #dfe5f5;
    --line-strong: #c9d1ee;
    --margin-red: #e07a7a;
    --pen: #c0392b;
    --paid: #0b6b45;
    --paid-bg: #dcf5ea;
    --on-dark: #eef0ff;
    --on-dark-muted: #c3c8ee;

    --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
    --font-hand: 'Caveat', 'Segoe Print', cursive;

    --container: 1200px;
    --gutter: 24px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-paper: 0 24px 48px -24px rgba(20, 26, 69, 0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

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

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

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

a:hover {
    color: var(--ink-hover);
}

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink-deep);
    text-wrap: balance;
    margin: 0;
}

p {
    margin: 0;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pen);
}

.hand {
    font-family: var(--font-hand);
    font-weight: 700;
    color: var(--pen);
}

.section {
    padding-block: 96px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    margin-bottom: 48px;
}

.section-head h2 {
    font-weight: 800;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.section-head p {
    font-size: 18px;
    color: var(--text-muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}

.btn i {
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn:hover i.bi-arrow-right {
    transform: translateX(4px);
}

.btn:active {
    transform: scale(0.98);
}

.btn-ink:hover {
    box-shadow: 0 10px 22px -10px rgba(43, 47, 158, 0.7);
}

.btn-ink {
    background: var(--ink);
    color: #ffffff;
}

.btn-ink:hover {
    background: var(--ink-hover);
    color: #ffffff;
}

.btn-paper {
    background: var(--surface);
    color: var(--ink-deep);
    border-color: var(--line-strong);
}

.btn-paper:hover {
    border-color: var(--ink);
    color: var(--ink-deep);
}

.btn-light {
    background: #ffffff;
    color: var(--ink-deep);
}

.btn-light:hover {
    background: var(--surface-alt);
    color: var(--ink-deep);
}

.btn-lg {
    min-height: 56px;
    padding: 16px 26px;
    font-size: 17px;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 252, 255, 0.94);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 10px 24px -20px rgba(20, 26, 69, 0.45);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink-deep);
}

.logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
}

.main-nav a:hover {
    color: var(--ink);
}

.nav-new {
    margin-left: 4px;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 17px;
    color: var(--pen);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions .btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
}

.link-login {
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    padding: 10px 12px;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    margin-right: 6px;
}

.lang-switcher a {
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-soft);
    padding: 6px 8px;
    border-radius: 6px;
}

.lang-switcher a[aria-current="true"] {
    color: var(--ink);
    background: var(--surface-alt);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-deep);
    font-size: 22px;
    cursor: pointer;
}

.mobile-auth {
    display: none;
}

/* ---------- Hero (page de cahier) ---------- */

.hero {
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent 0 56px, var(--margin-red) 56px 58px, transparent 58px),
        repeating-linear-gradient(180deg, rgba(60, 90, 200, 0.18) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(180deg, rgba(60, 90, 200, 0.07) 0 1px, transparent 1px 8px),
        repeating-linear-gradient(90deg, rgba(60, 90, 200, 0.06) 0 1px, transparent 1px 32px);
    border-block: 1px solid var(--line);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    padding-block: 72px 96px;
    padding-left: 80px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(38px, 5.2vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.hero-lead {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 36em;
}

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

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-soft);
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-trust li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-trust i {
    color: var(--paid);
}

.hero-visual {
    position: relative;
    padding: 12px 0 56px;
}

.report-card {
    background: var(--surface);
    border: 1px solid #d4daf0;
    border-radius: 6px;
    box-shadow: var(--shadow-paper);
    transform: rotate(-1.2deg);
}

.report-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 2px solid var(--ink-deep);
}

.report-head small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.report-head strong {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--ink-deep);
}

.report-school {
    font-size: 12px;
    color: var(--text-soft);
    text-align: right;
}

.report-table-wrap {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.report-table th {
    padding: 10px 8px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.report-table td {
    padding: 10px 8px;
    text-align: right;
    border-top: 1px solid #e6eaf6;
}

.report-table th:first-child,
.report-table td:first-child {
    text-align: left;
    padding-left: 24px;
}

.report-table th:last-child,
.report-table td:last-child {
    padding-right: 24px;
}

.report-table td.avg {
    font-weight: 600;
}

.report-table tfoot td {
    border-top: 2px solid var(--ink-deep);
    background: var(--surface-alt);
    padding-block: 14px;
    font-weight: 700;
}

.report-table tfoot td.avg {
    font-size: 18px;
    font-weight: 800;
}

.report-note {
    padding: 14px 24px 20px;
    font-size: 13px;
    color: var(--text-soft);
}

.report-annotation {
    position: absolute;
    right: 8px;
    top: -14px;
    font-size: 34px;
    transform: rotate(-6deg);
    pointer-events: none;
}

.receipt {
    position: absolute;
    left: -28px;
    bottom: 0;
    width: 270px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px dashed #9aa6d8;
    border-radius: 6px;
    box-shadow: 0 16px 32px -20px rgba(20, 26, 69, 0.4);
    transform: rotate(2deg);
}

.receipt small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.receipt strong {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    color: var(--ink-deep);
    font-variant-numeric: tabular-nums;
}

.receipt span {
    font-size: 13px;
    color: var(--text-muted);
}

.status-paid {
    align-self: flex-start;
    font-size: 12px !important;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--paid-bg);
    color: var(--paid) !important;
}

/* ---------- Bandeau paiements ---------- */

.payments-strip {
    border-bottom: 1px solid var(--line);
}

.payments-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 40px;
    padding-block: 32px;
}

.payments-inner > span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
}

.payments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: #2a3266;
}

/* ---------- Modules ---------- */

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Carte module : photo plein cadre, résumé en bas ; au survol (ou au toucher
   sur mobile), un volet encre remonte sur la photo et déroule le détail. */

.module-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    background: var(--ink-deep);
    color: #ffffff;
    isolation: isolate;
    cursor: default;
}

.module-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s;
}

.module-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 26, 69, 0) 30%, rgba(20, 26, 69, 0.55) 58%, rgba(20, 26, 69, 0.94) 100%);
}

.module-sheet {
    position: absolute;
    inset: 0;
    background: rgba(20, 26, 69, 0.93);
    transform: translateY(101%);
    transition: transform 0.55s cubic-bezier(0.65, 0, 0.25, 1);
}

.module-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.module-tag {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ffffff;
}

.module-card.is-pedago .module-tag { color: var(--ink); }
.module-card.is-finance .module-tag { color: var(--paid); }
.module-card.is-family .module-tag { color: var(--pen); }

.module-card h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.15;
}

/* Résumé et détail se replient/déplient par la hauteur (grille 0fr → 1fr). */
.module-brief,
.module-detail {
    display: grid;
    transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.25, 1), opacity 0.35s;
}

.module-brief > p,
.module-detail > ul {
    min-height: 0;
    overflow: hidden;
}

.module-brief {
    grid-template-rows: 1fr;
}

.module-brief p {
    color: #dfe2ff;
    font-size: 15px;
    line-height: 1.5;
}

.module-detail {
    grid-template-rows: 0fr;
    opacity: 0;
}

.module-detail ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
    color: #eef0ff;
}

.module-detail li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.module-detail li::before {
    content: '';
    flex: none;
    width: 14px;
    height: 2px;
    margin-top: 10px;
    background: var(--margin-red);
}

.module-toggle {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-top: 4px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.module-toggle i {
    transition: transform 0.3s;
}

/* État ouvert : survol, focus clavier, ou toggle (classe .is-open) */
.module-card.is-open .module-sheet,
.module-card:has(.module-toggle:focus-visible) .module-sheet {
    transform: translateY(0);
}

.module-card.is-open .module-media,
.module-card:has(.module-toggle:focus-visible) .module-media {
    transform: scale(1.08);
    filter: saturate(0.7);
}

.module-card.is-open .module-brief,
.module-card:has(.module-toggle:focus-visible) .module-brief {
    grid-template-rows: 0fr;
    opacity: 0;
}

.module-card.is-open .module-detail,
.module-card:has(.module-toggle:focus-visible) .module-detail {
    grid-template-rows: 1fr;
    opacity: 1;
}

.module-card.is-open .module-detail li,
.module-card:has(.module-toggle:focus-visible) .module-detail li {
    opacity: 1;
    transform: none;
}

.module-card.is-open .module-toggle i {
    transform: rotate(45deg);
}

.module-detail li:nth-child(1) { transition-delay: 0.18s; }
.module-detail li:nth-child(2) { transition-delay: 0.25s; }
.module-detail li:nth-child(3) { transition-delay: 0.32s; }
.module-detail li:nth-child(4) { transition-delay: 0.39s; }

/* Souris : le survol suffit, le bouton ne reste visible qu'au clavier. */
@media (hover: hover) and (min-width: 1101px) {
    .module-card {
        cursor: pointer;
    }

    .module-card:hover .module-sheet {
        transform: translateY(0);
    }

    .module-card:hover .module-media {
        transform: scale(1.08);
        filter: saturate(0.7);
    }

    .module-card:hover .module-brief {
        grid-template-rows: 0fr;
        opacity: 0;
    }

    .module-card:hover .module-detail {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .module-card:hover .module-detail li {
        opacity: 1;
        transform: none;
    }

    .module-toggle:not(:focus-visible) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }
}

.modules-dots {
    display: none;
}

.modules-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    font-size: 15px;
    color: var(--text-muted);
}

.modules-extra strong {
    color: var(--ink-deep);
    margin-right: 4px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 500;
}

/* ---------- Site vitrine ---------- */

.showcase {
    background: var(--surface-alt);
    border-block: 1px solid var(--line);
}

.showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.showcase-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.showcase-copy h2 {
    font-weight: 800;
    font-size: clamp(30px, 3.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.showcase-copy > p {
    font-size: 18px;
    color: var(--text-muted);
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.check-list i {
    color: var(--paid);
    margin-top: 2px;
}

.offer-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding: 20px 24px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
}

.offer-box > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 220px;
    min-width: 0;
}

.offer-box small {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.offer-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    color: var(--ink-deep);
    font-variant-numeric: tabular-nums;
}

.offer-price span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-soft);
}

.offer-box p {
    font-size: 14px;
    color: var(--text-muted);
}

.browser {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: var(--shadow-paper);
    overflow: hidden;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-alt);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line-strong);
}

.browser-url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 12px;
}

.mock-site {
    display: flex;
    flex-direction: column;
}

.mock-banner {
    padding: 32px 28px;
    background: var(--ink-deep);
    color: var(--on-dark);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-banner strong {
    font-family: var(--font-display);
    font-size: 24px;
    color: #ffffff;
}

.mock-banner span {
    font-size: 14px;
    color: var(--on-dark-muted);
}

.mock-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.mock-nav span {
    padding: 4px 10px;
    border-radius: 999px;
}

.mock-nav span:first-child {
    background: var(--surface-alt);
    color: var(--ink);
}

.mock-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 28px 28px;
}

.mock-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-muted);
}

.mock-tile strong {
    font-size: 14px;
    color: var(--ink-deep);
}

.mock-tile.is-cta {
    background: var(--paid-bg);
    border-color: transparent;
}

.mock-tile.is-cta strong {
    color: var(--paid);
}

/* ---------- Étapes ---------- */

.steps {
    background: var(--ink-deep);
    color: var(--on-dark);
}

.steps h2 {
    color: #ffffff;
    font-weight: 800;
    font-size: clamp(30px, 3.4vw, 42px);
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.steps-list li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--margin-red);
}

.step-num {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 36px;
    line-height: 1;
    color: #ffb3a8;
}

.steps-list h3 {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 21px;
    font-weight: 700;
}

.steps-list p {
    color: var(--on-dark-muted);
}

.steps-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 48px;
}

.steps-cta span {
    color: var(--on-dark-muted);
    font-size: 15px;
}

/* ---------- Tarifs ---------- */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.plan.is-popular {
    border: 2px solid var(--plan-color, var(--ink));
}

.plan-flag {
    position: absolute;
    top: -16px;
    right: 20px;
    font-size: 26px;
    line-height: 1;
    background: var(--paper);
    padding: 0 8px;
}

.plan h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 19px;
}

.plan.is-popular h3 {
    color: var(--plan-color, var(--ink));
}

.plan-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

.plan-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 38px;
    line-height: 1.1;
    color: var(--ink-deep);
    font-variant-numeric: tabular-nums;
}

.plan-price span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-soft);
}

.plan-features {
    list-style: none;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.plan-features li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.plan-features i {
    color: var(--plan-color, var(--paid));
    margin-top: 2px;
}

.plan .btn {
    margin-top: auto;
}

.pricing-note {
    margin-top: 24px;
    font-size: 15px;
    color: var(--text-soft);
}

/* ---------- Partenaires ---------- */

.partner {
    border-top: 1px solid var(--line);
}

.partner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.partner-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.partner-copy h2 {
    font-weight: 800;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.partner-copy > p {
    font-size: 18px;
    color: var(--text-muted);
}

.partner-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.partner-card h3 {
    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 700;
}

.partner-card ol {
    margin: 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-muted);
}

/* ---------- TÉMOIGNAGES ---------- */

.testimonials {
    background: var(--surface-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.testimonial-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-paper);
}

.testimonial-stars {
    color: #f5a623;
    font-size: 14px;
    letter-spacing: 2px;
}

.testimonial-stars .is-dim {
    color: var(--line-strong);
}

.testimonial-content {
    margin: 0;
    font-size: 16px;
    color: var(--text);
    line-height: 1.55;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.testimonial-author strong {
    color: var(--ink-deep);
}

.testimonial-author span {
    color: var(--text-soft);
}

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

.faq {
    background: var(--surface-alt);
    border-top: 1px solid var(--line);
}

.faq-list {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line-strong);
}

.faq-list details {
    border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    font-weight: 700;
    font-size: 18px;
    color: var(--ink-deep);
    cursor: pointer;
    list-style: none;
}

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

.faq-list summary i {
    flex: none;
    transition: transform 0.2s;
}

.faq-list details[open] summary i {
    transform: rotate(45deg);
}

.faq-list details p {
    padding: 0 0 22px;
    color: var(--text-muted);
    max-width: 68ch;
}

/* ---------- CTA final ---------- */

.final-cta-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 48px;
    border-radius: 20px;
    background: var(--ink);
    color: #ffffff;
}

.final-cta-box > div {
    flex: 1 1 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-cta-box h2 {
    color: #ffffff;
    font-weight: 800;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.final-cta-box p {
    color: #dfe1ff;
    font-size: 17px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 56px 28px;
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--ink-deep);
    text-decoration: none;
}

.footer-col h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    color: var(--text);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--ink);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--text-soft);
}

/* ---------- Bouton WhatsApp flottant ---------- */

.floating-whatsapp {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1fa855;
    color: #ffffff;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 12px 24px -8px rgba(15, 80, 40, 0.5);
}

.floating-whatsapp:hover {
    color: #ffffff;
    background: #178a45;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 56px;
    }

    .hero-visual {
        max-width: 620px;
    }

    .showcase-grid,
    .partner-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .main-nav {
        display: flex;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 20px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 30px -20px rgba(20, 26, 69, 0.3);
    }

    .main-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
    }

    .main-nav.is-open > a,
    .main-nav.is-open > .mobile-auth {
        animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    }

    .main-nav.is-open > :nth-child(2) { animation-delay: 30ms; }
    .main-nav.is-open > :nth-child(3) { animation-delay: 60ms; }
    .main-nav.is-open > :nth-child(4) { animation-delay: 90ms; }
    .main-nav.is-open > :nth-child(5) { animation-delay: 120ms; }
    .main-nav.is-open > :nth-child(6) { animation-delay: 150ms; }
    .main-nav.is-open > :nth-child(7) { animation-delay: 180ms; }

    .main-nav > a {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        font-size: 17px;
    }

    .mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 16px;
    }

    .header-actions .link-login,
    .header-actions .btn {
        display: none;
    }

    .steps-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tablette et mobile : carrousel à balayer, une carte et demie visible,
   le détail s'ouvre au toucher via le bouton « Voir le détail ». */
@media (max-width: 1100px) {
    .modules-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        margin-inline: calc(var(--gutter) * -1);
        padding: 4px var(--gutter) 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .modules-grid::-webkit-scrollbar {
        display: none;
    }

    .module-card {
        flex: 0 0 min(82%, 360px);
        scroll-snap-align: start;
    }

    .modules-dots {
        display: flex;
        justify-content: center;
        gap: 4px;
        margin-top: 12px;
    }

    .modules-dots button {
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modules-dots button::before {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--line-strong);
        transition: width 0.3s, background-color 0.3s;
    }

    .modules-dots button[aria-current="true"]::before {
        width: 24px;
        background: var(--ink);
    }
}

@media (max-width: 640px) {
    .module-content {
        padding: 20px;
    }

    .module-card h3 {
        font-size: 22px;
    }

    .module-detail ul {
        gap: 8px;
        font-size: 14.5px;
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
    }

    .section {
        padding-block: 64px;
    }

    .hero {
        background-image:
            linear-gradient(90deg, transparent 0 28px, var(--margin-red) 28px 30px, transparent 30px),
            repeating-linear-gradient(180deg, rgba(60, 90, 200, 0.16) 0 1px, transparent 1px 32px),
            repeating-linear-gradient(180deg, rgba(60, 90, 200, 0.06) 0 1px, transparent 1px 8px);
    }

    .hero-inner {
        padding-left: 30px;
        padding-block: 48px 64px;
        gap: 40px;
    }

    .hero-lead {
        font-size: 17px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-visual {
        padding-bottom: 0;
    }

    .report-card {
        transform: none;
    }

    .report-table {
        font-size: 14px;
    }

    .report-annotation {
        font-size: 26px;
        top: -22px;
    }

    .receipt {
        position: static;
        width: auto;
        margin-top: 16px;
        transform: none;
    }

    .mock-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .final-cta-box {
        padding: 32px 24px;
    }

    .final-cta-box .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lang-switcher {
        margin-right: 0;
    }
}

/* ==========================================================================
   Mouvement
   Les animations n'ont qu'un état de départ (`from`) et `backwards` :
   à la fin, l'élément retrouve son style normal (survols compris).
   ========================================================================== */

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
}

@keyframes paper-drop {
    from { opacity: 0; transform: translateY(36px) rotate(-4deg); }
}

@keyframes receipt-slide {
    from { opacity: 0; transform: translate(-24px, 28px) rotate(8deg); }
}

@keyframes row-fill {
    from { opacity: 0; transform: translateX(-10px); }
}

@keyframes total-flash {
    from { background-color: #fff3c4; }
}

@keyframes pen-write {
    from { clip-path: inset(0 100% 0 0); }
}

@keyframes stamp {
    0% { opacity: 0; transform: scale(1.6); }
    60% { opacity: 1; transform: scale(0.94); }
}

@keyframes rule-draw {
    from { transform: scaleX(0); }
}

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(28px); }
}

@keyframes pop-in {
    0% { opacity: 0; transform: scale(0.4); }
    70% { transform: scale(1.08); }
}

@keyframes faq-open {
    from { opacity: 0; transform: translateY(-6px); }
}

/* Hero : la page s'écrit au chargement */

.hero-copy > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.15s; }
.hero-copy > :nth-child(3) { animation-delay: 0.28s; }
.hero-copy > :nth-child(4) { animation-delay: 0.4s; }
.hero-copy > :nth-child(5) { animation-delay: 0.52s; }

.report-card {
    animation: paper-drop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s backwards;
}

.report-table tbody tr {
    animation: row-fill 0.45s ease-out backwards;
}

.report-table tbody tr:nth-child(1) { animation-delay: 0.75s; }
.report-table tbody tr:nth-child(2) { animation-delay: 0.87s; }
.report-table tbody tr:nth-child(3) { animation-delay: 0.99s; }
.report-table tbody tr:nth-child(4) { animation-delay: 1.11s; }
.report-table tbody tr:nth-child(5) { animation-delay: 1.23s; }

.report-table tfoot td {
    animation: rise 0.5s ease-out 1.4s backwards, total-flash 1.2s ease-out 1.6s backwards;
}

.report-annotation {
    animation: pen-write 0.9s cubic-bezier(0.5, 0, 0.3, 1) 1.9s backwards;
}

.receipt {
    animation: receipt-slide 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1.2s backwards;
}

.status-paid {
    animation: stamp 0.45s ease-out 2.1s backwards;
}

.report-card,
.receipt {
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
}

@media (hover: hover) and (min-width: 641px) {
    .hero-visual:hover .report-card {
        transform: rotate(-0.4deg) translateY(-4px);
    }

    .hero-visual:hover .receipt {
        transform: rotate(3.5deg) translate(-4px, -2px);
    }
}

/* Apparition au défilement (classe posée par le script, état final = style normal) */

.js .reveal:not(.is-visible) {
    opacity: 0;
}

.js .reveal.is-visible {
    animation: reveal-up 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms) backwards;
}

/* Étapes : le trait rouge se trace à la règle */

.steps-list li {
    position: relative;
    border-top: 0;
}

.steps-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--margin-red);
    transform-origin: left center;
}

.js .steps-list li.reveal:not(.is-visible)::before {
    transform: scaleX(0);
}

.js .steps-list li.is-visible::before {
    animation: rule-draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) calc(var(--reveal-delay, 0ms) + 150ms) backwards;
}

/* Survols */

.module-card,
.plan,
.partner-card,
.mock-tile {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}

.browser {
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}

@media (hover: hover) {
    .module-card:hover,
    .plan:hover,
    .partner-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 22px 40px -28px rgba(20, 26, 69, 0.45);
    }

    .plan:not(.is-popular):hover { border-color: var(--line-strong); }

    .mock-tile:hover {
        transform: translateY(-2px);
        border-color: var(--line-strong);
    }

    .browser:hover {
        transform: translateY(-6px);
    }
}

.chip {
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.chip:hover {
    border-color: var(--ink);
    color: var(--ink-deep);
    transform: translateY(-2px);
}

.footer-social a {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-col a,
.faq-list summary,
.lang-switcher a,
.link-login {
    transition: color 0.2s, background-color 0.2s;
}

.faq-list summary:hover {
    color: var(--ink);
}

.faq-list details[open] p {
    animation: faq-open 0.35s ease-out;
}

@media (min-width: 961px) {
    .main-nav > a {
        background-image: linear-gradient(var(--pen), var(--pen));
        background-repeat: no-repeat;
        background-position: 0 100%;
        background-size: 0 2px;
        padding-block: 4px;
        transition: color 0.2s, background-size 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .main-nav > a:hover {
        background-size: 100% 2px;
    }
}

.floating-whatsapp {
    animation: pop-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 2.4s backwards;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s;
}

.floating-whatsapp:hover {
    transform: scale(1.08);
}

.menu-toggle i {
    display: inline-block;
    transition: transform 0.25s;
}

.menu-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal:not(.is-visible) {
        opacity: 1;
    }

    .js .steps-list li.reveal:not(.is-visible)::before {
        transform: none;
    }
}
