/*
 * BookyCloud : pages de vente publiques (/, /fonctionnalites, /tarifs et /contact).
 *
 * Feuille autonome : polices système, aucune ressource distante, aucun script.
 * Mobile d'abord (390 px), puis élargissement par min-width.
 *
 * Contraste (WCAG 2.1 AA, 4,5:1 pour le texte) : les couples texte/fond sont
 * déclarés dans les variables ci-dessous et vérifiés par calcul dans
 * tests/Feature/MarketingPagesTest.php (test_every_declared_color_pair_meets_wcag_aa).
 * Toute nouvelle couleur de texte ajoute son couple à ce test.
 */
:root {
    --ink: #14172b;
    --ink-soft: #4a5270;
    --paper: #ffffff;
    --tint: #f2f3fb;
    --tint-strong: #e0e4fb;
    --line: #c9cde6;
    --accent: #4338ca;
    --accent-strong: #3730a3;
    --night: #1e1b4b;
    --night-text: #ffffff;
    --night-soft: #c7d2fe;
    --ok-ink: #0b6b3a;
    --ok-bg: #e6f5ec;
    --soon-ink: #7a4200;
    --soon-bg: #fff3dc;
    --radius: 0.875rem;
    --shadow: 0 0.5rem 1.5rem rgba(20, 23, 43, 0.08);
    color-scheme: light;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

img,
svg {
    max-width: 100%;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.9rem);
}

h2 {
    font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
}

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

li + li {
    margin-top: 0.35rem;
}

a {
    color: var(--accent-strong);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 0.14em;
}

:focus-visible {
    outline: 3px solid var(--accent-strong);
    outline-offset: 3px;
    border-radius: 0.25rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -6rem;
    left: 0.75rem;
    z-index: 20;
    padding: 0.75rem 1rem;
    min-height: 44px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
    border-radius: 0.5rem;
}

.skip-link:focus {
    top: 0.75rem;
    outline-color: var(--accent-strong);
    outline-offset: 2px;
}

.wrap {
    width: 100%;
    max-width: 70rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- En-tête ---------- */

.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: var(--accent);
    color: var(--paper);
    font-size: 1.05rem;
    line-height: 1;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.25rem;
    margin-left: -0.5rem;
}

.site-nav a:not(.btn) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.6rem;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
}

.site-nav .btn {
    margin-left: 0.25rem;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

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

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.5rem 1.4rem;
    border: 2px solid transparent;
    border-radius: 0.65rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--accent-strong);
}

.btn-secondary {
    background: var(--paper);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn-secondary:hover {
    background: var(--tint);
}

@media (prefers-reduced-motion: no-preference) {
    .btn {
        transition: background-color 0.15s ease, color 0.15s ease;
    }
}

/* ---------- Bandes ---------- */

.band {
    padding: 2.5rem 0;
}

.band--tint {
    background: var(--tint);
}

.band--night {
    background: var(--night);
    color: var(--night-text);
}

.band--night :focus-visible {
    outline-color: var(--night-text);
}

.band--night a:not(.btn) {
    color: var(--night-text);
}

.band--night .btn-primary {
    background: var(--paper);
    color: var(--night);
}

.band--night .btn-primary:hover {
    background: var(--tint-strong);
}

.band--night .btn-secondary {
    background: transparent;
    border-color: var(--night-text);
    color: var(--night-text);
}

.band--night .btn-secondary:hover {
    background: var(--accent-strong);
}

.hero {
    padding: 2.75rem 0 3rem;
}

.hero .lead {
    max-width: 44rem;
    font-size: 1.1rem;
}

.hero__note {
    max-width: 44rem;
    margin: 1.25rem 0 0;
    text-wrap: balance;
    color: var(--night-soft);
    font-weight: 600;
}

.lead {
    font-size: 1.05rem;
}

.section-intro {
    max-width: 46rem;
    color: var(--ink-soft);
}

/* ---------- Cartes ---------- */

.cards {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.cards > li {
    margin: 0;
}

.card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p:last-child,
.card ul:last-child {
    margin-bottom: 0;
}

.band--tint .card {
    border-color: transparent;
    box-shadow: var(--shadow);
}

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

.steps {
    counter-reset: step;
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.steps > li {
    counter-increment: step;
    position: relative;
    margin: 0;
    padding: 1.25rem 1.25rem 1.25rem 4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    top: 1.15rem;
    left: 1.1rem;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--paper);
    font-weight: 800;
}

/* ---------- Offres ---------- */

.offers {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 0;
}

.offer {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.offer--available {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow);
}

.offer h3 {
    margin: 0.5rem 0 0.75rem;
    font-size: 1.35rem;
}

.offer ul {
    padding-left: 1.25rem;
}

.offer .badge {
    align-self: flex-start;
}

.offer__price {
    margin: 0 0 0.75rem;
}

.offer__price strong,
.price-list strong {
    color: var(--ink);
    font-size: 1.15rem;
}

.price-list {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.offer .price-list {
    padding-left: 0;
}

.offer__cta {
    margin: auto 0 0;
    padding-top: 0.75rem;
}

.offer__cta .btn {
    width: 100%;
}

.badge {
    display: inline-block;
    margin: 0;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.badge--ok {
    background: var(--ok-bg);
    color: var(--ok-ink);
}

.badge--soon {
    background: var(--soon-bg);
    color: var(--soon-ink);
}

/* ---------- Tableaux ---------- */

.table-hint {
    margin: 1rem 0 0.5rem;
    color: var(--ink-soft);
    font-size: 0.925rem;
}

.table-scroll {
    /* Contient aussi le texte réservé aux lecteurs d'écran (position absolue), qui sinon élargirait la page. */
    position: relative;
    margin: 1rem 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    overscroll-behavior-x: contain;
}

.table-hint + .table-scroll {
    margin-top: 0;
}

.table-scroll:focus-visible {
    outline-offset: 2px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.975rem;
}

.table--compare {
    min-width: 36rem;
}

/* Sur écran étroit, le tableau des offres de l'accueil devient une pile de
   fiches (offre, statut, prix, commission) : il se lit sans défiler. L'en-tête
   reste pour les lecteurs d'écran, les libellés « Prix » et « Commission » sont
   repris devant chaque valeur. Le rétablissement du tableau est dans la requête
   min-width: 56rem. */
.table--summary,
.table--summary tbody,
.table--summary tr,
.table--summary th,
.table--summary td {
    display: block;
}

.table--summary thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.table--summary tr {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
}

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

.table--summary th,
.table--summary td {
    padding: 0.2rem 0;
    border: 0;
}

.table--summary td:nth-child(3)::before {
    content: "Prix : ";
    font-weight: 700;
}

.table--summary td:nth-child(4)::before {
    content: "Commission : ";
    font-weight: 700;
}

/* L'exemple chiffré tient dans 320 px : texte et cellules resserrés, pas de défilement. */
.table--example {
    font-size: 0.875rem;
}

.table--example th,
.table--example td {
    padding: 0.7rem 0.4rem;
}

/* La légende du tableau nomme celui-ci pour les lecteurs d'écran ; le titre de
   section et le texte qui précède la disent déjà aux autres visiteurs. Visible,
   elle serait coupée par le défilement horizontal sur un écran étroit. */
caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

th,
td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

thead th,
thead td {
    background: var(--tint-strong);
    color: var(--ink);
    font-weight: 700;
}

tbody th[scope="row"] {
    background: var(--paper);
    font-weight: 600;
}

.table--compare tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 6.5rem;
    min-width: 0;
    padding: 0.7rem 0.6rem;
    box-shadow: 1px 0 0 var(--line);
    font-size: 0.875rem;
}

/* Écran étroit : la colonne des critères reste étroite pour que la première
   offre, puis le début de la suivante, apparaissent à côté d'elle. */
.table--compare td {
    min-width: 7.5rem;
    padding: 0.7rem 0.6rem;
}

.table--compare .badge {
    white-space: normal;
}

th[scope="rowgroup"] {
    padding: 0.55rem 1rem;
    background: var(--tint);
    color: var(--ink);
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rowgroup-label {
    position: sticky;
    left: 1rem;
    display: inline-block;
}

td ul {
    margin: 0;
    padding-left: 1.1rem;
}

td ul li + li {
    margin-top: 0.25rem;
}

.yes,
.soon,
.no {
    font-weight: 700;
}

.yes {
    color: var(--ok-ink);
}

.soon {
    color: var(--soon-ink);
}

.no {
    color: var(--ink-soft);
}

.notes {
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.925rem;
}

.band--night .notes {
    color: var(--night-soft);
}

/* Une note qui précède un paragraphe ne doit pas le toucher. */
.notes + p {
    margin-top: 0.5rem;
}

.top-gap {
    margin-top: 1.75rem;
}

/* ---------- Exemples chiffrés ---------- */

.example-list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

/* ---------- Questions fréquentes ---------- */

.faq {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 0;
}

.faq article {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.faq h3 {
    margin-bottom: 0.5rem;
}

.faq p {
    max-width: 48rem;
    margin-bottom: 0;
}

/* ---------- Compléments de mise en page ---------- */

/* Colonne de lecture : alignée à gauche comme l'en-tête et le pied de page, jamais plus large que 46 rem. */
.wrap--narrow > * {
    max-width: 46rem;
}

.btn--compact {
    min-height: 44px;
    padding: 0.25rem 1rem;
}

.cell-detail {
    display: block;
    margin-top: 0.25rem;
    color: var(--ink-soft);
    font-size: 0.875rem;
    font-weight: 400;
}

.action-row {
    display: grid;
    gap: 1.25rem;
    margin: 1.5rem 0 0;
}

.action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.action p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.925rem;
}

.band--soon {
    background: var(--soon-bg);
}

.card--soon {
    display: flex;
    flex-direction: column;
    border: 2px dashed var(--soon-ink);
}

/* Dans une colonne flex, le badge s'étirerait sur toute la largeur de la carte. */
.card--soon .badge {
    align-self: flex-start;
}

/* Les boutons des cartes « Bientôt disponible » s'alignent en bas, quelle que soit la longueur du texte. */
.card__cta {
    margin: auto 0 0;
    padding-top: 1rem;
}

.legend {
    max-width: 52rem;
    margin-bottom: 0;
}

.checklist li + li {
    margin-top: 0.5rem;
}

.included {
    color: var(--ink-soft);
    font-weight: 700;
}

/* ---------- Pied de page ---------- */

.site-footer {
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--line);
    background: var(--tint);
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.footer-note {
    margin: 0.75rem 0 0;
    color: var(--ink-soft);
    font-size: 0.925rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.5rem;
    margin: 0 0 0 -0.6rem;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.6rem;
}

/* ---------- Élargissement ---------- */

@media (min-width: 40rem) {
    .wrap {
        padding: 0 1.5rem;
    }

    .cards,
    .faq,
    .offers {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 56rem) {
    .band {
        padding: 3.5rem 0;
    }

    .hero {
        padding: 4.5rem 0 4.75rem;
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .offers {
        grid-template-columns: repeat(3, 1fr);
    }

    .offers--pair {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-hint {
        display: none;
    }

    .table--compare {
        min-width: 0;
    }

    .table--compare tbody th[scope="row"] {
        position: static;
        width: auto;
        min-width: 10rem;
        padding: 0.8rem 1rem;
        box-shadow: none;
        font-size: inherit;
    }

    .table--compare td {
        min-width: 0;
        padding: 0.8rem 1rem;
    }

    .table--compare .badge {
        white-space: nowrap;
    }

    .table--example {
        font-size: 0.975rem;
    }

    .table--example th,
    .table--example td {
        padding: 0.8rem 1rem;
    }

    /* La pile de fiches redevient un tableau. */
    .table--summary {
        display: table;
    }

    .table--summary thead {
        position: static;
        display: table-header-group;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
    }

    .table--summary tbody {
        display: table-row-group;
    }

    .table--summary tr {
        display: table-row;
        padding: 0;
        border-bottom: 0;
    }

    .table--summary th,
    .table--summary td {
        display: table-cell;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--line);
    }

    .table--summary tbody tr:last-child th,
    .table--summary tbody tr:last-child td {
        border-bottom: 0;
    }

    .table--summary td:nth-child(3)::before,
    .table--summary td:nth-child(4)::before {
        content: none;
    }

    .rowgroup-label {
        position: static;
    }
}

@media print {
    .skip-link,
    .site-nav,
    .actions {
        display: none;
    }

    .band--night {
        background: none;
        color: var(--ink);
    }

    .band--night a:not(.btn) {
        color: var(--ink);
    }
}
