:root {
  --encre: #1c2733;
  --texte: #2b3542;
  --doux: #4f5b69;
  --nuit: #1f2d3d;
  --nuit-2: #2a3c50;
  --tuile: #b23f22;
  --tuile-fonce: #8f3019;
  --sable: #f6f1ea;
  --sable-2: #efe6da;
  --bord: #dcd3c6;
  --blanc: #ffffff;
  --ok: #2f7a4f;
  --rayon: 14px;
  --ombre: 0 10px 30px rgba(28, 39, 51, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 18px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--texte); background: var(--blanc); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--tuile); text-underline-offset: 3px; }
a:hover { color: var(--tuile-fonce); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

.largeur { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--blanc); padding: 8px 12px; z-index: 10; }
.evitement:focus { left: 8px; }

.entete { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--bord); backdrop-filter: saturate(1.4) blur(6px); }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.marque-logo { width: 34px; height: 34px; color: var(--tuile); }
.entete-tel { display: inline-flex; align-items: center; gap: 8px; color: var(--encre); text-decoration: none; font-weight: 800; font-size: 1.15rem; padding: 10px 14px; border: 2px solid var(--tuile); border-radius: 999px; white-space: nowrap; }
.entete-tel svg { width: 20px; height: 20px; color: var(--tuile); }
.entete-tel:hover { background: var(--tuile); color: var(--blanc); }
.entete-tel:hover svg { color: var(--blanc); }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 14px 24px; border-radius: 12px; font-weight: 800; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; text-align: center; transition: background-color .15s ease, transform .15s ease; }
.bouton-principal { background: var(--tuile); color: var(--blanc); box-shadow: 0 6px 16px rgba(178, 63, 34, .28); }
.bouton-principal:hover { background: var(--tuile-fonce); color: var(--blanc); transform: translateY(-1px); }
.bouton-secondaire { background: transparent; color: var(--blanc); border-color: rgba(255, 255, 255, .7); }
.bouton-secondaire:hover { background: rgba(255, 255, 255, .12); color: var(--blanc); }
.bouton-large { width: 100%; font-size: 1.1rem; }

.hero { background: linear-gradient(160deg, var(--nuit) 0%, var(--nuit-2) 100%); color: var(--blanc); padding: 56px 0 64px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -1px -10%; height: 70px; background: var(--sable); clip-path: polygon(0 100%, 12% 40%, 24% 100%, 36% 40%, 48% 100%, 60% 40%, 72% 100%, 84% 40%, 96% 100%, 100% 70%, 100% 100%); opacity: .08; }
.hero-grille { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.surtitre { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #f3d9c9; font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.hero h1 { margin: 0 0 16px; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; color: var(--blanc); }
.hero-intro { margin: 0 0 26px; font-size: 1.12rem; color: #e3e8ee; max-width: 60ch; }
.hero-intro a { color: #ffd2bd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.rassurances { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rassurances li { position: relative; padding-left: 32px; color: #e9edf2; }
.rassurances li::before { content: ""; position: absolute; left: 0; top: .3em; width: 22px; height: 22px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

.hero-carte { background: var(--blanc); color: var(--texte); border-radius: var(--rayon); padding: 26px 26px 22px; box-shadow: var(--ombre); }
.hero-carte-titre { margin: 0 0 14px; font-weight: 800; font-size: 1.15rem; color: var(--encre); }
.etapes { list-style: none; counter-reset: etape; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.etapes li { counter-increment: etape; position: relative; padding-left: 48px; min-height: 34px; }
.etapes li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--sable-2); color: var(--tuile); font-weight: 800; display: grid; place-items: center; }
.lien-discret { font-weight: 700; font-size: .98rem; }

.mise-en-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; padding-top: 48px; padding-bottom: 64px; align-items: start; }
.contenu { min-width: 0; }
.contenu > :first-child { margin-top: 0; }
.contenu h2 { font-size: 1.6rem; line-height: 1.25; color: var(--encre); margin: 48px 0 14px; letter-spacing: -.01em; }
.contenu h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--tuile); margin-bottom: 14px; }
.contenu h3 { font-size: 1.2rem; color: var(--encre); margin: 28px 0 8px; }
.contenu p, .contenu li { max-width: 68ch; }
.contenu ul, .contenu ol { padding-left: 1.3em; }
.contenu li { margin: 6px 0; }
.contenu strong { color: var(--encre); }
.contenu table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; font-size: .98rem; display: block; overflow-x: auto; }
.contenu th { background: var(--sable); color: var(--encre); text-align: left; font-weight: 800; }
.contenu th, .contenu td { padding: 12px 14px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.contenu tr:last-child td { border-bottom: 0; }
.contenu tbody tr:nth-child(even) td { background: #fcfaf7; }

.colonne { position: sticky; top: 92px; }
.demande { background: var(--sable); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 26px; }
.demande h2 { margin: 0 0 6px; font-size: 1.35rem; color: var(--encre); }
.demande-intro { margin: 0 0 14px; color: var(--doux); font-size: 1rem; }
.petit { font-size: .9rem; color: var(--doux); margin: 0; }
.demande-ou { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--bord); text-align: center; font-weight: 700; }
.demande-ou a { white-space: nowrap; }

.pied { background: var(--nuit); color: #c9d2dc; padding: 48px 0 36px; font-size: .98rem; }
.pied a { color: #ffffff; text-decoration: none; }
.pied a:hover { text-decoration: underline; color: #ffffff; }
.plan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 28px; }
.plan-titre { margin: 0 0 10px; font-weight: 800; color: #ffffff; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pied-mention { max-width: 80ch; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 20px; margin: 0 0 10px; }
.pied-liens { margin: 0; }

.lien-bouton { padding: 0; border: 0; background: none; color: #ffffff; font: inherit; cursor: pointer; }
.lien-bouton:hover { text-decoration: underline; }
.cookies { position: fixed; left: 16px; bottom: 16px; z-index: 7; width: min(440px, calc(100vw - 32px)); padding: 20px; border-radius: var(--rayon); background: var(--blanc); color: var(--texte); box-shadow: 0 20px 50px rgba(28, 39, 51, .25); border: 1px solid var(--bord); }
.cookies[hidden] { display: none; }
.cookies-texte { margin: 0 0 14px; font-size: .95rem; }
.cookies-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bouton-cookies { min-height: 48px; padding: 10px 14px; background: var(--blanc); color: var(--encre); border-color: var(--encre); font-size: 1rem; }
.bouton-cookies:hover { background: var(--sable); color: var(--encre); }
.reponse { min-height: 100vh; display: grid; place-items: center; padding-top: 40px; padding-bottom: 40px; }
.reponse-carte { max-width: 560px; padding: 36px; border-radius: var(--rayon); background: var(--sable); border: 1px solid var(--bord); text-align: center; }
.reponse-carte h1 { margin: 0 0 12px; font-size: 1.8rem; color: var(--encre); }
.reponse-carte p { margin: 0 0 24px; }

.barre-mobile { display: none; }

.type-legal .hero-carte, .type-legal .rassurances, .type-page .hero-carte { display: none; }
.type-legal .hero-grille, .type-page .hero-grille { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 960px) {
  .hero-grille { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .mise-en-page { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .colonne { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 17px; padding-bottom: 84px; }
  .entete-ligne { min-height: 60px; }
  .marque span { font-size: 1rem; }
  .entete-tel span { display: none; }
  .entete-tel { padding: 10px; }
  .hero { padding: 36px 0 44px; }
  .hero-actions .bouton { width: 100%; }
  .hero-carte { padding: 22px 20px; }
  .contenu h2 { font-size: 1.4rem; }
  .plan { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .barre-mobile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--blanc); border-top: 1px solid var(--bord); box-shadow: 0 -6px 20px rgba(28, 39, 51, .1); }
  .barre-mobile .bouton { min-height: 52px; padding: 10px; }
  .barre-mobile .bouton-secondaire { color: var(--tuile); border-color: var(--tuile); }
  .cookies { left: 8px; right: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
}

body.a-fenetre { overflow: hidden; }
.rappel { width: min(480px, calc(100vw - 32px)); max-width: none; max-height: min(92dvh, 820px); padding: 0; border: 0; border-radius: 22px; background: var(--blanc); color: var(--texte); box-shadow: 0 40px 100px rgba(28, 39, 51, .35); overflow: hidden; }
.rappel[open] { animation: rappel-entree .28s cubic-bezier(.2, .9, .2, 1); }
.rappel::backdrop { background: rgba(28, 39, 51, .55); backdrop-filter: blur(4px); }
.rappel-interieur { position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; padding: 28px; }
.rappel-poignee { display: none; position: absolute; top: 9px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 999px; background: var(--bord); }
.rappel-fermer { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: var(--sable); color: var(--encre); cursor: pointer; }
.rappel-fermer svg { width: 18px; height: 18px; }
.rappel-fermer:hover { background: var(--sable-2); }
.rappel-titre { margin: 4px 56px 6px 0; font-size: 1.55rem; line-height: 1.2; color: var(--encre); letter-spacing: -.01em; }
.rappel-sous-titre { margin: 0; color: var(--doux); font-size: 1rem; }
.rappel-confiance { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .92rem; font-weight: 700; color: var(--encre); }
.rappel-confiance li { position: relative; padding-left: 22px; }
.rappel-confiance li::before { content: ""; position: absolute; left: 0; top: .25em; width: 16px; height: 16px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.demande .formulaire { display: grid; gap: 16px; }
.rappel-champs { display: grid; gap: 16px; margin-top: 22px; }
.champ { display: grid; gap: 6px; }
.champ-libelle { font-size: .98rem; font-weight: 700; color: var(--encre); }
.facultatif { font-weight: 400; color: var(--doux); }
.champ-saisie { position: relative; }
.champ-icone { position: absolute; left: 14px; top: 16px; width: 22px; height: 22px; color: #8a8f97; pointer-events: none; transition: color .15s ease; }
.champ-saisie input, .champ-saisie textarea { display: block; width: 100%; min-height: 56px; padding: 15px 44px 15px 48px; border: 2px solid var(--bord); border-radius: 12px; background: var(--blanc); color: var(--encre); font: inherit; font-size: 1.05rem; line-height: 1.4; transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none; }
.champ-saisie textarea { min-height: 112px; resize: vertical; }
.champ-saisie input::placeholder, .champ-saisie textarea::placeholder { color: #8a8f97; opacity: 1; }
.champ-saisie input:hover, .champ-saisie textarea:hover { border-color: #c4b8a8; }
.champ-saisie input:focus, .champ-saisie textarea:focus { outline: none; border-color: var(--tuile); box-shadow: 0 0 0 4px rgba(178, 63, 34, .14); }
.champ-saisie:focus-within .champ-icone { color: var(--tuile); }
.champ.est-valide .champ-saisie::after { content: ""; position: absolute; right: 14px; top: 17px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.champ.est-valide .champ-saisie input, .champ.est-valide .champ-saisie textarea { border-color: #8fbfa2; }
.champ.a-erreur .champ-saisie input, .champ.a-erreur .champ-saisie textarea { border-color: #b3261e; background: #fff8f7; }
.champ.a-erreur .champ-saisie input:focus, .champ.a-erreur .champ-saisie textarea:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .14); }
.champ.a-erreur .champ-icone { color: #b3261e; }
.champ-aide { margin: 0; font-size: .9rem; color: var(--doux); }
.champ-erreur { margin: 0; font-size: .92rem; font-weight: 700; color: #b3261e; }
.champ-erreur:empty { display: none; }
.champ-erreur::before { content: "! "; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.champ-fichier { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border: 2px dashed #cdbfae; border-radius: 12px; background: var(--blanc); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.champ-fichier:hover { border-color: var(--tuile); background: #fffaf7; }
.champ-fichier:focus-within { border-color: var(--tuile); box-shadow: 0 0 0 4px rgba(178, 63, 34, .14); }
.champ-fichier-icone { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; background: var(--sable-2); color: var(--tuile); }
.champ-fichier-icone svg { width: 22px; height: 22px; }
.champ-fichier-texte { display: grid; min-width: 0; line-height: 1.3; }
.champ-fichier-texte strong { color: var(--encre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-fichier-texte small { color: var(--doux); font-size: .88rem; }
.champ-fichier.a-fichier { border-style: solid; border-color: #8fbfa2; background: #f4faf6; }
.champ-fichier.a-fichier .champ-fichier-icone { background: #dcefe3; color: var(--ok); }
.demande .formulaire .bouton-large { margin-top: 4px; }

.rappel-quand { margin: 20px 0 0; padding: 0; border: 0; }
.rappel-quand legend { margin-bottom: 8px; padding: 0; font-size: .95rem; font-weight: 700; color: var(--encre); }
.rappel-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rappel-option { position: relative; cursor: pointer; }
.rappel-option input { position: absolute; opacity: 0; pointer-events: none; }
.rappel-option span { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; min-height: 60px; padding: 10px 12px; border: 2px solid var(--bord); border-radius: 12px; }
.rappel-option strong { font-size: .95rem; color: var(--encre); }
.rappel-option small { font-size: .85rem; color: var(--doux); }
.rappel-option:hover span { border-color: #c9a796; }
.rappel-option input:checked + span { border-color: var(--tuile); background: #fbeee8; }
.rappel-option input:focus-visible + span { box-shadow: 0 0 0 4px rgba(178, 63, 34, .2); }
.rappel-envoyer { margin-top: 22px; }
.rappel-legal { margin: 12px 0 0; font-size: .85rem; color: var(--doux); text-align: center; }
@keyframes rappel-entree { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .rappel { width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .rappel[open] { animation: rappel-montee .3s cubic-bezier(.2, .9, .2, 1); }
  .rappel-interieur { padding: 30px 20px calc(20px + env(safe-area-inset-bottom)); }
  .rappel-poignee { display: block; }
  .rappel-options { grid-template-columns: 1fr; }
  .rappel-option span { min-height: 52px; flex-direction: row; align-items: center; justify-content: space-between; }
}
@keyframes rappel-montee { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
  .rappel[open] { animation: none; }
}
