/* =====================================================================
   OLA'KEY CONCIERGERIE — Fiche individuelle d'enregistrement voyageur
   Feuille de styles unique, écrite à la main, sans framework.

   Jetons repris du thème WordPress « olakey »
   (wp-content/themes/olakey/assets/css/main.css) :
     --gold #C9A227 · --gold-light #e2c060 · --ink #0d0d0d
     --cream #f0ede8 · --muted #9a9590 · transition .3s
   Le site vitrine est sombre, ce formulaire est un document que l'on
   remplit : il prend un fond clair le jour, et bascule sur la palette
   sombre du site quand le téléphone est en mode nuit.
   ===================================================================== */

:root {
  /* --- Couleurs de marque (identiques au thème) --- */
  --gold:         #C9A227;
  --gold-light:   #E2C060;
  --ink:          #0D0D0D;
  --cream:        #F0EDE8;

  /* --- Surfaces, mode clair --- */
  --bg:           #F6F3EE;
  --bg-tint:      rgba(201, 162, 39, 0.05);
  --surface:      #FFFFFF;
  --surface-2:    #FBF9F5;
  --line:         #E9E3D9;
  --line-strong:  #D9D2C5;

  /* --- Textes --- */
  --text:         #0D0D0D;
  --text-soft:    #34312C;
  --text-muted:   #6B665F;   /* 5,2:1 sur --bg */
  --gold-deep:    #7A6212;   /* or lisible en texte : 5,3:1 */
  --gold-ring:    #A8871C;   /* anneau de focus : 3,1:1 */
  --gold-dim:     rgba(201, 162, 39, 0.13);
  --gold-border:  rgba(201, 162, 39, 0.36);
  --danger:       #B3261E;
  --danger-bg:    #FCEDEC;
  --danger-line:  #F0C8C4;
  --success:      #1E6F4B;

  /* --- Formes --- */
  --r-sm:         10px;
  --r:            14px;
  --r-lg:         22px;
  --r-pill:       999px;
  --shadow-sm:    0 1px 2px rgba(13, 13, 13, 0.04);
  --shadow:       0 1px 2px rgba(13, 13, 13, 0.04), 0 18px 40px -24px rgba(13, 13, 13, 0.28);
  --shadow-lift:  0 2px 4px rgba(13, 13, 13, 0.05), 0 30px 60px -30px rgba(13, 13, 13, 0.38);

  /* --- Rythme --- */
  --gap:          18px;
  --pad-card:     24px 20px;
  --transition:   170ms cubic-bezier(0.2, 0.7, 0.3, 1);

  /* --- Typographie (mêmes familles que le site) --- */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-wordmark:'Barlow Condensed', 'Arial Narrow', sans-serif;
}

/* --- Mode nuit : la palette du site vitrine --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0D0D0D;
    --bg-tint:      rgba(201, 162, 39, 0.06);
    --surface:      #151515;
    --surface-2:    #1B1B1B;
    --line:         rgba(240, 237, 232, 0.10);
    --line-strong:  rgba(240, 237, 232, 0.20);

    --text:         #F0EDE8;
    --text-soft:    #DCD8D1;
    --text-muted:   #9A9590;
    --gold-deep:    #E2C060;   /* 9,3:1 sur --surface */
    --gold-ring:    #C9A227;
    --gold-dim:     rgba(201, 162, 39, 0.14);
    --gold-border:  rgba(201, 162, 39, 0.34);
    --danger:       #F2B8B5;
    --danger-bg:    rgba(179, 38, 30, 0.16);
    --danger-line:  rgba(242, 184, 181, 0.32);
    --success:      #7BD3A6;

    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --shadow-lift:  0 2px 4px rgba(0, 0, 0, 0.5), 0 30px 60px -30px rgba(0, 0, 0, 1);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: radial-gradient(120% 60% at 50% 0%, var(--bg-tint), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
/* Nos règles d'affichage ne doivent jamais l'emporter sur l'attribut hidden. */
[hidden] { display: none !important; }

/* Défilement bloqué derrière une fenêtre modale (posé par classe : la CSP
   de l'application interdit les styles en ligne, même posés par script). */
body.is-locked { overflow: hidden; }

/* --- Quelques utilitaires d'espacement.
   La CSP interdit l'attribut style : tout passe par une classe. --- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 22px; }
.inline-form { display: inline; }
.self-center { align-self: center; }
a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--text); }
ul { list-style: none; }
fieldset { border: 0; }

/* --- Focus visible partout, jamais supprimé --- */
:focus-visible {
  outline: 2px solid var(--gold-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--r-sm); text-decoration: none; transition: top var(--transition);
}
.skip-link:focus { top: 12px; color: #fff; }

/* =====================================================================
   Ossature
   ===================================================================== */

.shell { width: min(780px, 100% - 28px); margin-inline: auto; }

/* --- En-tête : logo centré, bandeau sombre + filet or, comme le site.
   Le logo officiel est un lettrage clair sur fond transparent : posé sur
   un aplat clair, il devient illisible. --- */
.site-header {
  background: var(--ink);
  border-bottom: 3px solid var(--gold);
  padding: 16px 0 12px;
  text-align: center;
}
.site-header .logo { display: inline-block; }
.site-header .logo img { height: 110px; width: auto; margin-inline: auto; }

/* --- Barre de langue --- */
.toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 0 0;
}

.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}
.lang-switch button {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 18px;
  min-height: 38px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
  font-weight: 500;
}

/* --- Badges de réassurance --- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 7px 14px;
}
.badge svg { width: 14px; height: 14px; flex: none; }
.badge--active {
  color: var(--gold-deep);
  border-color: var(--gold-border);
  background: var(--gold-dim);
}

/* --- Cartes --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--pad-card);
  margin-bottom: var(--gap);
}
.card--intro { box-shadow: var(--shadow); }
.card.step { box-shadow: var(--shadow); }

/* --- Intitulés : petites capitales espacées + titre à accent italique --- */
.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.eyebrow-line { width: 40px; height: 1px; background: var(--gold); margin: 0 0 16px; }

.title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 5.4vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
}
.title em { display: block; font-style: italic; color: var(--gold-deep); }
.title--step { font-size: clamp(1.3rem, 4.4vw, 1.6rem); margin-bottom: 0; }
.title--step em { display: inline; }

.lead { color: var(--text-soft); margin-bottom: 12px; }
.legal-note { font-size: 0.875rem; color: var(--text-muted); }

.property-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.property-line .label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.property-line .value { font-weight: 500; color: var(--text); }

/* --- En-tête d'étape --- */
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.step-number {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold-deep);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.step-head .eyebrow { margin-bottom: 2px; }

/* --- Progression --- */
.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 0 12px;
  margin-bottom: 4px;
  background: linear-gradient(to bottom, var(--bg) 62%, transparent);
}
.progress-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.progress-seg {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background 260ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.progress-seg.is-done { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.progress-text {
  margin-top: 7px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.progress-text.is-done { color: var(--success); }

/* =====================================================================
   Champs
   ===================================================================== */

.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
.field--wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; min-width: 0; }

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  width: 100%;
}

label, .field-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-soft);
}
.req { color: var(--gold-deep); }
.optional { font-weight: 300; color: var(--text-muted); }

.shortcut {
  font-size: 0.8125rem;
  color: var(--gold-deep);
  background: none;
  border: none;
  padding: 4px 2px;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shortcut:hover { color: var(--text); }

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;              /* ≥ 16px : évite le zoom automatique iOS */
  font-weight: 300;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 14px 15px;
  min-height: 52px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  appearance: none;
}
input::placeholder { color: var(--text-muted); opacity: 0.75; }
input:hover, select:hover { border-color: var(--gold-border); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-ring);
  outline-offset: 1px;
  border-color: var(--gold-ring);
  background: var(--surface);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B665F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.8 6 6.4l5-4.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px 8px;
  padding-right: 40px;
  cursor: pointer;
}
/* Safari iOS n'aligne pas les champs date : on le force. */
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

.hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 7px; }
.hint--gold {
  border-left: 2px solid var(--gold-border);
  padding-left: 10px;
}

.error-text {
  display: none;
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 7px;
}
.field.has-error .error-text { display: block; }
.field.has-error input,
.field.has-error select,
.field.has-error .dropzone,
.field.has-error .segmented,
.field.has-error .stepper,
.field.has-error .signature-row { border-color: var(--danger); }

/* --- Sélecteur à deux pastilles (sexe) --- */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 0;
}
.segment {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-soft);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
/* Pastille de sélection, discrète tant que rien n'est choisi. */
.segment::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.segment:has(input:checked)::before {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--gold);
}
.segment input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.segment:hover { border-color: var(--gold-border); background: var(--gold-dim); }
.segment:has(input:checked) {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 500;
}
.segment:has(input:focus-visible) { outline: 2px solid var(--gold-ring); outline-offset: 2px; }

/* --- Compteur (nombre d'enfants) --- */
.stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow: hidden;
  max-width: 220px;
}
.stepper input {
  border: none;
  background: none;
  text-align: center;
  min-height: 50px;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { outline-offset: -2px; }
.stepper-btn {
  border: none;
  background: none;
  color: var(--text-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.stepper-btn:hover { background: var(--gold-dim); color: var(--gold-deep); }

/* --- Dépôt de fichier --- */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 22px 16px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}
.dropzone.is-dragging { border-color: var(--gold); background: var(--gold-dim); }
.dropzone input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.dropzone-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold-deep);
}
.dropzone-icon svg { width: 22px; height: 22px; }
.dropzone-text { font-size: 0.9375rem; color: var(--text-soft); }
.dropzone .hint { margin-top: 6px; }

.link-button {
  display: inline;
  color: var(--gold-deep);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--text); }

.dropzone-filled {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.file-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: none;
}
.file-badge {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold-deep);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  flex: none;
}
.file-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9375rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* --- Filets --- */
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* --- Cases à cocher --- */
.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 4px 0;
  min-height: 44px;
}
.check input[type="checkbox"] {
  appearance: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
  flex: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.check input[type="checkbox"]:hover { border-color: var(--gold-ring); }
.check input[type="checkbox"]:checked {
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath fill='none' stroke='%230D0D0D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='m1.5 6.4 3.6 3.6L12.5 2'/%3E%3C/svg%3E") center / 13px 11px no-repeat;
  border-color: var(--gold);
}
.check label { font-weight: 300; font-size: 0.9375rem; color: var(--text-soft); cursor: pointer; letter-spacing: 0; }
/* Le lien vers le document est un bouton : il vit à côté du label, pas dedans. */
.check-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.check .error-text { grid-column: 2; }
.check-link { display: inline-block; margin-left: 6px; font-size: 0.875rem; }

/* --- Signature --- */
.signature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 16px;
  transition: border-color var(--transition), background var(--transition);
}
.signature-row.is-signed { border-color: var(--gold-border); background: var(--gold-dim); }
.signature-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.signature-status { font-size: 0.875rem; color: var(--text-muted); }
.signature-status.is-signed { color: var(--success); font-weight: 500; }
.signature-preview {
  max-height: 52px;
  width: auto;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  min-height: 48px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 24px -14px rgba(201, 162, 39, 0.9);
}
.btn-gold:hover { background: var(--gold-light); color: var(--ink); }
.btn-gold[disabled] { background: var(--line-strong); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }
.btn-outline { border-color: var(--line-strong); color: var(--text-soft); background: var(--surface); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-quiet { background: none; color: var(--text-muted); border-color: transparent; }
.btn-quiet:hover { color: var(--text); }
.btn-block { width: 100%; min-height: 56px; font-size: 0.9375rem; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.btn-arrow { width: 18px; height: 18px; transition: transform var(--transition); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn[aria-busy="true"] .btn-arrow { display: none; }

/* Le bouton d'envoi reste à portée de pouce jusqu'au bas du formulaire. */
.submit-dock {
  position: sticky;
  bottom: 0;
  margin: 22px -20px -24px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--surface) 68%, transparent);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* --- Message global --- */
.alert {
  display: none;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 0.9375rem;
  margin-bottom: 16px;
}
.alert.is-visible { display: block; }
.alert-error { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); }
.alert-info { background: var(--gold-dim); border: 1px solid var(--gold-border); color: var(--gold-deep); }

/* =====================================================================
   Modale de signature
   ===================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(13, 13, 13, 0.62);
  backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  width: min(680px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px 18px 18px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.canvas-wrap {
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  max-width: 640px;
  margin-inline: auto;
}
#signature-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  touch-action: none;         /* bloque le défilement pendant le tracé */
  cursor: crosshair;
  background: #fff;
}
.canvas-help {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 10px 0 16px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 auto; }

/* --- Fenêtre des documents (règlement, contrat) --- */
.modal-panel--doc {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  max-height: min(760px, calc(100dvh - 32px));
}
.doc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.doc-modal-head .modal-title { margin: 0; font-size: 1.2rem; }
.icon-button {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }

.doc-modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 22px;
  -webkit-overflow-scrolling: touch;
}
.doc-modal-body .doc-section { margin-bottom: 18px; }
.doc-modal-body .doc-section:last-of-type { margin-bottom: 6px; }
.doc-modal-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.doc-modal-body p { font-size: 0.9375rem; color: var(--text-soft); }
.doc-section--numbered h3 { display: flex; align-items: baseline; gap: 10px; }
.doc-number {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold-deep);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
}

.doc-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.doc-modal-foot .btn-gold { flex: 1 1 auto; min-width: 180px; }

/* Le lien qui ouvre un document est un bouton : il ne doit pas en avoir l'air. */
button.check-link {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-body);
}

/* =====================================================================
   Documents, confirmation, mentions
   ===================================================================== */

.doc-section { margin-bottom: 20px; }
.doc-section h2 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.doc-section p { color: var(--text-soft); font-size: 0.9375rem; }

.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.thanks-mark {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.thanks-mark svg { width: 28px; height: 28px; stroke: var(--gold-deep); }
.reference-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.reference-box .label {
  font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
}
.reference-box .value {
  font-size: 1.1875rem; font-weight: 500; letter-spacing: 0.06em; color: var(--text);
  font-variant-numeric: tabular-nums;
}

.privacy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 26px;
}
.privacy h2 {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 500;
}

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 34px 0 30px;
  text-align: center;
}
.site-footer img { height: 84px; width: auto; margin: 0 auto 14px; }
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: #fff; }
.footer-contacts {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.9375rem; margin-bottom: 14px;
}
.footer-rights { font-size: 0.8125rem; color: #9A9590; }

/* =====================================================================
   Back-office
   ===================================================================== */

.admin-body { background: var(--bg); }
.admin-header { background: var(--ink); color: #fff; padding: 14px 0; }
.admin-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-brand {
  font-family: var(--font-wordmark);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-brand span { color: var(--gold); }
.admin-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.admin-nav a { color: #CFCAC3; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { color: var(--gold); }

.admin-shell { width: min(1180px, 100% - 32px); margin: 26px auto 60px; }

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 18px;
}

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 720px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th {
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500; background: var(--surface-2);
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
.pill {
  display: inline-block; font-size: 0.75rem; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--gold-dim); color: var(--gold-deep); border: 1px solid var(--gold-border);
}

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.kv { display: grid; grid-template-columns: 1fr; gap: 12px; }
.kv div { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.kv dt { font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.kv dd { font-size: 1rem; color: var(--text); font-weight: 400; }
.media-frame { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

.login-wrap { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: min(400px, 100%); }

.shell--admin { width: min(1180px, 100% - 32px); }
.admin-brand .sep { font-weight: 400; }
.table-wrap--flush { border: none; }
table.data--narrow { min-width: 520px; }
.btn-mini { padding: 4px 10px; min-height: auto; font-size: 0.75rem; }
.block { display: block; }
.signature-preview--lg { max-height: 120px; }
.id-preview { border: 1px solid var(--line); border-radius: var(--r-sm); }

/* =====================================================================
   Affiche d'accueil imprimable (QR code du logement)
   ===================================================================== */

.poster-body { background: var(--bg); padding: 20px 0 60px; }

.poster-tools {
  width: min(760px, 100% - 32px);
  margin: 0 auto 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.poster {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.poster-head {
  background: var(--ink);
  border-bottom: 3px solid var(--gold);
  text-align: center;
  padding: 20px 0 16px;
}
.poster-head img { height: 96px; width: auto; margin-inline: auto; }

.poster-body-inner { padding: 30px 26px 34px; text-align: center; }
.poster-body-inner .eyebrow-line { margin-inline: auto; }

.poster-lead { color: var(--text-soft); max-width: 52ch; margin: 0 auto 10px; }
.poster-lead strong { font-weight: 500; }
.poster-lead--en { color: var(--text-muted); font-size: 0.9375rem; }

.poster-qr { margin: 26px 0 18px; }
.poster-qr img {
  width: 300px;
  max-width: 78%;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  background: #fff;
}
.poster-scan {
  margin-top: 10px;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.poster-link-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.poster-link {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--gold-deep);
  word-break: break-all;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.poster-foot { margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }
.poster-foot strong { color: var(--text); font-weight: 500; }

/* =====================================================================
   Écrans larges
   ===================================================================== */

@media (min-width: 640px) {
  :root { --pad-card: 32px 30px; --gap: 20px; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 20px 22px; }
  .modal-actions .btn { flex: 0 0 auto; }
  .site-header { padding: 20px 0 16px; }
  .filters { grid-template-columns: repeat(4, 1fr) auto; }
  .kv { grid-template-columns: 1fr 1fr; gap: 14px 26px; }
  .footer-contacts { flex-direction: row; justify-content: center; gap: 18px; }
  .step-head { gap: 18px; }
  .submit-dock { margin: 24px -30px -32px; padding: 16px 30px 20px; }
}

@media (min-width: 900px) {
  .detail-grid { grid-template-columns: 1.15fr 1fr; }
}

/* --- Impression --- */
@media print {
  .site-header, .site-footer, .toolbar, .badges, .doc-actions, .privacy,
  .progress, .submit-dock { display: none !important; }
  body { background: #fff; }
  .card { border: none; box-shadow: none; padding: 0; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  .poster-body { background: #fff; padding: 0; }
  .poster-tools { display: none !important; }
  .poster { width: 100%; border: none; box-shadow: none; border-radius: 0; }
  .poster-head { padding: 0 0 14px; background: #fff; border-bottom: 2px solid var(--gold); }
  /* Le logo est un lettrage clair : sur papier blanc, on imprime le nom. */
  .poster-head img { display: none; }
  .poster-head::after {
    content: "OLA'KEY CONCIERGERIE";
    display: block;
    font-family: var(--font-wordmark);
    font-size: 26pt;
    letter-spacing: 0.08em;
    color: var(--ink);
  }
  .poster-qr img { width: 62mm; max-width: none; }
}

/* --- Mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
