/* LOKANSAMB - site de la première location. Charte : jaune #FFD21C, anthracite #202833, blanc, gris clair #F3F5F8, vert #16A085. */
:root {
  --jaune: #FFD21C; --anthracite: #202833; --blanc: #fff; --gris: #F3F5F8; --gris-texte: #4a5565; --vert: #0B6B58; --rouge: #a3261f;
  --bord: #d9dee6; --rayon: 14px; --police: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--police); font-weight: 500; color: var(--anthracite); background: var(--blanc); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--anthracite); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--anthracite); outline-offset: 2px; box-shadow: 0 0 0 5px var(--jaune); }
.conteneur { width: min(1100px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); } h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.entete { background: var(--blanc); border-bottom: 4px solid var(--jaune); position: sticky; top: 0; z-index: 10; }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.menu { display: flex; gap: 18px; flex-wrap: wrap; }
.menu a { text-decoration: none; font-size: .95rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--jaune); }

.btn { display: inline-block; background: var(--jaune); color: var(--anthracite); border: 2px solid var(--jaune); padding: 12px 22px; border-radius: 999px; font: 700 1rem var(--police); text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffdf4f; border-color: #ffdf4f; }
.btn.secondaire { background: transparent; color: inherit; border-color: currentColor; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.bandeau-brouillon { background: var(--anthracite); color: var(--jaune); text-align: center; padding: 10px 16px; font-weight: 700; }

.hero { background: var(--anthracite); color: var(--blanc); padding-block: clamp(40px, 8vw, 90px); }
.hero .conteneur { display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero p.chapeau { color: var(--jaune); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin-bottom: .8em; }
.hero p { color: #dfe4ea; max-width: 56ch; }
.hero .photo-hero { border-radius: var(--rayon); overflow: hidden; border: 3px solid var(--jaune); }
.hero .photo-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero .btn.secondaire { color: var(--blanc); }

section.bloc { padding-block: clamp(36px, 6vw, 72px); }
section.gris { background: var(--gris); }

.galerie { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; }
.galerie figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--gris); }
.galerie figure:first-child { grid-column: span 2; grid-row: span 2; }
.galerie img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fiche { display: grid; gap: 28px; grid-template-columns: 1.2fr .8fr; align-items: start; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 1em; padding: 0; list-style: none; }
.specs li { background: var(--blanc); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; }
.specs small { display: block; color: var(--gris-texte); font-size: .78rem; }
.prix-carte { background: var(--anthracite); color: var(--blanc); border-radius: var(--rayon); padding: 22px; }
.prix-carte .montant { font-size: 2rem; font-weight: 700; color: var(--jaune); line-height: 1.1; }
.prix-carte p { color: #dfe4ea; font-size: .92rem; }
.prix-carte .petit { color: #dfe4ea; font-size: .9rem; font-weight: 500; }

.etapes { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); counter-reset: etape; padding: 0; list-style: none; margin: 0 0 24px; }
.etapes li { background: var(--blanc); border-radius: var(--rayon); padding: 20px; border-top: 4px solid var(--jaune); counter-increment: etape; }
.etapes li::before { content: counter(etape); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--jaune); font-weight: 700; margin-bottom: 10px; }

.avis { background: #fff8d6; border-left: 5px solid var(--jaune); padding: 14px 18px; border-radius: 8px; margin: 0 0 1em; }
.avis-erreur { background: #fdecea; border-left-color: var(--rouge); }

.carte { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px; margin: 0 0 20px; }
.formulaire { display: grid; gap: 14px; }
.formulaire label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.formulaire input, .formulaire select, .formulaire textarea { font: 500 1rem var(--police); padding: 11px 12px; border: 2px solid var(--bord); border-radius: 10px; width: 100%; background: var(--blanc); color: var(--anthracite); }
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { border-color: var(--anthracite); }
.formulaire .case { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.formulaire .case input { width: 22px; height: 22px; margin-top: 3px; flex: none; }
.grille-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.estimation { font-weight: 700; }
.aide, .petit { color: var(--gris-texte); font-size: .88rem; }

.pied { background: var(--anthracite); color: #dfe4ea; padding-block: 28px; font-size: .92rem; }
.pied a { color: var(--jaune); }
.pied .liens { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }

.interne { padding-block: 36px 60px; max-width: 900px; }
.ref { background: var(--jaune); padding: 2px 10px; border-radius: 6px; letter-spacing: .06em; }
.prose h2 { margin-top: 1.6em; }

/* Gestion */
.barre-gestion { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tableau { overflow-x: auto; margin-bottom: 24px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
th { background: var(--gris); }
.fiche-demande { display: grid; grid-template-columns: 11rem 1fr; gap: 8px 16px; margin: 0; }
.fiche-demande dt { font-weight: 700; } .fiche-demande dd { margin: 0; overflow-wrap: anywhere; }
.liste-blocs { padding-left: 1.1em; } .en-ligne { display: inline; margin-left: 10px; }
.lien { background: none; border: 0; padding: 0; color: var(--rouge); text-decoration: underline; cursor: pointer; font: inherit; }
.filtres a { white-space: nowrap; }

@media (max-width: 860px) {
  .hero .conteneur, .fiche { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: repeat(2, 1fr); } .galerie figure:first-child { grid-column: span 2; grid-row: auto; }
  .etapes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .etapes, .grille-2, .specs { grid-template-columns: 1fr; }
  .fiche-demande { grid-template-columns: 1fr; }
  .menu { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Prise en main (page prise-en-main.php) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.suivi { position: sticky; top: 0; z-index: 9; background: var(--anthracite); color: var(--blanc); padding: 10px 0; font-weight: 700; }
.suivi .conteneur { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.suivi progress { flex: 1 1 160px; height: 10px; accent-color: var(--jaune); }
.liste-cases { display: grid; gap: 10px; margin: 0 0 1em; padding: 0; list-style: none; }
.liste-cases label.case { display: flex; gap: 12px; align-items: flex-start; background: var(--blanc); border: 1px solid var(--bord); border-radius: 10px; padding: 12px 14px; font-weight: 500; cursor: pointer; }
.liste-cases input[type="checkbox"] { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--anthracite); }
.liste-cases label.case:has(input:checked) { border-color: var(--vert); background: #eaf7f3; }
.photos { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 0 0 1em; padding: 0; list-style: none; }
.photo-slot { background: var(--blanc); border: 1px solid var(--bord); border-radius: 10px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.photo-slot > span { font-weight: 700; font-size: .92rem; }
.photo-slot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--gris); }
.photo-slot .btn { padding: 8px 12px; font-size: .9rem; text-align: center; }
.photo-slot:focus-within .btn { outline: 3px solid var(--anthracite); outline-offset: 2px; }
.photo-slot.fait { border-color: var(--vert); }
.champs-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
textarea.recap { width: 100%; min-height: 12rem; font: 500 .9rem/1.5 var(--police); padding: 12px; border: 2px solid var(--bord); border-radius: 10px; background: var(--gris); color: var(--anthracite); }
@media (max-width: 860px) { .photos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .champs-2 { grid-template-columns: 1fr; } }
.formulaire input.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.photo-slot { position: relative; min-width: 0; }
.photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-slot .btn { white-space: normal; }
@media (max-width: 860px) { .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[hidden] { display: none !important; }
@media (max-width: 860px) { .entete { position: static; } }
section[id] { scroll-margin-top: 64px; }

/* Schéma de carrosserie */
.schema { max-width: 520px; margin: 0 auto 1em; }
.schema svg { width: 100%; height: auto; display: block; touch-action: manipulation; cursor: crosshair; background: #fff; border: 1px solid var(--bord); border-radius: 10px; }
.sv-corps { fill: #fff; stroke: var(--anthracite); stroke-width: 2.2; stroke-linejoin: round; }
.sv-toit { fill: #eef1f5; stroke: var(--anthracite); stroke-width: 1.6; }
.sv-vitre { fill: #cfd9e6; stroke: var(--anthracite); stroke-width: 1.6; stroke-linejoin: round; }
.sv-trait { stroke: var(--anthracite); stroke-width: 1.4; fill: none; }
.sv-trait-plein { fill: var(--anthracite); }
.sv-roue { fill: var(--anthracite); }
.sv-jante { fill: #c9ced6; stroke: var(--anthracite); stroke-width: 1.2; }
.sv-arche { fill: #fff; stroke: var(--anthracite); stroke-width: 1.8; }
.sv-phare { fill: #ffe98a; stroke: var(--anthracite); stroke-width: 1.4; }
.sv-feu { fill: #e0746c; stroke: var(--anthracite); stroke-width: 1.4; }
.sv-etiquette { font: 700 13px var(--police); fill: var(--gris-texte); letter-spacing: .12em; }
.repere-depart { fill: #c0392b; stroke: #fff; stroke-width: 2.5; }
.repere-retour { fill: #1b5fb0; stroke: #fff; stroke-width: 2.5; }
.repere-texte { font: 700 12px var(--police); fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.liste-dommages { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.liste-dommages li { display: grid; gap: 8px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; background: var(--blanc); border: 1px solid var(--bord); border-radius: 10px; padding: 10px; }
.liste-dommages .pastille { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; }
.liste-dommages .pastille.depart { background: #c0392b; }
.liste-dommages .pastille.retour { background: #1b5fb0; }
.liste-dommages .zone { grid-column: 1 / 4; font-size: .85rem; color: var(--gris-texte); margin: 0; }
.liste-dommages input.remarque { grid-column: 1 / 4; }
.liste-dommages select, .liste-dommages input { font: 500 .95rem var(--police); padding: 8px; border: 2px solid var(--bord); border-radius: 8px; width: 100%; }
.liste-dommages .btn { padding: 8px 12px; font-size: .9rem; }

/* Compte rendu de prise en main */
.cr-actions { max-width: 800px; margin: 0 auto 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cr-page { max-width: 800px; margin: 0 auto; background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: 24px; color: #111; }
.cr-tete { border-bottom: 3px solid var(--jaune); margin-bottom: 14px; }
.cr-tete h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cr-tete p { margin: 0 0 6px; }
.cr-petit { font-size: .82rem; color: var(--gris-texte); }
.cr-bloc { margin: 0 0 16px; break-inside: avoid; }
.cr-bloc h3 { font-size: 1rem; margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--bord); }
.cr-bloc h4 { font-size: .92rem; margin: 10px 0 4px; }
.cr-paires { display: grid; grid-template-columns: 11rem 1fr; gap: 3px 12px; margin: 0; font-size: .92rem; }
.cr-paires dt { font-weight: 700; } .cr-paires dd { margin: 0; overflow-wrap: anywhere; }
.cr-schema svg { max-width: 360px; margin: 0 auto 8px; display: block; border: 0; cursor: default; }
.cr-table { width: 100%; font-size: .88rem; margin-bottom: 8px; }
.cr-table th, .cr-table td { padding: 5px 8px; border: 1px solid var(--bord); }
.cr-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cr-photos figure { margin: 0; } .cr-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.cr-photos figcaption { font-size: .72rem; text-align: center; }
.cr-points { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.cr-points li { padding: 2px 0; } .cr-points li.non { color: var(--rouge); }
.cr-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cr-sign { border: 1px solid #888; min-height: 120px; padding: 8px 10px; display: grid; align-content: space-between; }
.cr-sign em { font-style: normal; font-size: .82rem; color: var(--gris-texte); }
@media (max-width: 600px) { .cr-paires { grid-template-columns: 1fr; } .cr-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cr-page { padding: 14px; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .entete, .suivi, .pied, #prise-en-main, #declaration, .no-print, .bandeau-brouillon, main > section:not(#compte-rendu) { display: none !important; }
  body { background: #fff; font-size: 11px; }
  #compte-rendu { padding: 0; display: block; }
  #compte-rendu .conteneur { width: 100%; }
  .cr-page { border: 0; padding: 0; max-width: none; }
  .cr-schema svg, .repere-depart, .repere-retour, .cr-sign { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cr-schema svg { max-width: 280px; }
  .cr-photos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.memo-photo { display: grid; gap: 10px; justify-items: start; }
.memo-photo img { max-width: 100%; max-height: 220px; border-radius: 8px; }
.memo-photo.fait { border-color: var(--vert); }
.cr-memo { background: #fffbe8; border: 1px solid var(--jaune); border-radius: 8px; padding: 10px 12px; }
.cr-memo-img { display: block; width: 100%; max-width: 640px; height: auto; margin: 8px auto 0; border: 1px solid var(--bord); }
@media print { .cr-memo { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .cr-memo-img { max-height: 150mm; width: auto; max-width: 100%; } }
.prerempli { background: #fff8d6 !important; border-color: var(--jaune) !important; }

/* Pages de déclaration (incident, accident) */
.formulaire fieldset.radios { border: 0; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; min-width: 0; }
.formulaire fieldset.radios legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.formulaire fieldset.radios .case { background: var(--blanc); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 14px; }
.formulaire fieldset.radios .case:has(input:checked) { border-color: var(--vert); background: #eaf7f3; }
.formulaire .cond { display: grid; gap: 14px; }
.cr-paires dd { white-space: pre-line; }

/* Signature à la main */
.cr-sign { min-height: 0; align-content: start; gap: 6px; }
.sig-canvas { display: block; width: 100%; height: auto; aspect-ratio: 8 / 3; background: #fff; border: 2px dashed #888; border-radius: 6px; touch-action: none; cursor: crosshair; }
.cr-sign.signe .sig-canvas { border-style: solid; border-color: var(--vert); }
.sig-date { font-size: .8rem; color: var(--gris-texte); min-height: 1.1em; }
.sig-effacer { justify-self: start; padding: 6px 12px; font-size: .85rem; }
.cr-lieu-ligne { margin: 0 0 10px; }
.cr-lieu { font: 500 .95rem var(--police); border: 0; border-bottom: 1px solid #888; padding: 2px 4px; width: 16rem; max-width: 100%; background: transparent; color: #111; }
@media print {
  .sig-canvas { border: 1px solid #888 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cr-lieu { border: 0; outline: none !important; box-shadow: none; } .cr-lieu::placeholder { color: transparent; }
}

/* Espace administrateur (admin.php) */
.table-admin { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--bord); border-radius: var(--rayon); }
.table-admin table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-admin th, .table-admin td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.table-admin th { background: #f6f6f4; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table-admin .actions { display: grid; gap: 8px; min-width: 190px; }
.table-admin .actions .btn { padding: 6px 12px; font-size: .85rem; text-align: center; }
.table-admin .supprimer { display: grid; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--bord); }
.table-admin .case-sup { display: flex; gap: 8px; align-items: center; font-size: .85rem; }

/* Bandeau « mode administrateur » : visible d'un coup d'oeil, jamais imprimé (hauteur fixe de 38 px) */
.bandeau-admin { position: sticky; top: 0; z-index: 100; display: flex; gap: 10px; justify-content: space-between; align-items: center; height: 38px; box-sizing: border-box; background: var(--rouge); color: var(--blanc); padding: 0 16px; font: 600 .85rem var(--police); white-space: nowrap; border-bottom: 3px solid var(--jaune); }
.bandeau-admin a { color: var(--blanc); text-decoration: underline; }
.bandeau-admin-liens { display: flex; gap: 14px; }
body[data-bandeau] .suivi { top: 38px; }
@media (min-width: 861px) { body[data-bandeau] .entete { top: 38px; } }
body .bandeau-test { background: #b25b00; }
@media print { .bandeau-admin { display: none !important; } }
