/* QG Capillaire — reprend les maquettes validées (canvas « Pistes visuelles » : M01, Q00 à Q16, M04, M05). */
:root {
  --aubergine: #24101F;
  --surface: #2E1528;
  --prune: #4A2340;
  --line: #5A3A52;
  --ivoire: #F7F1EA;
  --champagne: #D8B878;
  --mauve: #B08A9F;
  --mauve-clair: #E5D6DF;
  --corail: #F2785C;
  --titre: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --texte: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--aubergine); color: var(--ivoire); }
body { font-family: var(--texte); line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }

#app { min-height: 100vh; min-height: 100dvh; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; }
.scr {
  flex: 1; display: flex; flex-direction: column; gap: 14px;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) max(26px, env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  animation: in .3s ease-out both;
}
.scr.still { animation: none; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 700px) { #app { padding-top: 24px; } }

/* En-tête */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--titre); font-stretch: 125%; font-weight: 800; font-size: 11px; letter-spacing: .22em; color: var(--ivoire); background: none; border: 0; padding: 0; cursor: pointer; }
.top .s { font-size: 12px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--mauve); font-size: 12px; cursor: pointer; }
.link:hover { color: var(--ivoire); }

/* Typo (tailles des maquettes) */
.eb { margin: 0; font-family: var(--titre); font-stretch: 125%; font-weight: 700; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne); }
.t1 { margin: 0; font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 31px; line-height: 1.03; text-wrap: balance; }
.t2 { margin: 0; font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 21px; line-height: 1.06; text-wrap: balance; }
.t3 { margin: 0; font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 16px; line-height: 1.15; }
.p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--mauve-clair); }
.s { margin: 0; font-size: 12px; line-height: 1.45; color: var(--mauve); }
.gold { color: var(--champagne); }
.center { text-align: center; }

/* Boutons */
.btn { height: 52px; border-radius: 999px; border: 0; background: var(--champagne); color: var(--aubergine); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; flex: none; padding: 0 20px; cursor: pointer; width: 100%; transition: opacity .2s, transform .12s; }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ivoire); border: 1px solid var(--mauve); }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(216, 184, 120, .45); } 50% { box-shadow: 0 0 0 8px rgba(216, 184, 120, 0); } }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; }
.bottom { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.back { text-align: center; }

/* Visuels en arche */
.ph { border-radius: 90px 90px 12px 12px; background: linear-gradient(165deg, #7A5466, #3A1C32); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; position: relative; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph svg { width: 100%; height: 100%; }
.hero { height: 250px; border-radius: 170px 170px 16px 16px; align-items: center; }
.hero svg { width: 46%; height: auto; opacity: .9; }

/* Progression : la ligne qui se resserre */
.progress { display: block; width: 100%; height: 14px; overflow: visible; }

/* Choix */
.choices { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.qopt { width: 100%; text-align: left; border: 1.5px solid var(--line); border-radius: 16px; background: transparent; padding: 13px 14px; font-size: 14px; line-height: 1.35; cursor: pointer; transition: border-color .15s, background .15s; }
.qopt:hover { border-color: var(--mauve); }
.sel, .qopt[aria-pressed="true"], .opt[aria-pressed="true"] { border-color: var(--champagne); background: rgba(216, 184, 120, .1); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 4px); justify-self: center; }
.opt { text-align: left; border: 1.5px solid var(--line); border-radius: 16px; background: transparent; padding: 7px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--mauve); }
.opt .ph { height: 124px; border-radius: 70px 70px 12px 12px; }
.opt b { font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.opt .s { font-size: 10.5px; line-height: 1.3; }
.opt.small .ph { height: 110px; }
.opt.small span.lbl { font-size: 12px; line-height: 1.25; }
.sep { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--mauve); margin-top: 6px; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: var(--prune); }
.idk { width: 100%; border: 1.5px dashed var(--line); border-radius: 16px; background: transparent; padding: 12px 14px; font-size: 14px; color: var(--mauve-clair); text-align: center; cursor: pointer; }
.idk[aria-pressed="true"] { border-style: solid; border-color: var(--champagne); background: rgba(216, 184, 120, .1); color: var(--ivoire); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair .ph { height: 180px; }
.cap { position: relative; z-index: 1; font-size: 10px; padding: 10px; text-align: center; color: var(--ivoire); }

/* Prénom */
.field { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: transparent; color: var(--ivoire); font-size: 15px; padding: 0 14px; }
.field:focus { border-color: var(--champagne); outline: none; }
.field::placeholder { color: #8E6A80; }

/* Cartes */
.card { border: 1px solid var(--prune); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.fill { background: var(--surface); border-color: var(--surface); }

/* Profil gratuit */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 0; }
.chip span { display: block; font-size: 10px; color: var(--mauve); }
.chip b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.alert { border: 2.5px solid var(--corail); background: rgba(242, 120, 92, .12); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 5px; }
.alert .h { display: flex; align-items: center; gap: 8px; font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 14px; line-height: 1.2; color: var(--corail); }
.bang { width: 20px; height: 20px; border-radius: 999px; background: var(--corail); color: var(--aubergine); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.alert .p { font-size: 12px; color: var(--ivoire); }
.blur { filter: blur(4px); user-select: none; }
.cta-card { border: 0; width: 100%; border-radius: 22px; background: var(--champagne); color: var(--aubergine); padding: 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; }
.cta-card b { font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 17px; line-height: 1.15; }
.cta-card span { font-size: 12px; line-height: 1.4; }

/* Offre (M05) */
.pill { align-self: flex-start; display: inline-flex; align-items: center; border: 1px solid var(--champagne); border-radius: 999px; padding: 4px 10px; font-size: 11px; color: var(--champagne); }
.price { margin: 0; font-family: var(--titre); font-stretch: 112%; font-weight: 800; font-size: 30px; line-height: 1; }
.sheet { background: var(--ivoire); color: var(--aubergine); border-radius: 26px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sheet .s { color: #7A5466; }
.sheet .btn { background: var(--aubergine); color: var(--champagne); margin-top: auto; }
.list-check { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list-check li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; }
.list-check li::before { content: ''; width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 999px; background: rgba(36, 16, 31, .08); box-shadow: inset 0 0 0 1.5px var(--aubergine); }

.loader { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.loader svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { .scr, .pulse, .loader svg { animation: none; } }
