/* Caselia : même style que le site de ClemalaERP (Bruno, 2026-11-29) — police du système, fond gris clair et cartes blanches,
   mode sombre automatique, aucun dégradé, rien d'externe (CSP) — avec les couleurs de l'icône de Caselia (bleu, menthe, soleil, marine). */
:root {
    --fond: #f5f5f7;
    --surface: #ffffff;
    --texte: #14243f;      /* le toit de l'icône */
    --secondaire: #6e6e73;
    --trait: rgba(60, 60, 67, .18);
    --bleu: #2e6fb8;       /* la barre du milieu */
    --bleu-texte: #245c9c; /* contraste 6,3 sur blanc */
    --menthe: #5cc2a6;
    --soleil: #ffd15c;
    --rayon: 14px;
    --marge: clamp(16px, 5vw, 48px);
    --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    --chiffres: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --fond: #000000;
        --surface: #1c1c1e;
        --texte: #f5f5f7;
        --secondaire: #98989d;
        --trait: rgba(84, 84, 88, .6);
        --bleu: #4a8fd8;
        --bleu-texte: #8cbcf0;
    }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1.0625rem/1.5 var(--police); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--bleu-texte); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; margin-bottom: 20px; }

/* ---- Bandeau du haut, translucide comme une barre de navigation ---- */
.haut {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 6px var(--marge);
    background: color-mix(in srgb, var(--fond) 80%, transparent);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 10px; color: var(--texte); font-weight: 600; font-size: 1.0625rem; }
.marque:hover { text-decoration: none; }
.marque img { background: #fff; border-radius: 22%; }
.langues { display: flex; gap: 2px; }
.langues a { color: var(--secondaire); padding: 10px 8px; min-width: 44px; text-align: center; font-size: .9375rem; }
.langues a[aria-current] { color: var(--texte); font-weight: 600; }

/* ---- Ouverture ---- */
main { overflow-x: clip; }
.ouverture { text-align: center; max-width: 760px; margin: 0 auto; padding: clamp(48px, 9vw, 112px) var(--marge) clamp(32px, 5vw, 56px); }
.icone { border-radius: 22%; box-shadow: 0 0 0 1px var(--trait), 0 8px 24px rgba(0, 0, 0, .12); margin-bottom: 24px; }
.ouverture h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; max-width: 17ch; margin: 0 auto; }
.accroche { font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.4; color: var(--secondaire); margin: 20px auto 32px; max-width: 46ch; }
.bientot { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 12px 22px; border-radius: 980px; background: var(--bleu); color: #fff; font-weight: 500; }
.note { color: var(--secondaire); font-size: .9375rem; margin: 16px 0 0; }

/* Le ticket : papier blanc même en mode sombre, bord bas dentelé ; ombre sur le figure car le masque couperait l'ombre. */
.ticket { margin: 0 auto clamp(48px, 8vw, 96px); width: min(calc(100% - 32px), 340px); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .08)) drop-shadow(0 12px 24px rgba(0, 0, 0, .12)); }
.papier { background: #fff; color: #14243f; padding: 26px 24px 40px; font: .875rem/1.5 var(--chiffres); --dent: 10px;
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--dent)) 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--dent)) 100%; }
.papier p { margin: 0; }
.ticket-magasin { text-align: center; font-weight: 700; letter-spacing: .08em; padding-bottom: 12px; border-bottom: 1px dashed rgba(20, 36, 63, .35); margin-bottom: 10px !important; }
.papier ul { list-style: none; margin: 0; padding: 0; }
.papier li, .ticket-total { display: flex; justify-content: space-between; gap: 12px; }
.papier li span:last-child, .ticket-total span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.papier li span:first-child { box-shadow: inset 4px 0 var(--menthe); padding-left: 10px; }
.papier li:nth-child(3n+2) span:first-child { box-shadow: inset 4px 0 #2e6fb8; }
.papier li:nth-child(3n) span:first-child { box-shadow: inset 4px 0 var(--soleil); }
.ticket-total { font-weight: 700; font-size: 1rem; margin-top: 10px !important; padding-top: 10px; border-top: 1px dashed rgba(20, 36, 63, .35); }
.ticket-lu { margin-top: 18px !important; text-align: center; color: #2b7f68; font-family: var(--police); font-weight: 600; }

/* ---- Blocs ---- */
.bloc { max-width: 1040px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--marge); }
.etroit { max-width: 760px; }

/* Écrans de l'app : texte et capture en rangées, alternées sur grand écran (comme les fonctions de l'ERP). */
.ecrans { display: grid; gap: clamp(48px, 8vw, 96px); }
.ecran { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.ecran:nth-child(even) { grid-template-columns: 3fr 2fr; }
.ecran:nth-child(even) > div:first-child { order: 2; }
.ecran h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.ecran p { margin: 0; color: var(--secondaire); font-size: 1.1875rem; }
.ecran img { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 0 0 1px var(--trait), 0 8px 24px rgba(0, 0, 0, .12); justify-self: center; }

.cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.carte { background: var(--surface); border-radius: var(--rayon); padding: 24px; }
.carte h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.carte p { margin: 0; color: var(--secondaire); }

.liste-faq { background: var(--surface); border-radius: var(--rayon); }
.faq + .faq { border-top: 1px solid var(--trait); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 14px 16px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "›"; color: var(--secondaire); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(90deg); }
.faq p { margin: 0; padding: 0 16px 16px; color: var(--secondaire); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

.contact { margin-top: 32px; background: var(--surface); border-radius: var(--rayon); padding: 24px; }
.contact h2 { font-size: 1.1875rem; font-weight: 600; margin-bottom: 8px; }
.contact p { margin: 0 0 12px; color: var(--secondaire); }
.courriel { font-weight: 600; }

/* ---- Pied ---- */
.bas { border-top: 1px solid var(--trait); margin-top: clamp(32px, 6vw, 64px); padding: 24px var(--marge) 32px; text-align: center; color: var(--secondaire); font-size: .8125rem; }
.bas p { margin: 4px 0; }

/* ---- Page de confidentialité ---- */
.lecture h1 { font-size: clamp(2rem, 5vw, 3rem); margin: clamp(16px, 3vw, 32px) 0 12px; }
.lecture .note { margin: 0 0 24px; }
.lecture h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.lecture p, .lecture li { color: var(--secondaire); }
.lecture p { margin: 0 0 1em; }
.lecture ul { padding-left: 1.2em; margin: 8px 0; }
.lecture li { margin: 4px 0; }

@media (max-width: 720px) {
    .ecran, .ecran:nth-child(even) { grid-template-columns: 1fr; }
    .ecran:nth-child(even) > div:first-child { order: 0; }
    .cartes { grid-template-columns: 1fr; }
}

/* ---- Capture agrandie d'un clic (caselia.js), comme sur le site de l'ERP ---- */
.agrandir { display: block; cursor: zoom-in; }
.ecran .agrandir { justify-self: center; width: 100%; }
.zoom { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; cursor: zoom-out; }
.zoom::backdrop { background: rgba(0, 0, 0, .8); }
.zoom img { display: block; max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 8px; }
/* ---- iPhone posé sur la capture du Mac, avec son contour, comme sur le site de l'ERP (Bruno, 2026-11-29) ---- */
.avec-telephone { position: relative; margin-bottom: 8%; width: 100%; justify-self: center; }
.avec-telephone .telephone { position: absolute; right: -3%; bottom: -12%; width: 23%; }
.ecran:nth-child(even) .avec-telephone .telephone { right: auto; left: -3%; }
.avec-telephone .en-face { right: auto; left: -3%; }
.ecran:nth-child(even) .avec-telephone .en-face { left: auto; right: -3%; }
.agrandir:has(> .iphone) { padding: 3.6%; background: #1b1e22; border-radius: 15% / 7%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 0 0 1px var(--trait), 0 12px 30px rgba(16, 42, 58, .22); }
.agrandir > .iphone { width: 100%; height: auto; display: block; border-radius: 11.5% / 5.3%; box-shadow: none; }
.avec-telephone .telephone .agrandir { box-shadow: 0 0 0 1px var(--trait), 0 16px 36px rgba(16, 42, 58, .35); }
@media (max-width: 720px) {
    .avec-telephone .telephone, .ecran:nth-child(even) .avec-telephone .telephone { right: 0; left: auto; width: 28%; }
    .avec-telephone .en-face, .ecran:nth-child(even) .avec-telephone .en-face { left: 0; right: auto; }
}
/* Prévisionnel : la capture principale, puis deux vignettes côte à côte, agrandissables d'un clic */
.ecran p + p { margin-top: .75em; }
.avec-autres { display: grid; gap: 12px; width: 100%; }
.autres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* L'ouverture : l'écran de connexion sur iPhone à côté du ticket */
.vitrine { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(24px, 5vw, 64px); margin: 0 auto clamp(48px, 8vw, 96px); padding: 0 var(--marge); }
.vitrine .ticket { margin: 0; }
.vitrine .telephone { width: 190px; }

.fermer { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #1d1d1f; font-size: 1.75rem; line-height: 1; cursor: pointer; }
@media (max-width: 720px) { .vitrine .telephone { width: 150px; } }
