/* Photo d'identité à distance — styles communs, alignés sur photo-identite-vannes.fr */
@font-face { font-family: "Manrope"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }

:root {
  /* palette du site */
  --ink: #1e1e1c;        /* titres */
  --text: #2b2b29;       /* texte courant */
  --ink-2: #4a4945;      /* texte secondaire */
  --muted: #6b6a66;
  --paper: #ffffff;
  --ivory: #f7f4f0;      /* sections beiges */
  --line: #e8e3dc;
  --line-2: #cfcac2;     /* contour des boutons secondaires */
  --accent: #a84e30;     /* terracotta */
  --accent-2: #8f4429;   /* terracotta foncé */
  --accent-soft: #f6e8e0;
  --sand: #d9c3a3;
  --night: #14120f;      /* pied de page */
  --ok: #3d7f57;
  --ok-soft: #e8f2eb;
  --warn: #b7791f;
  --warn-soft: #fbf1df;
  --bad: #b3412f;
  --bad-soft: #f8e5e0;
  --radius: 16px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* compatibilité avec les anciennes feuilles */
  --serif: var(--font);
  --sans: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
img { max-width: 100%; }
.i { width: 18px; height: 18px; flex: 0 0 auto; }

.wrap { max-width: 600px; margin: 0 auto; padding: 34px 20px 56px; }

/* Titres : fins, serrés, un mot en terracotta (balise em) */
h1, h2 { font-family: var(--font); font-weight: 300; color: var(--ink); margin: 0 0 16px; }
h1 { font-size: clamp(42px, 11vw, 74px); line-height: 1.02; letter-spacing: -0.045em; }
h2 { font-size: clamp(34px, 8.6vw, 52px); line-height: 1.06; letter-spacing: -0.035em; }
h1 em, h2 em, .title em { font-style: normal; color: var(--accent); }
h3, .eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-2); margin: 36px 0 14px; line-height: 1.4;
}
.eyebrow { display: block; margin: 0 0 18px; color: var(--accent); }
p.lead, .lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 10px; }
.note { font-size: 13.5px; color: var(--muted); }

/* Badges de mode (démo / test) */
.badge { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 99px; padding: 4px 10px; white-space: nowrap; }

/* Boutons pilule, comme sur le site */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 54px; padding: 0 30px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-weight: 500; font-size: 15px; letter-spacing: .01em; text-decoration: none; text-align: center; line-height: 1.2;
  transition: background .2s, border-color .2s, color .2s, opacity .2s;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary, .btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled), .btn-accent:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-outline-accent { background: var(--paper); color: var(--accent); border-color: var(--accent); }
.btn-danger { background: transparent; color: var(--bad); border-color: #e7c6bf; }
.btn-block { width: 100%; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.back { background: none; border: 0; padding: 6px 0; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; margin-bottom: 18px; text-decoration: none; }
.back:hover { color: var(--ink); }

/* Formulaires */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--paper); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,78,48,.14); }
.field.invalid input { border-color: var(--bad); }
.field .err { display: none; font-size: 12.5px; color: var(--bad); margin-top: 6px; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-cp { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 8px 0 18px; cursor: pointer; line-height: 1.5; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--accent); }

/* Messages */
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 15px 18px; margin: 18px 0; font-size: 14.5px; line-height: 1.5; }
.alert .i { width: 22px; height: 22px; margin-top: 1px; }
.alert b { display: block; margin-bottom: 2px; font-weight: 600; }
.alert-ok { background: var(--ok-soft); color: #22513a; }
.alert-warn { background: var(--warn-soft); color: #6d470f; }
.alert-bad { background: var(--bad-soft); color: #7a2a1d; }
.alert-info { background: var(--ivory); color: var(--ink-2); }

.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin 1s linear infinite; }
.spinner.dark { border-color: rgba(30,30,28,.12); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- En-tête du site ---------- */
.site-header { position: sticky; top: 0; z-index: 8; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header-in { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.logo svg { width: 44px; height: 44px; flex: 0 0 auto; }
.logo-txt { font-size: 19px; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.logo-txt small { display: block; font-size: 9.5px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.site-header .spacer { flex: 1; }
.site-header .btn-sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; }
@media (max-width: 420px) {
  .logo svg { width: 38px; height: 38px; }
  .logo-txt { font-size: 17px; }
  .site-header .to-site { display: none; }
}

/* ---------- Pied de page du site ---------- */
.site-footer { background: var(--night); color: rgba(244,239,232,.55); font-size: 14px; line-height: 1.7; }
.site-footer-in { max-width: 1240px; margin: 0 auto; padding: 54px 20px 30px; display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .site-footer-in { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .f-name { font-size: 21px; font-weight: 500; color: #f4efe8; margin-bottom: 10px; letter-spacing: -0.01em; }
.site-footer b { color: rgba(244,239,232,.8); font-weight: 600; }
.site-footer h4 { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #f4efe8; margin: 4px 0 14px; }
.site-footer a { color: rgba(244,239,232,.7); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .f-big { font-size: 18px; color: rgba(244,239,232,.75); line-height: 1.5; }
.site-footer .btn-ghost { color: #f4efe8; border-color: rgba(244,239,232,.35); margin-top: 16px; }
.site-footer .f-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(244,239,232,.12); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; }
