/* Questionnaire Dargency — grammaire Qonto : monochrome, données et produits en pastel,
   jamais de violet ni de dégradé. Polices auto-hébergées (servies depuis /polices). */
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(/polices/instrument-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(/polices/instrument-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(/polices/instrument-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Signature'; font-weight: 400; font-display: swap; src: url(/polices/homemade-apple-latin-400-normal.woff2) format('woff2'); }

:root {
  --bg: #F9F9F9; --carte: #FFFFFF; --encre: #050505; --gris: #616161; --pale: #8F8F8F;
  --ligne: #E8E8E8; --ligne-forte: #D6D6D6; --doux: #F2F2F2;
  --bouton: #1D1D1B; --bouton-encre: #FFFFFF;
  --erreur: #B81818; --erreur-fond: #FFE9DE; --ok: #0F7A3D;
  /* produits : aplat pastel + encre lisible dessus */
  --ciel: #9BC5EA; --ciel-encre: #174A75; --ciel-voile: #EAF3FB;
  --saumon: #FFB590; --saumon-encre: #8A3510; --saumon-voile: #FFF1E9;
  --menthe: #9BE5DA; --menthe-encre: #0D5F53; --menthe-voile: #E9F8F5;
  --vert: #A5F2A3; --vert-encre: #0F6A33; --vert-voile: #ECFBEB;
  --jaune: #F5F596; --jaune-encre: #5E5A00; --jaune-voile: #FBFBE3;
  --p: var(--ciel); --p-encre: var(--ciel-encre); --p-voile: var(--ciel-voile);
  --r: 8px; --r-petit: 6px;
  --sortie: cubic-bezier(0.23, 1, 0.32, 1);
  --ombre: 0 1px 2px rgba(5, 5, 5, .04), 0 4px 16px rgba(5, 5, 5, .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0D0D; --carte: #161616; --encre: #F4F4F4; --gris: #A8A8A8; --pale: #7D7D7D;
    --ligne: #262626; --ligne-forte: #343434; --doux: #1D1D1D;
    --bouton: #F4F4F4; --bouton-encre: #0D0D0D; --erreur: #FF9C7A; --erreur-fond: #3A1E14; --ok: #A5F2A3;
    --ciel: #3E6A8F; --ciel-encre: #CFE4F6; --ciel-voile: #15212B;
    --saumon: #A35E3D; --saumon-encre: #FFD8C4; --saumon-voile: #2A1A12;
    --menthe: #2F7D71; --menthe-encre: #C9F2EB; --menthe-voile: #12221F;
    --vert: #3C7F3B; --vert-encre: #CFF7CE; --vert-voile: #142114;
    --jaune: #7C7A2A; --jaune-encre: #F5F5C2; --jaune-voile: #1F1F12;
    --ombre: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0D0D; --carte: #161616; --encre: #F4F4F4; --gris: #A8A8A8; --pale: #7D7D7D;
  --ligne: #262626; --ligne-forte: #343434; --doux: #1D1D1D;
  --bouton: #F4F4F4; --bouton-encre: #0D0D0D; --erreur: #FF9C7A; --erreur-fond: #3A1E14; --ok: #A5F2A3;
  --ciel: #3E6A8F; --ciel-encre: #CFE4F6; --ciel-voile: #15212B;
  --saumon: #A35E3D; --saumon-encre: #FFD8C4; --saumon-voile: #2A1A12;
  --menthe: #2F7D71; --menthe-encre: #C9F2EB; --menthe-voile: #12221F;
  --vert: #3C7F3B; --vert-encre: #CFF7CE; --vert-voile: #142114;
  --jaune: #7C7A2A; --jaune-encre: #F5F5C2; --jaune-voile: #1F1F12;
  --ombre: none;
}
[data-c="ciel"], .c-ciel { --p: var(--ciel); --p-encre: var(--ciel-encre); --p-voile: var(--ciel-voile); }
[data-c="saumon"], .c-saumon { --p: var(--saumon); --p-encre: var(--saumon-encre); --p-voile: var(--saumon-voile); }
[data-c="menthe"], .c-menthe { --p: var(--menthe); --p-encre: var(--menthe-encre); --p-voile: var(--menthe-voile); }
[data-c="vert"], .c-vert { --p: var(--vert); --p-encre: var(--vert-encre); --p-voile: var(--vert-voile); }
[data-c="jaune"], .c-jaune { --p: var(--jaune); --p-encre: var(--jaune-encre); --p-voile: var(--jaune-voile); }

* { box-sizing: border-box; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--encre);
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- barre du haut ---- */
.haut {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.haut-in { max-width: 640px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.marque { font-weight: 600; font-size: 15px; letter-spacing: -.01em; background: none; border: 0; padding: 0; cursor: pointer; }
.marque b { font-weight: 600; color: var(--pale); }
.etape { margin-left: auto; color: var(--gris); font-size: 13px; font-variant-numeric: tabular-nums; }
.mode { border: 1px solid var(--ligne); background: var(--carte); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--gris); }
.mode svg { width: 16px; height: 16px; }
.barre { height: 3px; background: var(--ligne); }
.barre i { display: block; height: 100%; width: 0; background: var(--p-encre); transform-origin: left; transition: width 400ms var(--sortie); }

/* ---- colonne ---- */
main { max-width: 640px; margin: 0 auto; padding: 24px 16px 140px; }
.ecran { outline: none; }
.ecran > * { animation: entre 320ms var(--sortie) both; }
.ecran > *:nth-child(2) { animation-delay: 30ms; } .ecran > *:nth-child(3) { animation-delay: 60ms; }
.ecran > *:nth-child(4) { animation-delay: 90ms; } .ecran > *:nth-child(n+5) { animation-delay: 120ms; }
.ecran.retour > * { animation-name: entre-retour; }
@keyframes entre { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes entre-retour { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ecran > *, .ecran.retour > * { animation: fondu 200ms ease both; animation-delay: 0ms !important; }
  @keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
}

.dessin { width: 120px; height: 96px; display: block; margin: 8px 0 20px -8px; color: var(--encre); }
.dessin .t { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dessin .f { fill: var(--p); stroke: none; }
.dessin .b { fill: var(--carte); stroke: none; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; margin: 0 0 10px; text-wrap: balance; }
.intro { color: var(--gris); margin: 0 0 24px; font-size: 15px; text-wrap: pretty; }
h1 + .champs, h1 + .cartes { margin-top: 24px; }

/* ---- accueil ---- */
.accueil h1 { font-size: 38px; max-width: 14ch; }
.accueil .intro { font-size: 16px; max-width: 46ch; }
.produits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 28px 0 32px; }
.produit {
  position: relative; text-align: left; border: 0; border-radius: var(--r); padding: 18px 18px 16px; min-height: 196px;
  background: var(--p-voile); cursor: pointer; display: flex; flex-direction: column; overflow: hidden;
  transition: transform 160ms var(--sortie), box-shadow 200ms ease;
}
.produit .dessin { width: 104px; height: 83px; margin: -4px 0 0 -6px; flex: none; }
.produit strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 12px; }
.produit span { color: var(--gris); font-size: 13px; margin-top: 2px; }
.produit em { font-style: normal; font-size: 12px; color: var(--p-encre); margin-top: auto; padding-top: 10px; font-weight: 500; }
.produit:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .produit:hover { box-shadow: inset 0 0 0 1.5px var(--p-encre); } }
.rassure { display: grid; gap: 14px; padding: 20px 0 0; border-top: 1px solid var(--ligne); }
.rassure div { display: flex; gap: 12px; align-items: flex-start; color: var(--gris); font-size: 14px; }
.rassure svg { width: 20px; height: 20px; flex: none; color: var(--encre); margin-top: 1px; }
.rassure b { color: var(--encre); font-weight: 500; }

/* ---- cartes de choix ---- */
.cartes { display: grid; gap: 10px; }
.cartes.illustrees { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.carte {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 16px 48px 16px 18px; min-height: 60px;
  cursor: pointer; box-shadow: var(--ombre);
  transition: transform 160ms var(--sortie), border-color 150ms ease, background-color 150ms ease;
}
.carte:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .carte:hover { border-color: var(--ligne-forte); } }
.carte .txt { display: grid; gap: 2px; }
.carte strong { font-weight: 500; font-size: 15px; }
.carte small { color: var(--gris); font-size: 13px; }
.carte::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 999px;
  border: 1.5px solid var(--ligne-forte); transition: background-color 150ms ease, border-color 150ms ease;
}
.carte[aria-checked="true"], .carte[aria-pressed="true"] { border-color: var(--p-encre); background: var(--p-voile); box-shadow: inset 0 0 0 0.5px var(--p-encre); }
.carte[aria-checked="true"]::after, .carte[aria-pressed="true"]::after {
  border-color: var(--p-encre); background: var(--p-encre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 10 3 3 5-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.multi .carte::after { border-radius: 5px; }
.cartes.illustrees .carte { flex-direction: column; align-items: flex-start; padding: 14px 16px 16px; min-height: 0; }
.cartes.illustrees .carte::after { top: 18px; margin-top: 0; }
.carte .dessin { width: 90px; height: 72px; margin: 0 0 4px -6px; }
/* Nombre impair de cartes illustrées (ex. « Vous êtes… » de l'immeuble), sur téléphone : une par
   ligne, le dessin à gauche, plutôt qu'une carte seule sur la dernière ligne (Franck, 17/10/2026). */
@media (max-width: 719px) { /* sur ordinateur, elles restent côte à côte */
  .cartes.illustrees.impair { grid-template-columns: 1fr; }
  .cartes.illustrees.impair .carte { flex-direction: row; align-items: center; padding: 10px 48px 10px 14px; }
  .cartes.illustrees.impair .carte::after { top: 50%; margin-top: -10px; }
  .cartes.illustrees.impair .carte .dessin { width: 64px; height: 52px; margin: 0; flex: none; }
}
.cartes.ligne { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.cartes.ligne .carte { padding: 12px 40px 12px 14px; min-height: 48px; }
.cartes.ligne .carte::after { right: 12px; width: 18px; height: 18px; margin-top: -9px; }

/* ---- champs ---- */
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
.champ { grid-column: 1 / -1; display: grid; gap: 6px; align-content: start; }
.champ.demi { grid-column: span 1; }
/* Deux champs côte à côte : les cases de saisie restent alignées même si un seul a une aide. */
.champ.demi { display: flex; flex-direction: column; gap: 6px; }
.champ.demi > .saisie { margin-top: auto; }
/* Le message d'erreur sous un demi-champ ne doit pas décaler son voisin : il se loge dans l'espace entre les lignes. */
@media (min-width: 481px) {
  .champ.demi { position: relative; }
  .champ.demi > .err { position: absolute; top: calc(100% + 2px); left: 0; right: 0; line-height: 1.25; }
}
.champ > label, .champ > .lib { font-weight: 500; font-size: 14px; }
.aide { color: var(--gris); font-size: 13px; margin-top: -3px; }
/* Encart vidéo sous une question : lien vers YouTube (nouvel onglet). */
.encart-video { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--ligne); border-radius: var(--r); background: var(--p-voile); color: var(--encre); text-decoration: none; transition: border-color .15s var(--sortie); }
.encart-video:hover { border-color: var(--ligne-forte); }
.encart-video:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.encart-video .lecture { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--encre); position: relative; }
.encart-video .lecture::after { content: ''; position: absolute; left: 13px; top: 10px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--carte); }
.encart-video .txt { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.encart-video small { color: var(--gris); font-size: 12px; }
.saisie { position: relative; }
.saisie input, .saisie select, .champ textarea {
  width: 100%; height: 50px; padding: 0 14px; font-size: 16px; background: var(--carte); color: var(--encre);
  border: 1px solid var(--ligne); border-radius: var(--r-petit); outline: none; box-shadow: var(--ombre);
  transition: border-color 150ms ease, box-shadow 150ms ease; -webkit-appearance: none; appearance: none;
}
.champ textarea { height: auto; min-height: 112px; padding: 13px 14px; resize: vertical; line-height: 1.45; }
.saisie input::placeholder, .champ textarea::placeholder { color: var(--pale); }
.saisie input:focus, .saisie select:focus, .champ textarea:focus { border-color: var(--p-encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 45%, transparent); }
.saisie .unite { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--pale); pointer-events: none; }
.saisie.a-unite input { padding-right: 46px; }
.saisie select { padding-right: 40px; background: var(--carte) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%238F8F8F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center/20px no-repeat; }
.champ.invalide input, .champ.invalide select, .champ.invalide textarea { border-color: var(--erreur); }
.champ .err { color: var(--erreur); font-size: 13px; }
.reperes { display: flex; flex-wrap: wrap; gap: 6px; }
.reperes button { border: 1px solid var(--ligne); background: var(--carte); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--gris); transition: transform 120ms var(--sortie); }
.reperes button:active { transform: scale(.96); }
.reperes button[aria-pressed="true"] { border-color: var(--p-encre); color: var(--p-encre); background: var(--p-voile); }

/* oui / non en liste */
.oui-non { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 14px 16px; background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); box-shadow: var(--ombre); }
.oui-non + .oui-non { margin-top: -19px; border-top-left-radius: 0; border-top-right-radius: 0; }
.oui-non:has(+ .oui-non) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
.oui-non .txt { display: grid; gap: 2px; }
.oui-non .txt span { font-weight: 500; font-size: 14px; }
.bascule { display: inline-flex; padding: 3px; background: var(--doux); border-radius: 999px; flex: none; }
.bascule button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--gris); cursor: pointer; min-width: 52px; transition: background-color 150ms ease, color 150ms ease; }
.bascule button[aria-pressed="true"] { background: var(--pastille, var(--carte)); color: var(--encre); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.bascule button[aria-pressed="true"][data-v="1"] { background: var(--p-encre); color: var(--carte); }

/* fichiers */
.depot { grid-column: 1 / -1; display: grid; gap: 10px; }
.depot label.zone { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--ligne-forte); border-radius: var(--r); background: var(--carte); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.depot label.zone:hover, .depot label.zone.survol { border-color: var(--p-encre); background: var(--p-voile); }
.depot .plus { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--p); color: var(--p-encre); font-size: 20px; flex: none; }
.depot input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.vignette { position: relative; aspect-ratio: 1; border-radius: var(--r-petit); overflow: hidden; background: var(--doux); display: grid; place-items: center; font-size: 11px; color: var(--gris); text-align: center; padding: 6px; animation: entre 240ms var(--sortie) both; }
.vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vignette button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }

/* ---- navigation ---- */
.pied {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent));
  padding: 24px 16px max(16px, env(safe-area-inset-bottom));
}
.pied-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.btn { height: 52px; border-radius: var(--r-petit); padding: 0 22px; font-weight: 500; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: transform 160ms var(--sortie), opacity 150ms ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: scale(.97); }
.btn-principal { flex: 1; background: var(--bouton); color: var(--bouton-encre); }
.btn-principal[disabled] { opacity: .35; cursor: default; transform: none; }
.btn-retour { background: var(--carte); border-color: var(--ligne); width: 52px; padding: 0; }
.btn-retour svg { width: 20px; height: 20px; }
.btn-lien { background: none; border: 0; color: var(--gris); text-decoration: underline; text-underline-offset: 3px; height: auto; padding: 0; font-size: 14px; }
@media (min-width: 720px) { .pied { position: static; background: none; padding: 32px 0 0; } .pied-in { padding: 0 16px; } .btn-principal { flex: 0 0 auto; min-width: 200px; margin-left: auto; } main { padding-bottom: 64px; } }
:focus-visible { outline: 2px solid var(--p-encre); outline-offset: 2px; }

/* ---- récap, signature, code ---- */
.recap { display: grid; gap: 10px; }
.bloc { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--ombre); }
.bloc-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.bloc-tete strong { font-weight: 600; font-size: 14px; }
.bloc-tete button { background: none; border: 0; color: var(--p-encre); font-size: 13px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.bloc dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; font-size: 13px; }
.bloc dt { color: var(--gris); }
.bloc dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.papier { position: relative; background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 18px 18px 14px; box-shadow: var(--ombre); }
.papier p { margin: 0 0 14px; font-size: 14px; color: var(--gris); }
.papier .trace-sig { font-family: 'Signature', cursive; font-size: 28px; min-height: 58px; padding: 10px 2px 2px; border-bottom: 1px solid var(--ligne-forte); color: var(--encre); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.papier .date-sig { font-size: 12px; color: var(--pale); margin-top: 8px; }
.coche { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; cursor: pointer; font-size: 14px; }
.coche input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--bouton); }
.coche a { color: inherit; }
.code input { letter-spacing: .5em; font-size: 26px; text-align: center; font-variant-numeric: tabular-nums; height: 64px; padding-left: .5em; }
.test { margin-top: 18px; padding: 12px 14px; border-radius: var(--r-petit); background: var(--jaune-voile); color: var(--jaune-encre); font-size: 13px; border: 1px dashed var(--jaune); }
.alerte { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-petit); background: var(--erreur-fond); color: var(--erreur); font-size: 14px; }

/* ---- fin ---- */
.fin { text-align: left; }
.fin .dessin .trace { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 600ms var(--sortie) 150ms forwards; }
.fin .dessin .trace.d2 { animation-delay: 550ms; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .fin .dessin .trace { animation: none; stroke-dashoffset: 0; } }
.suite { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; counter-reset: etape; }
.suite li { counter-increment: etape; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 20px; position: relative; }
.suite li::before { content: counter(etape); width: 28px; height: 28px; border-radius: 999px; background: var(--p); color: var(--p-encre); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.suite li:not(:last-child)::after { content: ''; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--ligne-forte); }
.suite strong { display: block; font-weight: 500; }
.suite span { color: var(--gris); font-size: 14px; }
.apercu { margin-top: 28px; }
.apercu h2 { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.apercu pre { white-space: pre-wrap; font-size: 12px; background: var(--doux); border-radius: var(--r-petit); padding: 12px; margin: 0; overflow-wrap: anywhere; }
.apercu table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r-petit); overflow: hidden; }
.apercu td { padding: 7px 10px; border-top: 1px solid var(--ligne); vertical-align: top; }
.apercu tr:first-child td { border-top: 0; }
.apercu td:first-child { color: var(--gris); width: 46%; }
.mentions { margin-top: 32px; color: var(--pale); font-size: 12px; }
.mentions a { color: inherit; }

@media (max-width: 480px) {
  h1 { font-size: 26px; }
  .accueil h1 { font-size: 32px; }
  .produits { gap: 10px; }
  .produit { min-height: 176px; padding: 14px; }
  .produit .dessin { width: 88px; height: 70px; }
  .produit strong { font-size: 15px; }
  .champs { grid-template-columns: 1fr; }
  .champ.demi { grid-column: 1 / -1; }
  .bloc dl { grid-template-columns: 1fr; gap: 0; }
  .bloc dd { text-align: left; margin-bottom: 8px; }
}

/* question qui apparaît après une réponse (ex. « Pour quel motif ? ») */
.apparait { animation: apparait 240ms var(--sortie) both; }
@keyframes apparait { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .apparait { animation: fondu 160ms ease both; } }
.seule { margin-top: 24px; }
.carte.reprise { margin: 4px 0 -8px; background: var(--p-voile); border-color: transparent; }
.carte.reprise::after { border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m8 5 5 5-5 5' fill='none' stroke='%23616161' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.oui-non.invalide, .seule.invalide .carte { border-color: var(--erreur); }
.seule .err, .oui-non .err { color: var(--erreur); font-size: 13px; margin-top: 8px; }
.ecran:focus, .ecran:focus-visible, main:focus { outline: none; }
.dessin ellipse.f, .dessin circle.f[opacity] { opacity: .9; }
.produit .dessin ellipse.f { opacity: 1; }
.ecran > .fixe { animation: none; }
.bloc dd.seul { grid-column: 1 / -1; text-align: left; }

.test a { color: inherit; font-weight: 500; }

@media (max-width: 480px) { .marque b { display: none; } }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pastille: #3A3A3A; } }
:root[data-theme="dark"] { --pastille: #3A3A3A; }
.surtitre { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--p-encre); margin: 0 0 10px; }
.surtitre::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--p); box-shadow: 0 0 0 1px var(--p-encre) inset; }

/* ---- suggestions (adresse, entreprise) ---- */
.saisie { position: relative; }
.suggestions {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); box-shadow: 0 12px 32px -12px rgba(5, 5, 5, .22);
  transform-origin: top center; animation: deroule 160ms var(--sortie) both;
}
@keyframes deroule { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.suggestions li { display: grid; gap: 1px; padding: 10px 12px; border-radius: var(--r-petit); cursor: pointer; }
.suggestions li strong { font-weight: 500; font-size: 14px; }
.suggestions li span { color: var(--gris); font-size: 12.5px; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--p-voile); }
.recherche input { padding-left: 42px; }
.recherche::before {
  content: ''; position: absolute; left: 14px; top: 25px; width: 18px; height: 18px; transform: translateY(-50%); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='9' cy='9' r='5.5' fill='none' stroke='%238F8F8F' stroke-width='1.6'/%3E%3Cpath d='m13.2 13.2 3.3 3.3' stroke='%238F8F8F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.recherche input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- reprendre une personne déjà saisie ---- */
.reprise-personnes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; font-size: 13px; color: var(--gris); }
.puce {
  display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--ligne); background: var(--carte); border-radius: 999px;
  padding: 7px 12px; cursor: pointer; font-size: 13px; transition: transform 140ms var(--sortie), border-color 150ms ease, background-color 150ms ease;
}
.puce strong { font-weight: 500; color: var(--encre); }
.puce span { color: var(--gris); font-size: 12px; }
.puce:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .puce:hover { border-color: var(--p-encre); background: var(--p-voile); } }

/* ---- documents à signer ---- */
.documents { display: grid; gap: 10px; margin-bottom: 10px; }
.papier.doc { padding: 14px 18px 4px; }
.doc-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ligne); }
.doc-tete strong { font-weight: 600; font-size: 14px; }
.doc-tete span { font-size: 12px; color: var(--p-encre); background: var(--p-voile); border-radius: 999px; padding: 2px 8px; }
.papier .coche { padding: 12px 0; }

/* ---- accueil : les vignettes réagissent au survol et au clic ---- */
.produit { transition: transform 280ms cubic-bezier(.34, 1.36, .64, 1), box-shadow 220ms ease; }
.produit .dessin { transition: transform 360ms cubic-bezier(.34, 1.36, .64, 1); transform-origin: 50% 85%; }
@media (hover: hover) and (pointer: fine) {
  .produit:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(5, 5, 5, .35), inset 0 0 0 1.5px var(--p-encre); }
  .produit:hover .dessin { transform: translateY(-3px) rotate(-2deg) scale(1.04); }
  .produit[data-p="vehicule"]:hover .dessin { transform: translateX(8px) rotate(0); }
  .produit[data-p="btp"]:hover .dessin { transform: rotate(-4deg) scale(1.05); }
  .produit[data-p="immeuble"]:hover .dessin { transform: translateY(-5px) scale(1.03); }
  .cartes.illustrees .carte:hover .dessin { transform: translateY(-2px) rotate(-2deg); }
}
.cartes.illustrees .carte .dessin { transition: transform 300ms cubic-bezier(.34, 1.36, .64, 1); }
.produit:active { transform: translateY(-1px) scale(.98); transition-duration: 120ms; }
.produit.choisi { animation: choisi 300ms var(--sortie) both; }
.produit.choisi .dessin { animation: rebond 300ms cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes choisi { 0% { transform: scale(.97); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes rebond { 0% { transform: scale(.94); } 60% { transform: translateY(-6px) scale(1.07); } 100% { transform: translateY(-3px) scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .produit, .produit .dessin, .cartes.illustrees .carte .dessin { transition: none; }
  .produit:hover, .produit:hover .dessin { transform: none; }
  .produit.choisi, .produit.choisi .dessin { animation: none; }
}

.suggestions { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }

/* ---- déclaration des sinistres ---- */
.sinistres { display: grid; gap: 10px; }
.sinistre { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: var(--ombre); }
.sinistre-tete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.sinistre-tete strong { font-weight: 600; font-size: 14px; }
.sinistre .champs { gap: 12px; }
.sinistre .champ.plein { grid-column: 1 / -1; }
.sinistre .saisie input, .sinistre .saisie select { height: 46px; }
.ajout {
  justify-self: start; border: 1.5px dashed var(--ligne-forte); background: none; border-radius: var(--r); padding: 12px 16px;
  font-size: 14px; font-weight: 500; color: var(--p-encre); cursor: pointer; transition: transform 140ms var(--sortie), border-color 150ms ease, background-color 150ms ease;
}
.ajout:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ajout:hover { border-color: var(--p-encre); background: var(--p-voile); } }
.coche span { white-space: pre-line; }

/* ---- partenaires (liens externes) et produit GLI ---- */
:root { --sable: #F4DDB8; --sable-encre: #6E4510; --sable-voile: #FCF5EA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sable: #8A6A3A; --sable-encre: #F6E4C6; --sable-voile: #221B12; } }
:root[data-theme="dark"] { --sable: #8A6A3A; --sable-encre: #F6E4C6; --sable-voile: #221B12; }
[data-c="sable"], .c-sable { --p: var(--sable); --p-encre: var(--sable-encre); --p-voile: var(--sable-voile); }
/* Ma santé : rose poudré (jamais de violet) */
:root { --rose: #F6C4CF; --rose-encre: #8A2440; --rose-voile: #FDEEF1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rose: #8C4456; --rose-encre: #FAD3DC; --rose-voile: #2A1519; } }
:root[data-theme="dark"] { --rose: #8C4456; --rose-encre: #FAD3DC; --rose-voile: #2A1519; }
[data-c="rose"], .c-rose { --p: var(--rose); --p-encre: var(--rose-encre); --p-voile: var(--rose-voile); }
/* Nombre impair de tuiles : la dernière (Ma santé) prend toute la largeur, en grand. */
.produit:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 172px; padding-right: 190px; }
.produit:last-child:nth-child(odd) .dessin { position: absolute; right: 20px; top: 50%; width: 160px; height: 128px; margin: -64px 0 0; }
.produit:last-child:nth-child(odd) strong { font-size: 21px; margin-top: 0; }
.produit:last-child:nth-child(odd) > span { font-size: 14px; color: var(--encre); max-width: 36ch; }
@media (max-width: 480px) {
  .produit:last-child:nth-child(odd) { padding-right: 110px; }
  .produit:last-child:nth-child(odd) .dessin { width: 104px; height: 83px; right: 8px; margin-top: -42px; }
  .produit:last-child:nth-child(odd) strong { font-size: 18px; }
}
a.carte { color: inherit; text-decoration: none; }
.carte.externe { padding-right: 18px; justify-content: space-between; }
.carte.externe::after { display: none; }
.carte.externe .partenaire {
  flex: none; font-size: 12px; font-weight: 500; color: var(--p-encre); background: var(--p-voile); border-radius: 999px; padding: 4px 10px 4px 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.carte.externe .partenaire::after { content: '↗'; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .carte.externe:hover { border-color: var(--p-encre); } }
.carte.rebond { margin-top: 18px; background: var(--p-voile); border-color: transparent; }
.carte.rebond::after { border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m8 5 5 5-5 5' fill='none' stroke='%23616161' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }

/* ---- « Flemme » : faux bot de l'accueil (bulle + panneau de dépôt) ---- */
.flemme-portrait { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--ciel-voile); color: var(--encre); overflow: hidden; }
.flemme-portrait .dessin { width: 100%; height: 100%; margin: 0; }
.flemme-bulle {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; text-align: left;
  background: var(--bouton); color: var(--bouton-encre); font: inherit; cursor: pointer;
  box-shadow: 0 6px 24px rgba(5, 5, 5, .18); transition: transform 160ms var(--sortie);
  animation: bulle 420ms var(--sortie) 500ms both;
}
/* Présente partout (accueil et questionnaire), sauf sur l'écran final. */
.flemme-bulle { display: inline-flex; }
body[data-vue="fin"] .flemme-bulle { display: none; }
.flemme-bulle .flemme-portrait { width: 44px; height: 44px; }
.flemme-bulle .txt { display: grid; line-height: 1.2; }
.flemme-bulle strong { font-size: 15px; font-weight: 600; }
.flemme-bulle small { font-size: 12px; opacity: .7; }
.flemme-bulle:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .flemme-bulle:hover .flemme-portrait .dessin { animation: baille 900ms var(--sortie); } }
@keyframes baille { 30% { transform: rotate(-6deg) scale(1.06); } 60% { transform: rotate(3deg); } }
@keyframes bulle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flemme-bulle, .flemme-bulle:hover .flemme-portrait .dessin { animation: none; } }
body[data-vue="accueil"] main { padding-bottom: 104px; }

dialog.flemme {
  width: min(420px, calc(100vw - 32px)); max-width: none; max-height: min(780px, calc(100dvh - 32px));
  margin: auto 16px 16px auto; padding: 0; border: 1px solid var(--ligne); border-radius: 12px;
  background: var(--bg); color: var(--encre); box-shadow: 0 12px 48px rgba(5, 5, 5, .22); overflow: auto; overscroll-behavior: contain;
}
dialog.flemme[open] { animation: panneau 280ms var(--sortie) both; }
@keyframes panneau { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.flemme[open] { animation: none; } }
dialog.flemme::backdrop { background: rgba(5, 5, 5, .28); }
.flemme-tete { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 14px 18px 12px; background: var(--bg); border-bottom: 1px solid var(--ligne); }
.flemme-tete .txt { display: grid; flex: 1; line-height: 1.25; }
.flemme-tete h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.flemme-tete small { color: var(--gris); font-size: 12px; }
.flemme-fermer { flex: none; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--ligne); background: var(--carte); color: var(--gris); cursor: pointer; display: grid; place-items: center; }
.flemme-fermer svg { width: 18px; height: 18px; }
.flemme-corps { display: grid; gap: 14px; padding: 16px 18px 18px; }
.flemme-dit { justify-self: start; max-width: 92%; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--ciel-voile); color: var(--encre); font-size: 14px; animation: entre 320ms var(--sortie) both; }
.flemme-dit p { margin: 0; }
.flemme-dit p:first-child { font-weight: 600; }
.flemme-dit p + p { margin-top: 4px; }
.flemme-corps .champs { gap: 14px 10px; }
.flemme-corps .coche { padding: 0; font-size: 12.5px; color: var(--gris); }
.flemme-corps .btn-principal { width: 100%; flex: none; margin: 0; }
.flemme-corps .btn-lien { justify-self: center; }
.flemme-corps .alerte, .flemme-corps .test { margin: 0; }
.flemme-corps .alerte[hidden] { display: none; }
.flemme-corps .apercu { margin: 0; }
/* Clin d'œil sur les tuiles, sous la durée */
.produit .clin { display: block; font-size: 11.5px; font-weight: 400; color: var(--gris); margin-top: 2px; }
@media (max-width: 480px) {
  .flemme-bulle small { display: none; }
  .flemme-bulle { padding-right: 16px; }
  dialog.flemme { width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
}

/* ---- pièges à robots et anti-robot Cloudflare ---- */
.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.turnstile { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 30; }

/* ---- page de validation des demandes (sas, Dargency uniquement) ---- */
main.sas { max-width: 760px; }
main.sas .marque { font-weight: 600; margin: 0 0 24px; }
main.sas .marque b { color: var(--pale); font-weight: 600; }
main.sas h2 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
main.sas pre { white-space: pre-wrap; font-size: 13px; background: var(--doux); border-radius: var(--r-petit); padding: 12px; margin: 0; overflow-wrap: anywhere; }
main.sas form { margin-top: 20px; display: grid; gap: 8px; }
main.sas .btn-principal { width: 100%; }
main.sas .rejet input { height: 44px; padding: 0 12px; border: 1px solid var(--ligne); border-radius: var(--r-petit); background: var(--carte); color: var(--encre); font: inherit; }
main.sas .btn-retour-texte { height: 44px; border: 1px solid var(--ligne-forte); background: var(--carte); color: var(--erreur); border-radius: var(--r-petit); font: inherit; font-weight: 500; cursor: pointer; }
main.sas a { color: inherit; font-weight: 500; }
main.sas .proche { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: var(--r); background: var(--carte); margin-bottom: 8px; }
main.sas .proche form { margin: 0; }
main.sas .choisi { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
main.sas .btn-secondaire { height: 44px; border: 1px solid var(--ligne-forte); background: var(--carte); color: var(--encre); border-radius: var(--r-petit); font: inherit; font-weight: 500; cursor: pointer; width: 100%; }
main.sas .autre input { height: 44px; padding: 0 12px; border: 1px solid var(--ligne); border-radius: var(--r-petit); background: var(--carte); color: var(--encre); font: inherit; }
main.sas .rejet.choisi { padding: 12px; border-radius: var(--r); }
main.sas .pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
main.sas .vignette { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--ligne); border-radius: var(--r-petit); background: var(--carte); text-decoration: none; font-weight: 400; font-size: 12px; overflow-wrap: anywhere; }
main.sas .vignette img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--doux); }
main.sas .vignette.fichier { align-content: center; min-height: 80px; }
main.sas .vignette:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
/* Dans le questionnaire : plus discrète, et au-dessus du bouton Continuer sur mobile. */
body:not([data-vue="accueil"]) .flemme-bulle small { display: none; }
/* Téléphone : dans la barre du haut, au centre (Franck, 17/10/2026). En bas à droite, elle cachait
   les boutons Oui des longues listes. `left` plutôt que translateX : l'animation fixe `transform`. */
@media (max-width: 719px) {
  body:not([data-vue="accueil"]) .flemme-bulle {
    top: calc(11px + env(safe-area-inset-top)); bottom: auto; right: auto; left: calc(50% - 20px);
    padding: 2px; box-shadow: 0 2px 10px rgba(5, 5, 5, .14);
  }
  body:not([data-vue="accueil"]) .flemme-bulle .flemme-portrait { width: 36px; height: 36px; }
  body:not([data-vue="accueil"]) .flemme-bulle .txt { display: none; }
  /* La marque complète déborderait sous la bulle entre 481 et 719 px. */
  body:not([data-vue="accueil"]) .marque b { display: none; }
}
/* Tablette (720–960 px) : le bouton Continuer est en bas à droite, la bulle ne doit pas le couvrir. */
@media (min-width: 720px) and (max-width: 960px) {
  body:not([data-vue="accueil"]) .flemme-bulle { padding: 4px; }
  body:not([data-vue="accueil"]) .flemme-bulle .txt { display: none; }
  body:not([data-vue="accueil"]) .pied { padding-bottom: 88px; }
}
