@font-face { font-family: "Titres"; src: url("polices/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("polices/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --fond: #f5f7fc;
  --blanc: #ffffff;
  --encre: #0f2038;
  --gris: #566780;
  --trait: #dfe5ef;
  --bleu: #2450e8;
  --bleu-fonce: #1b3cb8;
  --bleu-pale: #ebf0ff;
  --soleil: #ffb524;
  --vert: #0c8a5d;
  --rouge: #c02b26;
  --ombre: 0 1px 2px rgba(15, 32, 56, .05), 0 12px 32px rgba(15, 32, 56, .07);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1.0625rem/1.6 "Figtree", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: "Titres", system-ui, sans-serif; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h1 { font-size: 1.625rem; font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: .5rem 0 0; }
a { color: var(--bleu); }
main { padding: 0 1rem 2rem; max-width: 74rem; margin: 0 auto; }
:focus-visible { outline: 3px solid rgba(36, 80, 232, .45); outline-offset: 2px; }

.entete { display: flex; align-items: center; justify-content: space-between; padding: 1.125rem 1rem; max-width: 74rem; margin: 0 auto; }
.marque { display: inline-flex; align-items: center; gap: .5rem; color: var(--encre); font: 700 1.125rem "Titres", sans-serif; letter-spacing: -.02em; text-decoration: none; }
.marque svg { width: 1.625rem; height: 1.625rem; }
.entete { flex-wrap: wrap; gap: .5rem 1rem; }
.menu { display: flex; flex-wrap: wrap; gap: .125rem; min-width: 0; }
.menu a { padding: .4375rem .625rem; border-radius: 999px; color: var(--gris); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.menu a:hover { color: var(--encre); background: var(--blanc); }
.menu a[aria-current=page] { color: var(--encre); background: var(--blanc); box-shadow: 0 1px 3px rgba(15, 32, 56, .12); }
.connexion-lien { font-weight: 600; }
.bandeau { max-width: 72rem; margin: 0 auto 1rem; padding: .75rem 1rem; background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 12px; font-weight: 600; }
.pied { max-width: 74rem; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; color: var(--gris); font-size: .9375rem; }
.pied p { max-width: 46rem; }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .625rem 1.75rem; border: 0; border-radius: 999px; background: var(--bleu); color: var(--blanc); font: 650 1.0625rem "Figtree", sans-serif; text-decoration: none; cursor: pointer; transition: background-color .15s; }
.bouton:hover { background: var(--bleu-fonce); }
.bouton:disabled { background: var(--trait); color: var(--gris); cursor: not-allowed; }
.bouton.petit { min-height: 2.75rem; font-size: 1rem; padding: .375rem 1.25rem; }
.bouton.danger { background: var(--blanc); box-shadow: inset 0 0 0 1.5px var(--rouge); color: var(--rouge); }
.bouton.inverse { background: var(--blanc); color: var(--bleu-fonce); }
.bouton.inverse:hover { background: var(--bleu-pale); }
.lien { padding: .25rem 0; border: 0; background: none; color: var(--bleu); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.note, .aide { color: var(--gris); font-size: .9375rem; }
.chapo { font-size: 1.1875rem; color: #33445c; max-width: 33rem; }

/* Accueil */
.une { display: grid; gap: 2.5rem; padding: .75rem 0 3.5rem; }
.une h1 { font-size: clamp(2.5rem, 9.5vw, 4rem); font-weight: 750; line-height: 1.02; letter-spacing: -.035em; max-width: 15ch; }
.une .chapo { margin-top: 1.25rem; }
.une .bouton { margin-top: 1.75rem; }
.une .note { margin-top: .75rem; }
.une-visuel { position: relative; padding-bottom: 5.5rem; min-width: 0; }
.toit { display: block; width: 100%; height: auto; }
.carte-prete { position: absolute; left: 1rem; right: 1rem; bottom: 0; padding: 1rem 1.25rem; background: var(--blanc); border-radius: 18px; box-shadow: var(--ombre); }
.carte-prete strong { font: 650 1.0625rem "Titres", sans-serif; letter-spacing: -.01em; }
.carte-prete ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .75rem; font-size: .875rem; }
.carte-prete li { position: relative; padding-left: 1.5rem; }
.carte-prete li::before, .check li.ok a::before, .piece.deposee::before { content: ""; position: absolute; background: var(--vert); border-radius: 50%; }
.carte-prete li::before { left: 0; top: .2rem; width: 1.0625rem; height: 1.0625rem; }
.carte-prete li::after { content: ""; position: absolute; left: .36rem; top: .35rem; width: .32rem; height: .58rem; border: solid var(--blanc); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.pv { animation: pose 420ms cubic-bezier(.2, .8, .2, 1) both; }
.pv1 { animation-delay: 150ms; } .pv2 { animation-delay: 230ms; } .pv3 { animation-delay: 310ms; } .pv4 { animation-delay: 390ms; }
.pv5 { animation-delay: 470ms; } .pv6 { animation-delay: 550ms; } .pv7 { animation-delay: 630ms; } .pv8 { animation-delay: 710ms; }
@keyframes pose { from { opacity: 0; transform: translateY(-14px); } }

.bloc { padding: 2.5rem 0; }
.bloc > h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 720; letter-spacing: -.03em; }
.etapes ol { list-style: none; counter-reset: etape; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 2rem; }
.etapes li { counter-increment: etape; }
.etapes li::before { content: counter(etape); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .875rem; background: var(--bleu-pale); color: var(--bleu); border-radius: 50%; font: 700 1.125rem "Titres", sans-serif; }
.etapes li p { color: #33445c; max-width: 26rem; }
.savoir p { max-width: 44rem; color: #33445c; }
.savoir > h2 { margin-bottom: 1rem; }
.appel { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; margin: 1rem 0 1.5rem; padding: 2.25rem 1.5rem; background: var(--bleu); color: var(--blanc); border-radius: 28px; }
.appel h2 { font-size: clamp(1.625rem, 5vw, 2.25rem); font-weight: 720; letter-spacing: -.03em; max-width: 20ch; }

/* Formulaires */
.feuille { background: var(--blanc); padding: 1.5rem 1.25rem; margin-bottom: 1rem; border-radius: 22px; box-shadow: var(--ombre); overflow-wrap: anywhere; }
.feuille.etroite { max-width: 36rem; margin-inline: auto; }
.feuille section + section { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--trait); scroll-margin-top: 1rem; }
.champ { margin-top: 1.125rem; min-width: 0; }
.champ label, legend { display: block; font-weight: 600; }
.champ .aide { margin-top: 0; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], select, textarea { display: block; width: 100%; min-height: 3.25rem; margin-top: .375rem; padding: .625rem .875rem; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--blanc); color: var(--encre); font: inherit; transition: border-color .15s, box-shadow .15s; appearance: none; }
input:hover, textarea:hover { border-color: #b8c4d6; }
input:not([type=radio], [type=checkbox], [type=file]):focus, textarea:focus { outline: 0; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(36, 80, 232, .16); }
.en-erreur input { border-color: var(--rouge); }
.erreur { color: var(--rouge); font-weight: 600; font-size: .9375rem; }
.deux { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1rem; align-items: start; }
.alerte { color: #6b4a00; padding: .5rem .75rem; background: #fff5dc; border-radius: 10px; margin-top: .5rem; }
.piege { position: absolute; left: -9999px; }
form > .bouton { margin-top: 1.5rem; width: 100%; }

.choix-groupe { border: 0; padding: 0; margin: 1.25rem 0 0; min-width: 0; }
.choix { display: flex; align-items: center; gap: .625rem; min-height: 3.25rem; margin-top: .5rem; padding: .375rem .875rem; border: 1.5px solid var(--trait); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.choix:hover { border-color: #b8c4d6; }
.choix:has(input:checked) { border-color: var(--bleu); background: var(--bleu-pale); font-weight: 600; }
.choix input, .coche input { width: 1.25rem; height: 1.25rem; flex: none; accent-color: var(--bleu); }
.coche { display: flex; gap: .625rem; align-items: flex-start; margin-top: 1.125rem; cursor: pointer; }
.coche input { margin-top: .2rem; }
.enregistre { min-height: 1.5rem; margin-top: 1rem; color: var(--vert); font-weight: 600; font-size: .9375rem; }
.enregistre.erreur { color: var(--rouge); }

/* Étapes du dossier */
.etapes-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .25rem; margin-bottom: 1rem; background: #e7ecf5; border-radius: 14px; }
.etapes-nav button { min-height: 2.75rem; padding: .25rem; border: 0; border-radius: 11px; background: none; color: var(--gris); font: 600 .9375rem "Figtree", sans-serif; cursor: pointer; }
.etapes-nav button[aria-current=step] { background: var(--blanc); color: var(--encre); box-shadow: 0 1px 3px rgba(15, 32, 56, .14); }
.suite-etape { margin-top: 1.5rem; }
.suite-etape .bouton { width: 100%; }

.pieces { list-style: none; margin: .75rem 0 0; padding: 0; }
.piece { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; padding: 1.125rem 0 1.125rem 2.25rem; border-bottom: 1px solid var(--trait); scroll-margin-top: 1rem; }
.piece:last-child { border-bottom: 0; }
.piece::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: 1.375rem; height: 1.375rem; border: 2px solid var(--trait); border-radius: 50%; }
.piece.deposee::before { left: 0; top: 1.25rem; width: 1.375rem; height: 1.375rem; border: 0; }
.piece.deposee::after { content: ""; position: absolute; left: .47rem; top: 1.45rem; width: .4rem; height: .72rem; border: solid var(--blanc); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.piece-texte { min-width: 0; overflow-wrap: anywhere; }
.piece-texte .aide { margin-top: .125rem; }
.piece-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vignette { width: 4.25rem; height: 4.25rem; object-fit: cover; border-radius: 12px; }
.depose-ok { font-size: .9375rem; color: var(--vert); font-weight: 600; }
.ajout { display: inline-flex; align-items: center; justify-content: center; min-height: 2.875rem; padding: .375rem 1.25rem; border-radius: 999px; background: var(--bleu-pale); color: var(--bleu-fonce); font-weight: 650; font-size: 1rem; cursor: pointer; transition: background-color .15s; }
.ajout:hover { background: #dde6ff; }
.ajout.discret { background: var(--blanc); box-shadow: inset 0 0 0 1.5px var(--trait); color: var(--encre); min-height: 2.5rem; }
.ajout input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ajout:focus-within { outline: 3px solid rgba(36, 80, 232, .45); outline-offset: 2px; }
.en-cours .ajout { opacity: .65; cursor: progress; }

.manque { margin: .75rem 0 0; padding-left: 1.25rem; }
.manque li { padding: .1875rem 0; }
.suivi { margin-bottom: 1rem; padding: 1.25rem; background: var(--blanc); border-radius: 22px; box-shadow: var(--ombre); min-width: 0; }
.adresse { margin: 0; font: 650 1.125rem/1.25 "Titres", sans-serif; letter-spacing: -.01em; overflow-wrap: anywhere; }
.compteur { margin-top: .75rem; color: var(--gris); font-size: .9375rem; }
.compteur strong { color: var(--encre); }
.barre { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; margin-top: .375rem; }
.barre span { height: .4375rem; background: var(--trait); border-radius: 3px; transition: background-color .25s; }
.barre span.ok { background: var(--bleu); }
.check { display: none; list-style: none; margin: 1rem 0 0; padding: 0; }
.check a { position: relative; display: block; padding: .3125rem 0 .3125rem 1.75rem; color: var(--gris); text-decoration: none; }
.check a:hover { color: var(--encre); }
.check a::before { content: ""; position: absolute; left: 0; top: .5625rem; width: 1.0625rem; height: 1.0625rem; border: 2px solid var(--trait); border-radius: 50%; }
.check li.ok a { color: var(--encre); }
.check li.ok a::before { border: 0; }
.check li.ok a::after { content: ""; position: absolute; left: .36rem; top: .7rem; width: .32rem; height: .58rem; border: solid var(--blanc); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.lien-prive { color: var(--gris); font-size: .875rem; margin-top: .875rem; }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.suppression { padding: .25rem .25rem 1rem; color: var(--gris); font-size: .9375rem; }
.suppression summary { cursor: pointer; padding: .5rem 0; }
.suppression .bouton { margin-top: .75rem; }
.recu .suite { padding-left: 1.25rem; margin: 1rem 0; }
.recu .suite li { padding: .25rem 0; }
.defilant { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; min-width: 44rem; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .625rem .75rem .625rem 0; border-bottom: 1px solid var(--trait); }

@media (min-width: 34rem) {
  .deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feuille { padding: 2rem; }
  form > .bouton, .suite-etape .bouton { width: auto; }
  .piece { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .piece-actions { grid-column: auto; grid-row: 1; grid-column-start: 3; flex-direction: column; align-items: flex-end; gap: .25rem; }
  .carte-prete { left: auto; right: 1.25rem; width: 22rem; }
  .appel { flex-direction: row; align-items: center; justify-content: space-between; padding: 2.5rem 3rem; }
}
@media (min-width: 58rem) {
  .une { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; padding: 2rem 0 4.5rem; gap: 3.5rem; }
  .etapes ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .espace { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .suivi { position: sticky; top: 1rem; }
  .check { display: block; }
  .saisie { min-width: 0; max-width: 44rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pv { animation: none; }
}

/* Suggestions d'adresses */
.champ:has(> [data-adresse]), .champ:has(> [data-entreprise]) { position: relative; }
.suggestions { position: absolute; z-index: 10; left: 0; right: 0; list-style: none; margin: .375rem 0 0; padding: .375rem; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre); }
.suggestions li { padding: .625rem .75rem; border-radius: 9px; cursor: pointer; overflow-wrap: anywhere; }
.suggestions li:hover, .suggestions li[aria-selected=true] { background: var(--bleu-pale); }

/* Espace connecté */
select { background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%); background-position: calc(100% - 1.25rem) 55%, calc(100% - .9rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.avec-bouton { position: relative; }
.avec-bouton input { padding-right: 5.5rem; }
.avec-bouton .lien { position: absolute; right: .875rem; top: 50%; transform: translateY(-50%); margin-top: .1875rem; font-size: .9375rem; }
.titre-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.lignes { list-style: none; margin: 1rem 0 0; padding: 0; }
.lignes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .875rem 0; border-bottom: 1px solid var(--trait); }
.lignes li:last-child { border-bottom: 0; }
.lignes li > a:first-child { display: block; flex: 1 1 16rem; min-width: 0; color: var(--encre); text-decoration: none; overflow-wrap: anywhere; }
.lignes li > a:first-child:hover .ligne-titre { color: var(--bleu); }
.ligne-titre { display: block; font-weight: 650; }
.ligne-detail { display: block; color: var(--gris); font-size: .9375rem; }
.etiquette { padding: .25rem .75rem; border-radius: 999px; background: #fff5dc; color: #6b4a00; font-size: .875rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.etiquette.faite { background: #e3f5ed; color: var(--vert); }
.intertitre { margin-top: 2rem; }
.reprise .bouton { margin-top: 1rem; }
.bouton.bordure { box-shadow: inset 0 0 0 1.5px var(--trait); color: var(--encre); }
.suppression.etroite { max-width: 36rem; margin-inline: auto; }

/* Pages légales */
.texte-legal h2 { margin-top: 1.75rem; }
.texte-legal ul { padding-left: 1.25rem; margin: .5rem 0 0; }
.texte-legal li { padding: .125rem 0; }
.texte-legal p, .texte-legal li { overflow-wrap: anywhere; }
.tableau-legal { min-width: 0; margin-top: .75rem; font-size: .9375rem; }
.tableau-legal th, .tableau-legal td { vertical-align: top; padding-right: .625rem; }
@media (max-width: 34rem) {
  .tableau-legal, .tableau-legal tbody, .tableau-legal tr, .tableau-legal td { display: block; }
  .tableau-legal thead { display: none; }
  .tableau-legal tr { padding: .625rem 0; border-bottom: 1px solid var(--trait); }
  .tableau-legal td { border: 0; padding: .125rem 0; }
  .tableau-legal td:first-child { font-weight: 600; }
}

/* Traitement d'un dossier (admin) */
.liens-pieces { margin: .5rem 0 0; padding-left: 1.25rem; }
.liens-pieces li { padding: .1875rem 0; }
.cadrage { margin-top: .75rem; }
.cadrage canvas { display: block; width: 100%; height: auto; border-radius: 12px; cursor: crosshair; background: var(--trait); }
.apercu { display: block; width: 100%; max-width: 40rem; height: auto; margin-top: 1rem; border-radius: 12px; }
.journal { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--fond); padding: .875rem; border-radius: 12px; font-size: .875rem; margin-top: .75rem; }
.alerte ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.telechargements { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.telechargements .ajout { display: flex; justify-content: flex-start; text-align: left; }
