/* UTILITÉ : feuille du parcours « Composez votre Box » (composer.html, en/composer.html) : une question par écran sur fond bleu eau, gros chiffres en
   serif, liste des IA avec leurs conditions, puis la présentation finale sur fond noir (forme vivante, bulles). Aucun style n'est écrit dans la page :
   la politique de sécurité du site le bloque. Palette hydroélectricité (bleu eau, blanc, noir) ; aucun mauve ; aucun prix.
   LIEN : public/composer.html, public/en/composer.html, public/js/composer.js ; polices de public/fonts (Libre Caslon Text, Source Sans 3 via app.css). */

@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/librecaslontext-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/librecaslontext-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.cb-page { --cb-eau: #0b6e94; --cb-encre: #06202c; --cb-vif: #0b5cff; --cb-nuit: #071a24; --cb-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif; --cb-corps: "Source Sans 3", "Segoe UI", system-ui, sans-serif; background: var(--cb-nuit); margin: 0; }
.cb-page .nav { position: static; }

/* La page tient dans l'écran : l'en-tête du site, puis la scène qui prend tout le reste. La liste des IA défile DANS la scène, la jauge et le bouton
   restent visibles. Sous 560 px de haut (cellulaire couché), la page défile au lieu d'écraser la scène. */
.cb-page { box-sizing: border-box; display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; min-height: 560px; }
.cb-page main { min-height: 0; display: flex; justify-content: center; }

/* La scène : tout l'écran sur un cellulaire, une colonne centrée sur un grand écran. */
.cb-scene { position: relative; box-sizing: border-box; width: 100%; max-width: 560px; height: 100%; overflow: hidden; background: var(--cb-eau); color: #fff; display: flex; flex-direction: column; font-family: var(--cb-corps); transition: background .5s ease; }
.cb-scene.cb-revele { background: #000; }
@media (min-width: 620px) {
  .cb-page main { box-sizing: border-box; padding: 22px 0; align-items: center; }
  .cb-scene { max-height: 860px; border-radius: 28px; }
}

/* Le motif : des silhouettes de boîtes, en traits fins. */
.cb-motif { position: absolute; inset: 0; pointer-events: none; }
.cb-motif i { position: absolute; border: 1.5px solid rgba(6, 32, 44, .5); border-radius: 10px; }
.cb-motif i:nth-child(1) { left: -50px; top: 9%; width: 170px; height: 44px; transform: rotate(-32deg); }
.cb-motif i:nth-child(2) { left: 38%; top: -4%; width: 44px; height: 190px; transform: rotate(28deg); }
.cb-motif i:nth-child(3) { right: -40px; top: 18%; width: 190px; height: 44px; transform: rotate(8deg); }
.cb-motif i:nth-child(4) { left: -70px; top: 47%; width: 200px; height: 46px; transform: rotate(18deg); }
.cb-motif i:nth-child(5) { right: -60px; top: 44%; width: 170px; height: 44px; transform: rotate(-14deg); }
.cb-motif i:nth-child(6) { left: 10px; top: 76%; width: 150px; height: 44px; transform: rotate(-38deg); }
.cb-motif i:nth-child(7) { right: -30px; top: 71%; width: 200px; height: 46px; transform: rotate(10deg); }
.cb-motif i:nth-child(8) { left: 32%; top: 91%; width: 190px; height: 44px; transform: rotate(16deg); }
.cb-scene.cb-revele .cb-motif { display: none; }
.cb-forme { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.cb-scene.cb-revele .cb-forme { display: block; }

.cb-tete { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 20px 0; }
.cb-marque { font-size: .82rem; font-weight: 600; letter-spacing: .38em; }
.cb-zero { background: none; border: 0; color: #fff; font: 500 .85rem var(--cb-corps); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }

.cb-corps { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 10px 22px; overflow-y: auto; scrollbar-width: none; }
.cb-corps::-webkit-scrollbar { display: none; }
.cb-corps::before, .cb-corps::after { content: ""; flex: 1; }
.cb-corps.cb-plein::before, .cb-corps.cb-plein::after, .cb-scene.cb-revele .cb-corps::before, .cb-scene.cb-revele .cb-corps::after { display: none; }
.cb-scene.cb-revele .cb-corps { align-items: flex-start; padding-top: 16px; }
.cb-corps > * { margin: 0; animation: cb-monte .38s ease both; }
.cb-corps.cb-fixe > * { animation: none; }
@keyframes cb-monte { from { opacity: 0; transform: translateY(16px); } }

.cb-q { font-size: 1.36rem; font-weight: 600; line-height: 1.28; }
.cb-no { font-size: .82rem; font-weight: 400; margin-right: 7px; opacity: .88; font-variant-numeric: tabular-nums; }
.cb-aide { font-size: 1rem; line-height: 1.4; opacity: .92; }
.cb-aide a, .cb-note a { color: #fff; font-weight: 600; text-underline-offset: 3px; }

.cb-opt, .cb-ia { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; text-align: left; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .78); color: #fff; border-radius: 8px; padding: 10px 12px; font: 600 1.02rem/1.25 var(--cb-corps); cursor: pointer; text-decoration: none; }
.cb-opt small, .cb-ia small { display: block; font-size: .82rem; font-weight: 400; opacity: .88; }
.cb-ia { flex: none; padding: 7px 10px; font-size: 1rem; }
.cb-ia small.cb-cond { opacity: 1; font-weight: 600; }
.cb-lettre { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 5px; font-size: .8rem; font-weight: 600; }
.cb-opt.cb-pris, .cb-ia.cb-pris { background: #fff; color: var(--cb-encre); }
.cb-ia:disabled { cursor: default; }
.cb-ia.cb-trop, .cb-ia.cb-avenir { border-style: dashed; background: transparent; }
.cb-ia.cb-avenir { cursor: default; opacity: .72; }

.cb-ok { align-self: flex-start; background: var(--cb-encre); color: #fff; border: 0; border-radius: 8px; padding: 11px 18px; font: 600 1.02rem var(--cb-corps); cursor: pointer; text-decoration: none; }
.cb-ok:disabled { opacity: .5; cursor: default; }
.cb-ok.cb-fort { background: var(--cb-vif); align-self: stretch; text-align: center; margin-top: auto; padding: 14px; font-size: 1.08rem; }

.cb-grand { display: flex; align-items: baseline; gap: 12px; }
.cb-chiffre { font: 400 5.2rem/0.95 var(--cb-serif); font-variant-numeric: tabular-nums lining-nums; }
.cb-tiret { width: 64px; height: 1.5px; background: rgba(255, 255, 255, .78); align-self: center; }
.cb-unite { font: 400 1.7rem/1 var(--cb-serif); opacity: .9; }
.cb-regle { display: flex; align-items: center; gap: 10px; }
.cb-rond { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #fff; background: none; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cb-rond:disabled { opacity: .45; cursor: default; }
.cb-regle input[type="range"] { flex: 1; min-width: 0; accent-color: var(--cb-encre); }
.cb-compte { min-width: 2.2ch; text-align: center; font: 400 1.9rem/1 var(--cb-serif); font-variant-numeric: tabular-nums lining-nums; }
.cb-serif { font: 400 2.1rem/1.1 var(--cb-serif); }

.cb-liste { flex: 1 1 auto; min-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 0 2px 24px 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .6) transparent; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); }
.cb-liste > * { margin: 0; }
.cb-groupe { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .9; padding-top: 6px; }
.cb-ligne { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.cb-jauge { flex: none; height: 6px; border-radius: 4px; background: rgba(6, 32, 44, .45); overflow: hidden; }
.cb-jauge i { display: block; height: 100%; width: 0; background: #fff; transition: width .3s ease; }
.cb-note { font-size: .9rem; line-height: 1.35; background: var(--cb-encre); border-radius: 8px; padding: 8px 10px; }
.cb-note.cb-erreur { background: #7a1a14; }
.cb-lien { background: none; border: 0; color: #fff; font: 600 .9rem var(--cb-corps); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }

.cb-champ { box-sizing: border-box; background: none; border: 0; border-bottom: 1.5px solid #fff; color: #fff; font: 400 1.4rem var(--cb-corps); padding: 6px 0; width: 100%; border-radius: 0; }
.cb-champ::placeholder { color: rgba(255, 255, 255, .58); }
.cb-etapes { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 4px; font-size: .98rem; line-height: 1.35; }
.cb-etapes li { margin: 0; }

.cb-bulle { max-width: 88%; padding: 10px 14px; border-radius: 9px; background: linear-gradient(90deg, #000 55%, #0b3fd6 135%); color: #f4f7fb; font-size: 1.08rem; font-weight: 600; line-height: 1.3; letter-spacing: .02em; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.cb-phrase { font: 400 1.55rem/1.25 var(--cb-serif); text-shadow: 0 2px 14px #000; padding-top: 4px; }

.cb-pied { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 0 20px 16px; }
.cb-prog { flex: 1; min-width: 0; font-size: .74rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.cb-trait { height: 3px; background: rgba(6, 32, 44, .45); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.cb-trait i { display: block; height: 100%; width: 0; background: #fff; transition: width .35s ease; }
.cb-scene.cb-revele .cb-trait { background: rgba(255, 255, 255, .25); }
.cb-nav { display: flex; gap: 2px; }
.cb-nav button { width: 40px; height: 36px; border: 0; background: var(--cb-encre); color: #fff; font-size: 1rem; cursor: pointer; }
.cb-nav button:disabled { opacity: .4; cursor: default; }
.cb-scene.cb-revele .cb-nav button { background: #16202c; }
.cb-nav button:first-child { border-radius: 6px 0 0 6px; }
.cb-nav button:last-child { border-radius: 0 6px 6px 0; }

.cb-scene button:focus-visible, .cb-scene a:focus-visible, .cb-scene input:focus-visible { outline: 3px solid #3ddc97; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .cb-corps > * { animation: none; }
  .cb-scene, .cb-jauge i, .cb-trait i { transition: none; }
}

h1.cb-marque { margin: 0; line-height: 1; text-transform: uppercase; }

.cb-prix { display: flex; flex-direction: column; gap: 8px; background: var(--cb-encre); border-radius: 10px; padding: 12px 14px; }
.cb-prix .cb-ligne { font-size: .95rem; letter-spacing: 0; }
.cb-prix .cb-total { border-top: 1px solid rgba(255, 255, 255, .4); padding-top: 8px; font-weight: 600; font-size: 1.1rem; }
