/* ==========================================================================
   Truffi — vitrine (truffi.fr)
   Même design system que l'application (« calcaire et truffe ») : les tokens
   ci-dessous reprennent ceux de truffi/static/style.css, à l'identique
   (tests/test_vitrine.py les compare). Règle de lecture inchangée : noir =
   agir, vert = état courant, ocre = récolte. Thème clair, une seule police.
   Page statique servie par nginx : aucun style inline, aucun script inline.
   ========================================================================== */

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('fonts/lexend-latin.woff2') format('woff2');
}

:root {
    /* Tokens de l'application (identiques à style.css) */
    --calcaire: #ecede7;
    --craie: #fcfcfa;
    --craie-2: #f4f4ef;
    --trait: #dfdfd7;
    --trait-fort: #c3c2b7;
    --encre: #1f1b16;
    --encre-2: #57534a;
    --encre-3: #6c685f;
    --truffe: #1f1a15;
    --truffe-2: #2c251e;
    --gleba: #efe7d8;
    --gleba-2: #b9ae9c;
    --chene: #2e5135;
    --chene-fonce: #243f2a;
    --lichen: #dfe6da;
    --brule: #b97a24;
    --brule-fonce: #7a4a16;
    --brule-pale: #f6ebd6;
    --succes: #2e6b3d;
    --succes-pale: #e3efe5;
    --recolte-1: #d9a441;
    --recolte-2: #b97a24;
    --recolte-3: #8a531b;
    --recolte-4: #55331a;
    --arbre: #d3cec3;
    --arbre-bord: #a39e92;
    --evolution-premieres: #1e5a96;
    --evolution-hausse: #5f9bd1;
    --evolution-baisse: #e0955a;
    --evolution-arret: #93361a;
    --marbrure: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' viewBox='0 0 420 260'%3E%3Cg fill='none' stroke='%23efe7d8' stroke-linecap='round'%3E%3Cpath d='M-20 42 C 60 18 96 88 154 68 S 252 12 322 44 S 424 92 452 62' stroke-width='1.6' opacity='.14'/%3E%3Cpath d='M-12 124 C 44 152 122 108 172 138 S 302 172 360 128 S 430 108 448 130' stroke-width='2.2' opacity='.10'/%3E%3Cpath d='M-18 204 C 70 182 132 232 212 210 S 330 168 434 212' stroke-width='1.4' opacity='.13'/%3E%3Cpath d='M64 -12 C 62 58 112 92 100 152 S 62 232 92 274' stroke-width='1.3' opacity='.09'/%3E%3Cpath d='M232 -18 C 242 60 190 112 212 172 S 262 238 242 282' stroke-width='1.8' opacity='.09'/%3E%3Cpath d='M352 -12 C 330 62 382 122 352 182 S 320 248 342 284' stroke-width='1.2' opacity='.11'/%3E%3Cpath d='M120 70 C 150 92 148 128 178 140' stroke-width='1' opacity='.10'/%3E%3Cpath d='M282 150 C 300 128 336 130 352 106' stroke-width='1' opacity='.10'/%3E%3C/g%3E%3C/svg%3E");
    --r-feuille: 22px;
    --r-carte: 16px;
    --r-ctrl: 11px;
    --ombre: 0 10px 30px rgba(31, 26, 21, 0.16), 0 1px 3px rgba(31, 26, 21, 0.10);
    --police: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Propres à la vitrine */
    --largeur: 1160px;
    --gouttiere: clamp(20px, 5vw, 40px);
    --section: clamp(64px, 8vw, 112px);
    --entete-h: 64px;
    --ombre-haute: 0 40px 80px -20px rgba(31, 26, 21, 0.35), 0 12px 30px -10px rgba(31, 26, 21, 0.25);
    --texte-clair: #d8cfbf;
    /* sur fond truffe : plus lisible que --gleba-2 pour les paragraphes */
    --sortie: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
    margin: 0;
    font-family: var(--police);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--encre);
    background-color: var(--calcaire);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

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

p {
    margin: 0 0 0.8em;
}

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

figure {
    margin: 0;
}

a {
    color: var(--chene);
    text-decoration-color: rgba(46, 81, 53, 0.35);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 2.5px solid var(--brule);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.visuellement-cache {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.evitement {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 50;
    padding: 10px 14px;
    border-radius: var(--r-ctrl);
    background-color: var(--craie);
    color: var(--encre);
    font-weight: 600;
}

.evitement:focus {
    top: 12px;
}

.page {
    width: min(100% - 2 * var(--gouttiere), var(--largeur));
    margin-inline: auto;
}

/* Icônes au trait (style Feather, comme l'application) */
.icone {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   Boutons et marque
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--r-ctrl);
    font: inherit;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.2s;
}

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

.btn-sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.875rem;
}

.btn-grand {
    min-height: 56px;
    padding: 0 26px;
    border-radius: 14px;
    font-size: 1.0625rem;
}

.btn-bloc {
    width: 100%;
}

/* Action principale sur fond clair : le noir truffe */
.btn-primaire {
    background-color: var(--truffe);
    color: var(--gleba);
}

.btn-primaire:hover {
    background-color: var(--truffe-2);
}

/* Action principale sur fond truffe : la crème de la gleba */
.btn-gleba {
    background-color: var(--gleba);
    color: var(--truffe);
}

.btn-gleba:hover {
    background-color: #fff8ec;
    box-shadow: 0 0 0 4px rgba(239, 231, 216, 0.14);
}

.btn-gleba .icone {
    transition: transform 0.2s var(--sortie);
}

.btn-gleba:hover .icone {
    transform: translateX(3px);
}

.btn-fantome {
    border-color: rgba(239, 231, 216, 0.28);
    color: var(--gleba);
}

.btn-fantome:hover {
    border-color: rgba(239, 231, 216, 0.6);
    background-color: rgba(239, 231, 216, 0.06);
}

.marque {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gleba);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1875rem;
    letter-spacing: -0.02em;
}

.marque-sombre {
    color: var(--encre);
}

/* Le logo (truffe noire) repose sur une tuile vert chêne, comme l'icône de l'app */
.marque-tuile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background-color: var(--chene);
    flex: none;
}

.marque-tuile svg {
    width: 25px;
    height: 25px;
}

.marque-tuile-grande {
    width: 64px;
    height: 64px;
    border-radius: 18px;
}

.marque-tuile-grande svg {
    width: 48px;
    height: 48px;
}

/* ==========================================================================
   En-tête : collé en haut, de la même chair que l'accroche
   ========================================================================== */

.entete {
    position: sticky;
    top: 0;
    z-index: 30;
    background-color: rgba(31, 26, 21, 0.92);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(239, 231, 216, 0.08);
    color: var(--gleba);
}

.entete-rangee {
    display: flex;
    align-items: center;
    gap: 28px;
    height: var(--entete-h);
}

.entete-nav {
    display: none;
}

.entete-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lien-connexion {
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--gleba);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}

.lien-connexion:hover {
    background-color: rgba(239, 231, 216, 0.08);
}

@media (min-width: 960px) {
    .entete-nav {
        display: flex;
        gap: 2px;
    }

    .entete-nav a {
        padding: 8px 12px;
        border-radius: 9px;
        color: var(--gleba-2);
        font-size: 0.9375rem;
        text-decoration: none;
        transition: color 0.15s, background-color 0.15s;
    }

    .entete-nav a:hover {
        color: var(--gleba);
        background-color: rgba(239, 231, 216, 0.06);
    }
}

/* ==========================================================================
   Accroche
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    padding-top: clamp(36px, 7vw, 84px);
    background-color: var(--truffe);
    background-image:
        radial-gradient(90% 70% at 85% 10%, rgba(46, 81, 53, 0.35) 0%, transparent 60%),
        radial-gradient(70% 60% at 0% 100%, var(--truffe-2) 0%, transparent 70%),
        var(--marbrure);
    background-size: auto, auto, 630px 390px;
    color: var(--gleba);
}

.hero-grille {
    display: grid;
    gap: 44px;
}

.sur-titre {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 7px 14px 7px 12px;
    border: 1px solid rgba(239, 231, 216, 0.16);
    border-radius: 999px;
    background-color: rgba(239, 231, 216, 0.05);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Le point ocre, vivant : Truffi évolue au fil des saisons */
.pastille-vive {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--recolte-1);
}

.pastille-vive::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--recolte-1);
    opacity: 0;
    animation: pouls 2.4s ease-out infinite;
}

@keyframes pouls {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.hero h1 {
    margin: 22px 0 20px;
    font-size: clamp(2.375rem, 1.35rem + 4.3vw, 4.25rem);
    font-weight: 680;
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.hero-lead {
    max-width: 34em;
    color: var(--texte-clair);
    font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
    line-height: 1.55;
}

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

.actions-centre {
    justify-content: center;
}

@media (max-width: 559px) {
    .actions .btn {
        flex: 1 1 100%;
    }
}

.hero-garanties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    color: var(--gleba-2);
    font-size: 0.875rem;
}

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

.hero-garanties .icone {
    width: 16px;
    height: 16px;
    color: var(--recolte-1);
    stroke-width: 2.5;
}

/* Deux téléphones : la saisie devant, la fiche d'un chêne derrière.
   Sur mobile, l'accroche se termine sur l'écran coupé par le bas. */
.hero-visuel {
    position: relative;
    height: 470px;
}

.hero-visuel .telephone {
    position: absolute;
    top: 0;
}

.telephone-avant {
    left: 50%;
    z-index: 2;
    width: 250px;
    transform: translateX(-74%);
    animation: monte 0.9s var(--sortie) both;
}

.telephone-arriere {
    left: 50%;
    z-index: 1;
    width: 226px;
    transform: translateX(-4%) translateY(54px) rotate(5deg);
    animation: monte-penche 1s 0.12s var(--sortie) both;
}

@keyframes monte {
    from {
        opacity: 0;
        transform: translateX(-74%) translateY(40px);
    }
}

@keyframes monte-penche {
    from {
        opacity: 0;
        transform: translateX(-4%) translateY(110px) rotate(9deg);
    }
}

.bulle {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 12px;
    border-radius: 14px;
    background-color: var(--craie);
    color: var(--encre);
    box-shadow: var(--ombre);
    font-size: 0.8125rem;
    line-height: 1.25;
    white-space: nowrap;
    animation: bulle 0.7s var(--sortie) both;
}

.bulle strong {
    display: block;
    font-weight: 650;
}

.bulle small {
    display: block;
    color: var(--encre-3);
    font-size: 0.75rem;
}

.bulle-pastille {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background-color: var(--recolte-2);
    box-shadow: 0 0 0 4px var(--brule-pale);
}

.bulle-truffe {
    top: 132px;
    right: 0;
    animation-delay: 0.7s;
}

.bulle-reseau {
    top: 300px;
    left: 0;
    animation-delay: 1s;
}

.bulle-reseau .icone {
    width: 26px;
    height: 26px;
    padding: 5px;
    border-radius: 50%;
    background-color: var(--brule-pale);
    color: var(--brule-fonce);
}

@keyframes bulle {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
}

@media (min-width: 560px) {
    .hero-visuel {
        height: 540px;
    }

    .telephone-avant {
        width: 280px;
    }

    .telephone-arriere {
        width: 252px;
    }

    .bulle-truffe {
        right: 6%;
    }

    .bulle-reseau {
        left: 6%;
        top: 340px;
    }
}

@media (min-width: 960px) {
    .hero {
        padding-bottom: 0;
    }

    .hero-grille {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        align-items: center;
        gap: 40px;
    }

    .hero-texte {
        padding-bottom: 96px;
    }

    .hero-visuel {
        height: 640px;
        align-self: end;
    }

    .hero-visuel .telephone {
        top: 24px;
    }

    .telephone-avant {
        width: 300px;
        transform: translateX(-70%);
    }

    @keyframes monte {
        from {
            opacity: 0;
            transform: translateX(-70%) translateY(40px);
        }
    }

    .telephone-arriere {
        width: 272px;
        transform: translateX(-2%) translateY(70px) rotate(5deg);
    }

    @keyframes monte-penche {
        from {
            opacity: 0;
            transform: translateX(-2%) translateY(130px) rotate(9deg);
        }
    }

    .bulle-truffe {
        top: 150px;
        right: -12px;
    }

    .bulle-reseau {
        top: 400px;
        left: -24px;
    }
}

/* ==========================================================================
   Téléphone et fenêtre de navigateur dessinés en CSS autour des captures
   ========================================================================== */

.telephone {
    padding: 9px;
    border-radius: 46px;
    background: linear-gradient(145deg, #3a332b, #0f0d0b 40%, #1b1713);
    box-shadow: var(--ombre-haute), inset 0 0 0 1.5px rgba(239, 231, 216, 0.14);
}

.telephone-ecran {
    position: relative;
    overflow: hidden;
    border-radius: 37px;
    background-color: var(--truffe);
}

/* Barre d'état du téléphone, à la couleur de la barre de l'app (theme-color) */
.telephone-statut {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    padding: 2px 24px 0 28px;
    background-color: var(--truffe);
    color: var(--gleba);
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* L'îlot de la caméra */
.telephone-statut::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    width: 74px;
    height: 20px;
    border-radius: 12px;
    background-color: #000;
    transform: translateX(-50%);
}

.statut-icones {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Quatre barres de réseau ; « vides » = pas de réseau (la saisie le montre) */
.barres {
    width: 17px;
    height: 10px;
    background:
        linear-gradient(var(--gleba), var(--gleba)) 0 100% / 3px 40% no-repeat,
        linear-gradient(var(--gleba), var(--gleba)) 4.6px 100% / 3px 60% no-repeat,
        linear-gradient(var(--gleba), var(--gleba)) 9.2px 100% / 3px 80% no-repeat,
        linear-gradient(var(--gleba), var(--gleba)) 13.8px 100% / 3px 100% no-repeat;
}

.barres-vides {
    opacity: 0.35;
}

.batterie {
    position: relative;
    width: 22px;
    height: 11px;
    border: 1.5px solid rgba(239, 231, 216, 0.6);
    border-radius: 3.5px;
}

.batterie::before {
    content: "";
    position: absolute;
    inset: 1.5px;
    right: 6px;
    border-radius: 1.5px;
    background-color: var(--gleba);
}

.telephone-seul {
    width: min(300px, 78vw);
    margin-inline: auto;
}

.navigateur {
    overflow: hidden;
    border: 1px solid var(--trait);
    border-radius: 14px;
    background-color: var(--craie);
    box-shadow: var(--ombre-haute);
}

.navigateur-barre {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border-bottom: 1px solid var(--trait);
    background-color: var(--craie-2);
}

.navigateur-barre i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--trait-fort);
}

.navigateur-adresse {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 14px;
    padding: 4px 14px;
    border-radius: 8px;
    background-color: var(--craie);
    color: var(--encre-3);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
}

.navigateur-adresse .icone {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   Bande « terrain »
   ========================================================================== */

.terrain {
    padding: 34px 0;
    border-bottom: 1px solid var(--trait);
    background-color: var(--craie);
}

.terrain-grille {
    display: grid;
    gap: 22px;
}

.terrain-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.terrain-item h2 {
    margin-bottom: 3px;
    font-size: 1rem;
    font-weight: 650;
}

.terrain-item p {
    margin: 0;
    color: var(--encre-2);
    font-size: 0.9375rem;
}

.tuile-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    background-color: var(--lichen);
    color: var(--chene);
}

@media (min-width: 760px) {
    .terrain-grille {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    padding-block: var(--section);
}

.section-retrait {
    background-color: var(--craie-2);
    border-block: 1px solid var(--trait);
}

.section-entete {
    max-width: 660px;
    margin-bottom: clamp(32px, 5vw, 52px);
}

.section-entete-centre {
    margin-inline: auto;
    text-align: center;
}

.etiquette {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--chene);
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.etiquette span {
    padding: 3px 8px;
    border-radius: 7px;
    background-color: var(--lichen);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.etiquette-claire {
    color: var(--gleba);
}

.etiquette-claire span {
    background-color: rgba(239, 231, 216, 0.1);
}

.section h2 {
    margin-bottom: 18px;
    font-size: clamp(1.875rem, 1.25rem + 2.5vw, 2.875rem);
    font-weight: 680;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-entete p,
.duo-texte p {
    max-width: 56ch;
    color: var(--encre-2);
    font-size: 1.0625rem;
}

.section-entete-centre p {
    margin-inline: auto;
}

.duo {
    display: grid;
    gap: 48px;
    align-items: center;
}

@media (min-width: 960px) {
    .duo {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 72px;
    }

    .duo-inverse>.duo-texte {
        order: 2;
    }
}

.points {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.points .icone {
    width: 22px;
    height: 22px;
    padding: 4px;
    margin-top: 1px;
    border-radius: 50%;
    background-color: var(--lichen);
    color: var(--chene);
    stroke-width: 3;
}

/* ==========================================================================
   01 · La sortie du matin (reprise de la liste « Aujourd'hui » de l'app)
   ========================================================================== */

.sortie {
    overflow: hidden;
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
    border: 1px solid var(--trait);
    border-radius: var(--r-feuille);
    background-color: var(--craie);
    box-shadow: var(--ombre);
}

.sortie-entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--trait);
}

.sortie-entete strong {
    display: block;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.sortie-entete span {
    color: var(--encre-3);
    font-size: 0.875rem;
}

.sortie-liste {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sortie-ligne {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
        "num detail heure"
        "num detail etat";
    gap: 2px 10px;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--trait);
}

.sortie-num {
    grid-area: num;
    font-weight: 700;
    font-size: 1.0625rem;
    font-variant-numeric: tabular-nums;
}

.sortie-detail {
    grid-area: detail;
    color: var(--encre-2);
    font-size: 0.875rem;
}

.sortie-detail strong {
    display: block;
    color: var(--encre);
    font-size: 1rem;
}

.sortie-heure {
    grid-area: heure;
    justify-self: end;
    color: var(--encre-3);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.etat {
    grid-area: etat;
    justify-self: end;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.etat-envoyee {
    background-color: var(--succes-pale);
    color: var(--succes);
}

.etat-attente {
    background-color: var(--brule-pale);
    color: var(--brule-fonce);
}

.sortie-bandeau {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background-color: var(--truffe);
    background-image: var(--marbrure);
    background-size: 420px 260px;
    color: var(--texte-clair);
    font-size: 0.875rem;
}

.sortie-bandeau strong {
    display: block;
    color: var(--gleba);
    font-size: 0.9375rem;
}

.sortie-bandeau .icone {
    margin-top: 2px;
    color: var(--recolte-1);
}

/* ==========================================================================
   02 · Le plan de démonstration (vitrine.js)
   ========================================================================== */

.plan-carte {
    max-width: 860px;
    margin-inline: auto;
    padding: 14px;
    border: 1px solid var(--trait);
    border-radius: var(--r-feuille);
    background-color: var(--craie);
    box-shadow: var(--ombre-haute);
}

.plan-outils {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.plan-calques {
    display: flex;
    gap: 6px;
}

.chip {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--trait-fort);
    border-radius: 999px;
    background-color: var(--craie);
    color: var(--encre);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover {
    border-color: var(--encre-3);
}

.chip[aria-pressed="true"] {
    border-color: var(--chene);
    background-color: var(--chene);
    color: #fff;
}

.plan-recherche {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--trait-fort);
    border-radius: var(--r-ctrl);
    background-color: var(--craie);
}

.plan-recherche input {
    width: 108px;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--encre);
    font: inherit;
    font-size: 0.9375rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.plan-recherche input::-webkit-inner-spin-button,
.plan-recherche input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.plan-recherche input:focus {
    outline: none;
}

.plan-recherche:focus-within {
    outline: 2.5px solid var(--brule);
    outline-offset: 2px;
}

.plan-recherche button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    border: 0;
    border-left: 1px solid var(--trait);
    background: transparent;
    color: var(--encre);
    cursor: pointer;
}

.plan-resume {
    margin: 0 4px 12px;
    color: var(--encre-2);
    font-size: 0.875rem;
}

.plan-resume strong {
    color: var(--encre);
}

/* Le fond pointillé de la grille, comme dans l'éditeur */
.plan-zone {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-carte);
    background-color: var(--craie-2);
    background-image: radial-gradient(circle, rgba(31, 26, 21, 0.13) 1px, transparent 1.4px);
    background-size: 18px 18px;
    min-height: 220px;
}

.plan-repli {
    max-height: 560px;
    margin-inline: auto;
    object-fit: cover;
    object-position: top;
}

.plan-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.arbre circle {
    fill: var(--arbre);
    stroke: var(--arbre-bord);
    stroke-width: 1.5;
    transition: fill 0.5s ease, stroke 0.5s ease;
    transition-delay: var(--d2, 0s);
}

.arbre text {
    fill: var(--truffe);
    font-family: var(--police);
    font-size: 15px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    transition-delay: var(--d2, 0s);
}

.arbre:hover circle {
    stroke: var(--truffe);
    stroke-width: 2.5;
}

/* Les arbres poussent, puis les récoltes les colorent (classes posées par vitrine.js) ;
   avant que le plan n'entre à l'écran, rien n'est dessiné */
.plan-svg:not(.anime):not(.colore) .arbre {
    opacity: 0;
}

.plan-svg.anime .arbre {
    transform-box: fill-box;
    transform-origin: center;
    animation: pousse 0.55s var(--sortie) both;
    animation-delay: var(--d, 0s);
}

@keyframes pousse {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
}

.plan-svg.colore .arbre.a-truffes text {
    opacity: 1;
}

.calque-recolte.colore .arbre[data-niveau="1"] circle {
    fill: var(--recolte-1);
    stroke: var(--recolte-1);
}

.calque-recolte.colore .arbre[data-niveau="2"] circle {
    fill: var(--recolte-2);
    stroke: var(--recolte-2);
}

.calque-recolte.colore .arbre[data-niveau="3"] circle {
    fill: var(--recolte-3);
    stroke: var(--recolte-3);
}

.calque-recolte.colore .arbre[data-niveau="4"] circle {
    fill: var(--recolte-4);
    stroke: var(--recolte-4);
}

.calque-recolte.colore .arbre[data-niveau="3"] text,
.calque-recolte.colore .arbre[data-niveau="4"] text {
    fill: #fff;
}

/* Calque évolution : mêmes couleurs que l'application */
.calque-evolution .arbre[data-evolution="premieres"] circle {
    fill: var(--evolution-premieres);
    stroke: var(--evolution-premieres);
}

.calque-evolution .arbre[data-evolution="hausse"] circle {
    fill: var(--evolution-hausse);
    stroke: var(--evolution-hausse);
}

.calque-evolution .arbre[data-evolution="baisse"] circle {
    fill: var(--evolution-baisse);
    stroke: var(--evolution-baisse);
}

.calque-evolution .arbre[data-evolution="arret"] circle {
    fill: var(--evolution-arret);
    stroke: var(--evolution-arret);
}

.calque-evolution .arbre[data-evolution="jamais"] circle {
    fill: var(--craie);
}

.calque-evolution .arbre[data-evolution="premieres"] text,
.calque-evolution .arbre[data-evolution="arret"] text {
    fill: #fff;
}

.anneau {
    fill: none;
    stroke: var(--truffe);
    stroke-width: 3;
    pointer-events: none;
    transition: opacity 0.2s;
}

.plan-aide {
    display: table;
    margin: 0 10px 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: rgba(31, 26, 21, 0.86);
    color: var(--gleba);
    font-size: 0.8125rem;
    font-weight: 600;
    pointer-events: none;
}

/* La fiche d'un chêne, comme sur le plan de l'application */
.fiche {
    position: relative;
    margin: 0 8px 8px;
    padding: 16px 18px 14px;
    border-radius: 18px;
    background-color: var(--craie);
    box-shadow: var(--ombre);
    animation: bulle 0.35s var(--sortie) both;
}

.fiche h3 {
    padding-right: 40px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fiche-sous {
    margin: 2px 0 12px;
    color: var(--encre-2);
    font-size: 0.875rem;
}

.fiche-fermer {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--encre-2);
    cursor: pointer;
}

.fiche-fermer:hover {
    background-color: var(--craie-2);
}

.fiche-saisons {
    display: grid;
    gap: 7px;
}

.fiche-saison {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 22px 52px;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.fiche-saison:first-child {
    font-weight: 650;
}

.fiche-barre {
    height: 8px;
    border-radius: 4px;
    background-color: var(--craie-2);
    overflow: hidden;
}

.fiche-barre i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background-color: var(--brule);
    transition: width 0.6s var(--sortie);
}

.fiche-saison .nombre,
.fiche-saison .poids {
    text-align: right;
}

.fiche-evolution {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--trait);
    color: var(--encre-2);
    font-size: 0.8125rem;
}

.fiche-evolution:empty {
    display: none;
}

.point-evolution {
    width: 12px;
    height: 12px;
    flex: none;
    border-radius: 50%;
    background-color: var(--arbre);
    box-shadow: inset 0 0 0 1.5px var(--arbre-bord);
}

.point-evolution[data-evolution="premieres"] {
    background-color: var(--evolution-premieres);
    box-shadow: none;
}

.point-evolution[data-evolution="hausse"] {
    background-color: var(--evolution-hausse);
    box-shadow: none;
}

.point-evolution[data-evolution="baisse"] {
    background-color: var(--evolution-baisse);
    box-shadow: none;
}

.point-evolution[data-evolution="arret"] {
    background-color: var(--evolution-arret);
    box-shadow: none;
}

.point-evolution[data-evolution="jamais"] {
    background-color: var(--craie);
}

.legende {
    margin: 12px 4px 2px;
    color: var(--encre-2);
    font-size: 0.8125rem;
}

.legende-titre {
    display: block;
    margin-bottom: 7px;
}

.legende-echelle {
    display: flex;
    gap: 3px;
}

.legende-echelle span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 42px;
    font-variant-numeric: tabular-nums;
}

.legende-echelle i {
    width: 100%;
    height: 10px;
    border-radius: 3px;
}

.niveau-0 {
    background-color: var(--arbre);
}

.niveau-1 {
    background-color: var(--recolte-1);
}

.niveau-2 {
    background-color: var(--recolte-2);
}

.niveau-3 {
    background-color: var(--recolte-3);
}

.niveau-4 {
    background-color: var(--recolte-4);
}

.legende-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.legende-items span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legende-items small {
    color: var(--encre-3);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.plan-atouts {
    display: grid;
    gap: 14px;
    max-width: 860px;
    margin: 28px auto 0;
    padding: 0;
    list-style: none;
}

.plan-atouts li {
    padding: 16px 18px;
    border: 1px solid var(--trait);
    border-radius: var(--r-carte);
    background-color: var(--craie);
    color: var(--encre-2);
    font-size: 0.9375rem;
}

.plan-atouts strong {
    display: block;
    margin-bottom: 2px;
    color: var(--encre);
}

@media (min-width: 760px) {
    .plan-carte {
        padding: 18px;
    }

    .plan-atouts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .plan-zone {
        padding-bottom: 56px;
    }

    .fiche {
        position: absolute;
        right: 16px;
        bottom: 16px;
        width: 360px;
        margin: 0;
    }

    .plan-aide {
        position: absolute;
        left: 16px;
        bottom: 14px;
        margin: 0;
    }
}

/* ==========================================================================
   05 · Sur ordinateur
   ========================================================================== */

#aussi .navigateur {
    max-width: 1080px;
    margin-inline: auto;
}

.atouts {
    display: grid;
    gap: 28px;
    margin: clamp(40px, 6vw, 64px) 0 0;
    padding: 0;
    list-style: none;
}

.atouts h3 {
    margin: 14px 0 6px;
    font-size: 1.125rem;
    font-weight: 650;
}

.atouts p {
    margin: 0;
    color: var(--encre-2);
}

@media (min-width: 760px) {
    .atouts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 36px;
    }
}

/* ==========================================================================
   06 · Données (fond truffe)
   ========================================================================== */

.donnees {
    background-color: var(--truffe);
    background-image:
        radial-gradient(80% 80% at 100% 0%, rgba(46, 81, 53, 0.3) 0%, transparent 60%),
        var(--marbrure);
    background-size: auto, 630px 390px;
    color: var(--gleba);
}

.donnees .section-entete p {
    color: var(--texte-clair);
}

.donnees h2 {
    max-width: 18ch;
}

.donnees-grille {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.donnees-grille li {
    padding: 22px;
    border: 1px solid rgba(239, 231, 216, 0.12);
    border-radius: var(--r-carte);
    background-color: rgba(239, 231, 216, 0.04);
}

.donnees-grille .tuile-icone {
    background-color: rgba(239, 231, 216, 0.1);
    color: var(--gleba);
}

.donnees-grille h3 {
    margin: 16px 0 6px;
    font-size: 1.0625rem;
    font-weight: 650;
}

.donnees-grille p {
    margin: 0;
    color: var(--texte-clair);
    font-size: 0.9375rem;
}

@media (max-width: 639px) {
    .donnees-grille li {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 2px 16px;
        padding: 18px;
    }

    .donnees-grille .tuile-icone {
        grid-row: span 2;
    }

    .donnees-grille h3 {
        margin: 0 0 4px;
    }
}

@media (min-width: 640px) {
    .donnees-grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1040px) {
    .donnees-grille {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ==========================================================================
   07 · Qui sommes-nous : la carte d'appel aux retours
   ========================================================================== */

.retours {
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--trait);
    border-radius: var(--r-feuille);
    background-color: var(--craie);
    box-shadow: var(--ombre-haute);
}

.retours h3 {
    margin: 18px 0 8px;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.retours > p {
    color: var(--encre-2);
}

.retours .points {
    margin: 20px 0 26px;
}

.retours-note {
    margin: 12px 0 0;
    color: var(--encre-3);
    font-size: 0.8125rem;
    text-align: center;
}

/* ==========================================================================
   08 · Questions
   ========================================================================== */

.duo-questions {
    align-items: start;
}

@media (min-width: 960px) {
    .duo-questions {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }

    .duo-questions .duo-texte {
        position: sticky;
        top: calc(var(--entete-h) + 32px);
    }
}

.questions {
    border-top: 1px solid var(--trait-fort);
}

.question {
    border-bottom: 1px solid var(--trait-fort);
}

.question summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 2px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.question summary .icone {
    color: var(--encre-3);
    transition: transform 0.25s var(--sortie);
}

.question[open] summary .icone {
    transform: rotate(180deg);
}

.question p {
    max-width: 60ch;
    margin: -4px 2px 22px;
    color: var(--encre-2);
}

/* ==========================================================================
   Dernier appel et pied de page
   ========================================================================== */

.appel {
    padding-block: clamp(80px, 10vw, 136px);
    background-color: var(--truffe);
    background-image:
        radial-gradient(60% 90% at 50% 120%, rgba(46, 81, 53, 0.45) 0%, transparent 70%),
        var(--marbrure);
    background-size: auto, 630px 390px;
    color: var(--gleba);
    text-align: center;
}

.appel-contenu {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.appel h2 {
    max-width: 16ch;
    margin: 28px 0 16px;
    font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
    font-weight: 680;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.appel p {
    color: var(--texte-clair);
    font-size: 1.0625rem;
}

.appel .actions {
    margin-top: 18px;
}

.pied {
    padding: 52px 0 28px;
    color: var(--encre-2);
    font-size: 0.9375rem;
}

.pied-grille {
    display: grid;
    gap: 32px;
}

.pied-marque p {
    margin: 10px 0 0;
}

.pied-liens {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pied-liens h2 {
    margin-bottom: 4px;
    color: var(--encre);
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pied-liens a {
    color: var(--encre-2);
    text-decoration: none;
}

.pied-liens a:hover {
    color: var(--encre);
    text-decoration: underline;
}

.pied-bas {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--trait);
    color: var(--encre-3);
    font-size: 0.8125rem;
}

.pied-bas p {
    margin: 0;
}

@media (min-width: 760px) {
    .pied-grille {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ==========================================================================
   Page de texte (mentions légales)
   ========================================================================== */

.texte-page {
    max-width: 720px;
    padding-block: clamp(48px, 7vw, 88px);
}

.texte-page h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.texte-page h2 {
    margin: 36px 0 10px;
    font-size: 1.25rem;
    font-weight: 650;
}

.texte-page p,
.texte-page li {
    color: var(--encre-2);
}

/* ==========================================================================
   Apparitions au défilement (vitrine.js pose .js et .visible)
   ========================================================================== */

.js .apparition {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s ease, transform 0.8s var(--sortie);
}

.js .apparition.visible {
    opacity: 1;
    transform: none;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .js .apparition {
        opacity: 1;
        transform: none;
    }
}
