/* ==========================================================
   V2X Studio — « Concevoir » : l'IA dessine votre page d'accueil
   Même langage que l'accueil : noir et blanc, filets fins, pastilles, gris clair.
   (complète style.css ; la maquette elle-même vit dans une iframe : /assets/maquette/maquette.css)
   ========================================================== */

.cv { --cv-gris: #f2f2f0; --cv-trait: rgba(10, 10, 10, .13); --cv-texte: #3f3f46; --muted: #63636b; /* gris secondaire de l'accueil : 5,3:1 sur le gris clair */ position: relative; padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
@media (prefers-color-scheme: dark) { .cv { --cv-gris: #0e0e0f; --cv-trait: rgba(255, 255, 255, .14); --cv-texte: #c4c4c8; --muted: #8f8f95; } }

/* ---------- Introduction ---------- */
.cv-intro { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; text-align: left; } /* la colonne ne s'élargit plus au champ du guide : rien de rogné à 320 px (zoom 400 %) */
.cv-intro h1 { font-size: clamp(42px, 5vw, 92px); letter-spacing: -.06em; line-height: .92; max-width: 19ch; margin: 22px 0 24px; font-weight: 600; }
.cv-intro h1 .grad { background: none; -webkit-text-fill-color: currentColor; color: var(--muted); }
.cv-intro .hero-lead { max-width: 58ch; color: var(--cv-texte); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; text-align: left; margin: 0; }
.cv-intro .crumbs { margin-bottom: 26px; }

/* ---------- La zone de saisie libre ---------- */
.cv-box { position: relative; width: min(820px, 100%); margin-top: 34px; text-align: left; border-radius: 6px; background: var(--bg); box-shadow: 0 0 0 1px var(--cv-trait); transition: box-shadow .3s ease; }
.cv-box:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.cv-box textarea { display: block; width: 100%; min-height: 120px; max-height: 300px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 18px/1.55 var(--sans); padding: 22px 24px 8px; }
.cv-box textarea::placeholder { color: var(--muted); opacity: 1; } /* Firefox met .54 par défaut */
.cv-box-bas { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 22px; border-top: 1px solid var(--cv-trait); }
.cv-box-bas input { flex: 1; min-width: 0; height: 42px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; padding: 0; outline: 0; }
.cv-compte { font: 500 11px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.cv-envoi { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--ink); color: var(--bg); transition: transform .4s var(--ease), opacity .2s ease; }
.cv-envoi:hover { transform: rotate(-45deg); }
.cv-envoi:disabled { opacity: .3; cursor: default; transform: none; }
.cv-envoi svg { width: 17px; height: 17px; }
.cv-idees { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; max-width: 860px; }
.cv-idees button { border: 0; cursor: pointer; padding: 10px 15px; border-radius: 999px; background: transparent; color: var(--ink); font: 500 13.5px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--cv-trait); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.cv-idees button:hover { background: var(--ink); color: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
.cv-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); max-width: 600px; }
.cv-etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; width: min(1100px, 100%); margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; text-align: left; border-top: 1px solid var(--ink); }
.cv-etapes li { list-style: none; padding: 18px 24px 4px 0; }
.cv-etapes li + li { padding-left: 24px; border-left: 1px solid var(--cv-trait); }
.cv-etapes b { display: block; font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .06em; margin-bottom: 12px; }
.cv-etapes span { font-size: 15.5px; color: var(--cv-texte); }

/* ---------- Mode guidé : la carte de questions ---------- */
.cv-guide { position: relative; width: min(860px, 100%); margin-top: 36px; text-align: left; border-radius: 6px; background: var(--cv-gris); padding: 24px clamp(18px, 2.4vw, 32px) 22px; }
.cv-guide-tete { display: flex; align-items: center; gap: 12px; }
.cv-guide-tete b { display: block; font: 600 14px/1.2 var(--sans); }
.cv-guide-tete div > span { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.cv-guide-retour { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--ink); font: 500 13.5px var(--sans); padding: 6px 0; border-bottom: 1px solid currentColor; border-radius: 0; }
.cv-guide-fil { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.cv-guide-fil:empty { display: none; }
.cv-guide-fil span { padding: 7px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12.5px; }
.cv-guide-q { font: 600 clamp(24px, 2.8vw, 38px)/1.08 var(--sans); letter-spacing: -.045em; margin: 22px 0 6px; max-width: 24ch; }
.cv-guide-aide { color: var(--cv-texte); font-size: 14.5px; }
.cv-guide-aide:empty { display: none; }
.cv-guide.is-anim .cv-guide-q, .cv-guide.is-anim .cv-guide-choix { animation: cv-apparait .5s cubic-bezier(.2, .7, .2, 1) both; }
.cv-guide.is-anim .cv-guide-choix { animation-delay: .06s; }
@keyframes cv-apparait { from { opacity: 0; transform: translateY(10px); } }
.cv-guide-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cv-guide-choix > button { border: 0; cursor: pointer; padding: 12px 17px; border-radius: 999px; background: var(--bg); color: var(--ink); font: 500 14.5px/1.2 var(--sans); box-shadow: inset 0 0 0 1px var(--cv-trait); transition: background .2s ease, box-shadow .2s ease, color .2s ease; }
.cv-guide-choix > button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.cv-guide-choix > button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
.cv-guide-choix > .cv-ok { background: var(--ink); color: var(--bg); box-shadow: none; }
.cv-guide-choix > .cv-passer { background: transparent; color: var(--muted); box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.cv-guide-choix.cv-ambiances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cv-guide-choix > .cv-amb { padding: 0; overflow: hidden; text-align: left; border-radius: 6px; background: var(--bg); }
.cv-amb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.cv-amb:hover img { transform: scale(1.025); }
.cv-amb span { display: block; padding: 12px 14px 14px; }
.cv-amb b { display: block; font-size: 15px; letter-spacing: -.02em; }
.cv-amb small { color: var(--muted); font-size: 12.5px; }
.cv-guide-choix > .cv-amb[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.cv-guide-choix > .cv-amb-auto { grid-column: 1 / -1; text-align: center; border-radius: 999px; }
.cv-guide-libre { display: flex; gap: 10px; margin-top: 16px; }
.cv-guide-libre[hidden] { display: none; }
.cv-guide-libre input { flex: 1; min-width: 0; height: 48px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--cv-trait); background: var(--bg); padding: 0 20px; font: inherit; font-size: 15px; color: var(--ink); outline: 0; }
.cv-guide-libre input:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cv-guide-libre .cv-envoi { width: 48px; height: 48px; }
.cv-guide-barre { height: 1px; background: var(--cv-trait); margin-top: 22px; overflow: hidden; }
.cv-guide-barre i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .6s var(--ease); }
.cv-lien { margin-top: 18px; border: 0; background: none; cursor: pointer; color: var(--ink); font: 500 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.cv-libre { display: grid; justify-items: start; width: 100%; }
.cv-libre[hidden] { display: none; }

/* ---------- Le studio : conversation + maquette ---------- */
.cv-studio { width: min(1560px, 100% - 2 * var(--gutter, 24px)); margin: 8px auto 0; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; }
.cv-fil { position: sticky; top: calc(var(--header-h, 64px) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h, 64px) - 32px); border-radius: 6px; background: var(--bg); box-shadow: 0 0 0 1px var(--cv-trait); overflow: hidden; }
.cv-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.cv-m { font-size: 14.5px; line-height: 1.55; }
.cv-m--moi { align-self: flex-end; max-width: 88%; padding: 12px 15px; border-radius: 18px 18px 4px 18px; background: var(--ink); color: var(--bg); white-space: pre-wrap; }
.cv-m--ia { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.cv-ava { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; white-space: nowrap; background: var(--ink); color: var(--bg); font: 700 9px/1 var(--sans); letter-spacing: -.02em; }
.cv-ava i { font-style: normal; color: inherit; }
.cv-qui { font: 600 13px/1 var(--sans); margin: 8px 0 10px; }
.cv-qui span { font: 500 10.5px/1 var(--mono); color: var(--muted); letter-spacing: .06em; margin-left: 6px; text-transform: uppercase; }
.cv-txt { color: var(--cv-texte); white-space: pre-wrap; }
.cv-txt:empty { display: none; }
.cv-pas { list-style: none; display: grid; gap: 8px; margin: 2px 0 12px; padding: 0; }
.cv-pas li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); transition: color .3s ease; }
.cv-pas li::before { content: ""; width: 13px; height: 13px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--cv-trait); }
.cv-pas li.on { color: var(--ink); }
.cv-pas li.on::before { animation: cv-tourne .9s linear infinite; background: conic-gradient(from 0deg, transparent 0 70%, var(--ink) 70% 100%); -webkit-mask: radial-gradient(circle, transparent 4px, #000 4.5px); mask: radial-gradient(circle, transparent 4px, #000 4.5px); box-shadow: none; }
.cv-pas li.ok { color: var(--ink); }
.cv-pas li.ok::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6'/%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: none; }
@keyframes cv-tourne { to { transform: rotate(360deg); } }
.cv-resume { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cv-resume span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--cv-trait); font-size: 12.5px; color: var(--ink); }
.cv-resume i { width: 10px; height: 10px; border-radius: 50%; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cv-actions .btn { height: 40px; font-size: 13.5px; border-radius: 999px; box-shadow: none; }
.cv-err { color: var(--err); }
.cv-retouche { border-top: 1px solid var(--cv-trait); padding: 12px; background: var(--bg); }
.cv-retouche-l { display: flex; align-items: flex-end; gap: 8px; }
.cv-retouche textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; border: 0; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--cv-trait); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; padding: 13px 16px; outline: 0; }
.cv-retouche textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cv-retouche .cv-envoi { width: 46px; height: 46px; }
.cv-retouche-idees { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.cv-retouche-idees button { flex: none; border: 0; cursor: pointer; padding: 8px 12px; border-radius: 999px; background: transparent; color: var(--ink); font: 500 12.5px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--cv-trait); }
.cv-retouche-idees button:hover { background: var(--ink); color: var(--bg); }
.cv-retouche-n { font: 500 10.5px/1 var(--mono); color: var(--muted); margin-top: 8px; letter-spacing: .04em; text-transform: uppercase; }
.cv-retouche.is-off textarea, .cv-retouche.is-off button { opacity: .4; pointer-events: none; }

.cv-scene { min-width: 0; }
.cv-barre { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cv-seg { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--cv-trait); }
.cv-seg button { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: transparent; color: var(--muted); font: 500 13px/1 var(--sans); }
.cv-seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.cv-seg svg { width: 15px; height: 15px; }
.cv-url { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--cv-trait); font: 500 12px/1 var(--mono); color: var(--muted); overflow: hidden; white-space: nowrap; }
.cv-url svg { width: 12px; height: 12px; flex: none; }
.cv-url em { font-style: normal; padding: 4px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.cv-ico { border: 0; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--cv-trait); transition: background .2s, color .2s; }
.cv-ico:hover { background: var(--ink); color: var(--bg); }
.cv-ico svg { width: 15px; height: 15px; }

.cv-cadre { position: relative; height: min(78vh, 840px); min-height: 520px; border-radius: 6px; overflow: hidden; background: var(--cv-gris); box-shadow: 0 0 0 1px var(--cv-trait); }
.cv-ecran { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.cv-ecran iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: transparent; }
.cv-cadre.is-mobile .cv-ecran { left: 50%; top: 24px; bottom: 24px; width: 390px; transform: translateX(-50%); border-radius: 38px; box-shadow: 0 0 0 9px var(--ink); }
.cv-filigrane { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='220'%3E%3Ctext x='20' y='130' transform='rotate(-24 180 110)' font-family='Geist Mono, monospace' font-size='13' letter-spacing='3' fill='rgba(128,128,140,0.28)'%3EV2X STUDIO · APER%C3%87U%3C/text%3E%3C/svg%3E"); }
.cv-cadre:fullscreen { height: 100vh; border-radius: 0; }

/* Préparation, avant la première section */
.cv-prepa { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: var(--cv-gris); color: var(--ink); transition: opacity .6s ease; }
.cv-prepa.is-off { opacity: 0; pointer-events: none; }
.cv-prepa-in { width: min(600px, 84%); }
.cv-prepa-k { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cv-prepa-t { font: 600 clamp(26px, 3vw, 44px)/1.02 var(--sans); letter-spacing: -.05em; margin: 16px 0 28px; }
.cv-prepa-lignes { display: grid; gap: 10px; }
.cv-prepa-lignes i { height: 10px; border-radius: 99px; background: var(--cv-trait); animation: cv-pulse 1.4s ease-in-out infinite; }
.cv-prepa-lignes i:nth-child(2) { width: 82%; animation-delay: .15s; } .cv-prepa-lignes i:nth-child(3) { width: 64%; animation-delay: .3s; }
.cv-prepa-blocs { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-top: 22px; }
.cv-prepa-blocs i { height: 150px; border-radius: 4px; background: var(--cv-trait); animation: cv-pulse 1.4s ease-in-out infinite; }
.cv-prepa-blocs i + i { animation-delay: .2s; }
@keyframes cv-pulse { 50% { opacity: .45; } }
/* échec de la première maquette : plus de squelette animé */
.cv-prepa.is-err .cv-prepa-lignes, .cv-prepa.is-err .cv-prepa-blocs { display: none; }

/* La porte : coordonnées pour voir la suite */
.cv-porte { position: absolute; inset: auto 0 0; z-index: 4; display: flex; justify-content: center; align-items: flex-end; padding: 120px 20px 22px; background: color-mix(in srgb, var(--cv-gris) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Repliée : un bandeau discret en bas ; dépliée quand le visiteur arrive aux sections floutées, ou au clic */
.cv-porte:not(.is-open) { padding: 16px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cv-porte:not(.is-open) .cv-porte-c { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 18px; padding: 14px 14px 14px 20px; }
.cv-porte:not(.is-open) h2 { font-size: 17px; margin: 4px 0 0; grid-column: 1; }
.cv-porte:not(.is-open) .cv-ouvrir { grid-column: 2; grid-row: 1 / span 2; height: 48px; }
.cv-porte:not(.is-open) .cv-porte-p, .cv-porte:not(.is-open) form { display: none; }
.cv-porte.is-open .cv-ouvrir { display: none; }
@media (max-width: 640px) { .cv-porte:not(.is-open) .cv-porte-c { grid-template-columns: 1fr; } .cv-porte:not(.is-open) .cv-ouvrir { grid-column: 1; grid-row: auto; margin-top: 10px; } }
.cv-porte-c { width: min(580px, 100%); padding: 26px; border-radius: 6px; background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cv-porte-k { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cv-porte h2 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.045em; line-height: 1.02; margin: 12px 0 10px; }
.cv-porte p { font-size: 14px; color: var(--cv-texte); }
.cv-porte form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.cv-porte input[type=text], .cv-porte input[type=email], .cv-porte input[type=tel] { height: 48px; padding: 0 18px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--cv-trait); background: var(--bg); color: var(--ink); font: inherit; font-size: 14.5px; }
.cv-porte input:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--ink); }
.cv-porte .plein { grid-column: 1 / -1; }
.cv-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cv-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.cv-consent a { text-decoration: underline; }
.cv-porte .btn { height: 50px; justify-content: center; border-radius: 999px; background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: none; }
.cv-porte .form-status { grid-column: 1 / -1; font-size: 13px; }
.cv-porte .form-status.is-error { color: var(--err); }

@media (max-width: 960px) {
  .cv-studio { grid-template-columns: 1fr; }
  .cv-scene { order: -1; }
  .cv-fil { position: relative; top: 0; max-height: none; }
  .cv-msgs { max-height: 46vh; }
  .cv-cadre { height: 76vh; min-height: 560px; }
  .cv-cadre.is-mobile .cv-ecran { width: min(390px, calc(100% - 36px)); border-radius: 30px; box-shadow: 0 0 0 7px var(--ink); }
}
@media (max-width: 640px) {
  .cv-etapes { grid-template-columns: 1fr; }
  .cv-etapes li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--cv-trait); }
  .cv-box textarea { font-size: 16px; padding: 18px 18px 6px; }
  .cv-box-bas { flex-wrap: wrap; padding-left: 14px; }
  .cv-box-bas input { flex-basis: 100%; order: 2; }
  .cv-compte { order: 1; margin-right: auto; }
  .cv-envoi { order: 1; }
  .cv-porte { padding: 60px 10px 10px; }
  .cv-porte.is-open { inset: 0; align-items: flex-start; overflow-y: auto; padding: 12px 10px; }
  .cv-porte-c { padding: 20px; }
  .cv-porte form { grid-template-columns: 1fr; }
  .cv-url { display: none; }
  .cv-guide { padding: 20px 16px 16px; margin-top: 28px; }
  .cv-guide-choix > button { padding: 11px 14px; font-size: 14px; }
  .cv-guide-choix.cv-ambiances { gap: 8px; }
  .cv-amb span { padding: 8px 10px 10px; }
  .cv-amb small { display: none; }
}
@media (prefers-color-scheme: dark) {
  /* coches lisibles (trait sombre sur pastille claire) et cadre du téléphone visible sur l'aperçu */
  .cv-pas li.ok::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230a0a0a' stroke-width='2.4'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6'/%3E%3C/svg%3E"); }
  .cv-cadre.is-mobile .cv-ecran { box-shadow: 0 0 0 9px #3a3a40; }
}
