/* Styles communs aux pages de réservation (reserver.html) et de contrat
   par lien (contrat.html) : formulaires, contrat à lire, signature,
   panneaux de confirmation. */
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; font-family: 'Archivo', sans-serif; }
.back-link { font-size: 13.5px; font-weight: 600; color: oklch(38% 0.06 320); text-decoration: none; }
.page-title { font-family: 'Anton', sans-serif; font-size: clamp(28px, 4.5vw, 38px); line-height: 1.05; margin-top: 14px; }
.page-lead { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: oklch(45% 0.05 320); max-width: 600px; }
.page-lead a { color: oklch(48% 0.24 330); font-weight: 700; }
.card { background: #fff; border: 1px solid oklch(93% 0.02 330); border-radius: 20px; padding: 20px; box-shadow: 0 4px 18px oklch(24% 0.09 320 / 0.06); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-num { width: 30px; height: 30px; border-radius: 50%; background: oklch(94% 0.06 330); color: oklch(45% 0.2 330); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-title { font-family: 'Anton', sans-serif; font-size: 21px; letter-spacing: 0.2px; }
.card-hint { font-size: 13.5px; color: oklch(48% 0.04 320); margin: -6px 0 16px; line-height: 1.55; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) { .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: oklch(48% 0.24 330); }
.field-label .optional { text-transform: none; letter-spacing: 0; font-weight: 600; color: oklch(45% 0.04 320); }
/* 16px minimum : en dessous, Safari sur iPhone zoome la page à chaque saisie. */
.field input, .field textarea, .field select { font: 500 16px 'Archivo', sans-serif; padding: 12px; min-height: 50px; border-radius: 12px; border: 1.5px solid oklch(88% 0.04 330); background: oklch(99% 0.005 330); color: oklch(26% 0.08 320); width: 100%; min-width: 0; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .promo-row input:focus-visible { outline: none; border-color: oklch(50% 0.26 340); box-shadow: 0 0 0 3px oklch(50% 0.26 340 / 0.18); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field .help { font-size: 12.5px; color: oklch(45% 0.04 320); line-height: 1.45; }
/* Conducteur de moins de 22 ans ou de moins de 3 ans de permis : en rouge
   pour qu'il ne passe pas inaperçu (caution de 3 000 €), mais ce n'est pas une erreur, la réservation passe. Pas de
   display ici, sinon l'attribut hidden serait ignoré. */
.driver-warning { grid-column: 1 / -1; margin: 0; padding: 13px 15px; border-radius: 12px; border: 1.5px solid oklch(58% 0.21 27); background: oklch(96% 0.035 27); color: oklch(40% 0.17 27); font-size: 14px; font-weight: 600; line-height: 1.5; }
.driver-warning strong { display: block; font-weight: 800; font-size: 14.5px; margin-bottom: 3px; color: oklch(48% 0.21 27); }
/* Étape « Tes pièces » (js/pieces.js) */
.pieces { margin-top: 22px; padding-top: 20px; border-top: 1px solid oklch(93% 0.02 330); display: flex; flex-direction: column; gap: 12px; }
.pieces-head { font-family: 'Anton', sans-serif; font-size: 18px; letter-spacing: 0.2px; }
.pieces .card-hint { margin: -4px 0 4px; }
.pieces-list { display: flex; flex-direction: column; gap: 10px; }
.piece { border: 1.5px solid oklch(90% 0.03 330); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: oklch(99% 0.005 330); }
.piece-title { font-weight: 700; font-size: 14.5px; }
.piece-file { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: oklch(40% 0.12 150); }
.piece-file.is-uploading { color: oklch(45% 0.04 320); }
.piece-file.is-error { color: oklch(48% 0.2 27); }
.piece-add { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1.5px dashed oklch(70% 0.12 330); border-radius: 12px; color: oklch(48% 0.24 330); font-weight: 700; font-size: 14.5px; cursor: pointer; }
.piece-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.pieces-later { margin-top: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: oklch(50% 0.26 340); flex-shrink: 0; cursor: pointer; }
.check .extra { font-weight: 700; color: oklch(48% 0.24 330); white-space: nowrap; }
.check a { color: oklch(48% 0.24 330); font-weight: 700; }
.check .check-sub { display: block; font-size: 13px; font-weight: 500; color: oklch(45% 0.04 320); margin-top: 2px; }
/* .check est en flex : sans cette règle, l'attribut hidden serait ignoré. */
.check[hidden], .km-included[hidden] { display: none; }
.link-btn { background: none; border: none; padding: 0; margin-left: 6px; font: inherit; color: oklch(48% 0.24 330); text-decoration: underline; cursor: pointer; }
.form-error { margin-top: 14px; background: oklch(97% 0.05 40); border: 1px solid oklch(85% 0.1 40); color: oklch(42% 0.15 35); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.form-error[hidden] { display: none; }
.submit-btn { margin-top: 16px; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 56px; background: linear-gradient(100deg, oklch(52% 0.22 320), oklch(50% 0.26 340)); color: #fff; font: 700 16.5px 'Archivo', sans-serif; border: none; border-radius: 15px; cursor: pointer; box-shadow: 0 10px 26px oklch(50% 0.26 340 / 0.32); }
.submit-btn:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.submit-note { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: oklch(48% 0.04 320); text-align: center; }
/* Second conducteur : grille imbriquée sur toute la largeur. */
.sd-fields { grid-column: 1 / -1; padding: 16px; border-radius: 16px; background: oklch(98% 0.01 330); border: 1px solid oklch(93% 0.02 330); }
.sd-fields[hidden] { display: none; }
.sd-title { grid-column: 1 / -1; font-weight: 700; font-size: 15px; }
.submit-note a { color: oklch(48% 0.24 330); font-weight: 700; }
/* Étape contrat : le texte vient du back office (classes ct-*), ici sa
   mise en forme. Alignement à gauche : justifié, il se troue sur téléphone. */
.contract-step { max-width: 780px; margin: 0 auto; }
.contract-step[hidden] { display: none; }
.contract-step .page-lead { max-width: none; }
.contract-doc { margin-top: 20px; background: #fff; border: 1px solid oklch(93% 0.02 330); border-radius: 20px; padding: 22px 18px; font-size: 14.5px; line-height: 1.6; color: oklch(30% 0.05 320); box-shadow: 0 4px 18px oklch(24% 0.09 320 / 0.06); overflow-wrap: anywhere; }
@media (min-width: 640px) { .contract-doc { padding: 30px 34px; } }
.ct-title { font-family: 'Anton', sans-serif; font-size: 23px; font-weight: 400; letter-spacing: 0.3px; text-align: center; margin: 0 0 4px; color: oklch(26% 0.08 320); }
.ct-p { margin: 0 0 10px; }
.ct-center { text-align: center; }
.ct-h { font-size: 15px; font-weight: 800; margin: 22px 0 8px; color: oklch(45% 0.2 330); }
.ct-list { margin: 0 0 10px; padding-left: 20px; }
.ct-list li { margin-bottom: 6px; }
.ct-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 13.5px; }
.ct-table th, .ct-table td { border: 1px solid oklch(90% 0.02 330); padding: 8px 10px; vertical-align: top; text-align: left; }
.ct-table th { width: 42%; font-weight: 700; }
.ct-table.ct-shade th { background: oklch(97.5% 0.01 330); }
.ct-signs { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid oklch(90% 0.02 330); border-radius: 12px; margin: 10px 0 14px; overflow: hidden; }
.ct-sign { padding: 12px; font-size: 13px; min-height: 70px; }
.ct-sign + .ct-sign { border-top: 1px solid oklch(90% 0.02 330); }
.ct-sign-img { display: block; max-width: 160px; margin-top: 8px; }
.ct-box { font-size: 12.5px; background: oklch(97% 0.01 330); border-radius: 10px; padding: 10px 12px; }
@media (min-width: 640px) {
  .ct-signs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-sign + .ct-sign { border-top: 0; border-left: 1px solid oklch(90% 0.02 330); }
}
@media (max-width: 520px) {
  /* Libellé au-dessus de sa valeur : deux colonnes étroites seraient illisibles. */
  .ct-table th, .ct-table td { display: block; width: auto; }
  .ct-table tr + tr th, .ct-table td { border-top: 0; }
}

.sign-card { margin-top: 16px; }
.sign-pad { position: relative; margin-top: 4px; height: 190px; padding: 8px; border: 2px dashed oklch(84% 0.06 330); border-radius: 14px; background: #fff; touch-action: none; }
.sign-pad canvas { display: block; width: 100%; height: 100%; border-radius: 8px; cursor: crosshair; touch-action: none; }
.sign-hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13.5px; color: oklch(55% 0.04 320); pointer-events: none; }
.sign-hint[hidden] { display: none; }
.sign-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; font-size: 12.5px; color: oklch(48% 0.04 320); }
.sign-tools .link-btn { margin: 0; font-weight: 700; }
.contract-back { display: inline-block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: oklch(38% 0.06 320); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.panel { max-width: 640px; margin: 40px auto 0; text-align: center; }
.panel[hidden], .layout[hidden], .intro[hidden] { display: none; }
.panel:focus { outline: none; }
.panel .badge-ok { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: oklch(94% 0.08 150); color: oklch(42% 0.15 150); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.panel p { font-size: 15.5px; line-height: 1.65; color: oklch(40% 0.05 320); margin: 12px 0 0; }
.panel .ref { font-family: 'Anton', sans-serif; font-size: 26px; letter-spacing: 1px; color: oklch(45% 0.24 335); }
.panel .next { text-align: left; margin: 22px auto 0; padding: 18px 20px 18px 38px; background: #fff; border: 1px solid oklch(93% 0.02 330); border-radius: 18px; font-size: 14.5px; line-height: 1.7; color: oklch(40% 0.05 320); }
.panel .actions { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 24px; }
.wa-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: oklch(52% 0.16 145); color: #fff; font-weight: 700; font-size: 16px; padding: 16px 26px; border-radius: 15px; text-decoration: none; box-shadow: 0 10px 26px oklch(52% 0.16 145 / 0.32); }
.text-link { font-size: 14.5px; font-weight: 700; color: oklch(48% 0.24 330); text-decoration: none; }

.phone-row { display: flex; gap: 8px; }
.phone-row select { width: 40%; flex: none; }
.phone-row input { flex: 1; }
