/* Compte client, roue, demande d'avis (12/11/2026, public/js/compte.js). Aux couleurs du thème. Champs à 16 px : pas de zoom sur iPhone. */
.cpt-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
.header__inner .cpt-btn { margin-left: 0; }
.cpt-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cpt-btn__pt { position: absolute; top: 7px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.cpt-btn--flotte { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top) + 12px); right: 60px; background: var(--surface); border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
html.cpt-ouvert, html.cpt-ouvert body { overflow: hidden; }

.cpt { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; justify-content: center; }
.cpt[hidden] { display: none; }
.cpt__voile { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .25s; }
.cpt.is-open .cpt__voile { opacity: 1; }
.cpt__feuille { position: relative; width: 100%; max-width: 480px; max-height: calc(100dvh - env(safe-area-inset-top) - 24px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--bg); color: var(--ink); border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.cpt.is-open .cpt__feuille { transform: none; }
.cpt__poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 6px; }
.cpt__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; touch-action: manipulation; }
.cpt__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cpt-titre { font-family: var(--font-title); text-transform: var(--title-case); font-size: 28px; line-height: 1.1; margin: 18px 48px 6px 0; }
.cpt-sous { color: var(--muted); margin: 0 0 16px; font-size: 15px; overflow-wrap: anywhere; }
.cpt-bascule { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface); border: var(--bw, 1px) solid var(--line); margin-bottom: 14px; }
.cpt-bascule button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 6px; border-radius: 999px; cursor: pointer; touch-action: manipulation; }
.cpt-bascule .is-on { background: var(--ink); color: var(--bg); }
.cpt-cadeau { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.cpt-form { display: grid; gap: 12px; }
.cpt-champ { position: relative; display: grid; gap: 4px; }
.cpt-champ span { font-size: 13px; font-weight: 700; color: var(--muted); }
.cpt-champ input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 14px 14px; border-radius: 14px; border: var(--bw, 1px) solid var(--line); background: var(--surface); color: var(--ink); }
.cpt-champ input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cpt-champ input[type=password], .cpt-champ input[name=cptMdp] { padding-right: 52px; }
.cpt-oeil { position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; touch-action: manipulation; }
.cpt-oeil svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cpt-case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--ink); cursor: pointer; }
.cpt-case input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.cpt-err { margin: 0; min-height: 0; color: #C0392B; font-size: 14px; font-weight: 600; }
.cpt-err:empty { display: none; }
.cpt-go--danger { background: #C0392B; color: #fff; }
.cpt-lien { border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; padding: 10px; cursor: pointer; justify-self: center; touch-action: manipulation; }
.cpt-sans { display: block; width: 100%; margin-top: 10px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 15px; padding: 14px; cursor: pointer; touch-action: manipulation; }
.cpt-legal { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 6px 0 0; text-align: center; }
.cpt-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.cpt-roue { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: var(--bw, 1px) solid var(--line); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 14px; font: inherit; cursor: pointer; touch-action: manipulation; }
.cpt-roue.is-pret { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cpt-roue__ico svg { width: 44px; height: 44px; display: block; }
.cpt-roue b { display: block; font-size: 17px; } .cpt-roue small { opacity: .8; font-size: 13px; }
.cpt-roue > span:nth-child(2) { flex: 1; }
.cpt-roue i, .cpt-reglages i { font-style: normal; font-size: 22px; opacity: .6; }
.cpt-gains, .cpt-cmds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cpt-gain { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--accent); }
.cpt-gain code { font: 700 15px ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.cpt-gain small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.cpt-cmds li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: var(--bw, 1px) solid var(--line); }
.cpt-cmds b { display: block; } .cpt-cmds small { color: var(--muted); font-size: 12px; }
.cpt-cmds em { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--surface); white-space: nowrap; }
.cpt-cmds em.is-validee { background: var(--accent); color: var(--accent-ink); }
.cpt-cmds em.is-annulee { opacity: .55; }
.cpt-vide { color: var(--muted); font-size: 14px; margin: 0; }
.cpt-reglages { display: grid; border-radius: 16px; overflow: hidden; border: var(--bw, 1px) solid var(--line); background: var(--surface); }
.cpt-reglages > * { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 14px; border: 0; border-bottom: var(--bw, 1px) solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; touch-action: manipulation; }
.cpt-reglages > *:last-child { border-bottom: 0; }
.cpt-reglages .is-danger { color: #C0392B; }
.cpt-interrupteur { position: relative; }
.cpt-interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cpt-interrupteur i { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--line); opacity: 1 !important; transition: background .2s; flex: none; }
.cpt-interrupteur i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.cpt-interrupteur input:checked + i { background: var(--accent); }
.cpt-interrupteur input:checked + i::after { transform: translateX(18px); }
.cpt-interrupteur input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* le panier */
.cpt-pan { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 0; padding: 14px; border-radius: 16px; border: var(--bw, 1px) solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; box-sizing: border-box; }
.cpt-pan > span:nth-child(2) { flex: 1; } .cpt-pan b { display: block; font-size: 15px; } .cpt-pan small { color: var(--muted); font-size: 13px; }
.cpt-pan__ico { font-size: 26px; line-height: 1; } .cpt-pan__ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cpt-pan i { font-style: normal; font-size: 22px; opacity: .6; }
.cpt-pan--moi { cursor: default; }
.cpt-pangains { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cpt-pangains p { width: 100%; margin: 0; font-weight: 700; font-size: 14px; }
.cpt-pangains small { width: 100%; color: var(--muted); font-size: 12px; }
.cpt-chip { border: 2px dashed var(--accent); background: none; color: var(--ink); border-radius: 999px; padding: 9px 14px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.cpt-chip.is-on { background: var(--accent); color: var(--accent-ink); border-style: solid; }

/* la roue */
.roue { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .25s; }
.roue[hidden] { display: none; }
.roue.is-open { opacity: 1; }
.roue__carte { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 26px; padding: 8px 20px 20px; box-sizing: border-box; text-align: center; transform: scale(.94); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.roue.is-open .roue__carte { transform: none; }
.roue__carte .cpt-titre { margin-right: 0; }
.roue__zone { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 6px auto 8px; }
.roue__svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,.18)); }
.roue__disque { transform-origin: 150px 150px; transform-box: view-box; }
.roue__svg text { font-family: var(--font-ui); }
.roue__fleche { position: absolute; top: -6px; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--ink); filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.roue__res { min-height: 54px; display: grid; gap: 4px; justify-items: center; margin-bottom: 10px; }
.roue__res b { font-size: 20px; } .roue__res small { color: var(--muted); font-size: 13px; }
.roue__res code { font: 700 18px ui-monospace, Menlo, monospace; letter-spacing: 2px; padding: 6px 12px; border: 2px dashed var(--accent); border-radius: 10px; }
.roue__gagne { color: var(--ink); }
.roue__chances { text-align: left; font-size: 13px; color: var(--muted); }
.roue__chances ul { list-style: none; padding: 0; margin: 0 0 8px; }
.roue__chances li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: var(--bw, 1px) solid var(--line); color: var(--ink); }
.roue__chances a { color: var(--ink); font-weight: 700; }

/* l'avis */
.cpt-avis { position: fixed; z-index: 880; left: 12px; right: 12px; bottom: calc(var(--nav-h, 64px) + 12px + env(safe-area-inset-bottom)); max-width: 456px; margin: 0 auto; padding: 16px; border-radius: 20px; background: var(--ink); color: var(--bg); box-shadow: 0 12px 32px rgba(0,0,0,.28); transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.cpt-avis.is-open { transform: none; }
.cpt-avis p { margin: 0 0 12px; font-size: 14px; line-height: 1.4; } .cpt-avis p b { display: block; font-size: 16px; }
.cpt-avis div { display: flex; gap: 8px; align-items: center; }
.cpt-avis .btn { min-height: 46px; flex: 1; }
.cpt-avis .cpt-lien { color: var(--bg); }
@media (prefers-reduced-motion: reduce) { .cpt__feuille, .roue__carte, .cpt-avis, .cpt__voile, .roue { transition: none; } }
