/* =============================================================
   Q01 (12/10/2026) : outil zone à quota de Nice, pages zone, lead magnet.
   Complète styles.css (variables, .btn, .contact-form, .form-field, .data-table,
   .callout, .faq, .author-box…) : uniquement ce que ces composants n'ont pas.
   Chargé seulement sur zone-quota-nice.html, zone-quota-*.html et l'article
   réglementation Nice.
   ============================================================= */
/* l'attribut hidden doit l'emporter sur les display: grid / flex des composants */
.zq-card [hidden], .zq-result-section[hidden], .zq-result-section [hidden], .zq-lead-wrap [hidden], #zq-print[hidden] { display: none !important; }
.zq-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- carte de l'outil (dans le hero) ---------- */
.zq-card { position: relative; display: grid; gap: 1rem; padding: clamp(1.25rem, 3.5vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.zq-card__titre { font-family: var(--font-title); font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--ink); }
.zq-card form { display: grid; gap: 1rem; }
.zq-card .form-field input { min-height: 48px; font-size: 1rem; }
.zq-combo { position: relative; }
.zq-combo input { width: 100%; }
.zq-sugg { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: .3rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 18rem; overflow-y: auto; }
.zq-sugg li { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: .45rem .7rem; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.zq-sugg li[aria-selected="true"], .zq-sugg li:hover { background: var(--cream-2); }
.zq-sugg__l { font-weight: 600; color: var(--ink); }
.zq-sugg__s { font-size: .82rem; color: var(--ink-mute); }
.zq-rp { border: 0; margin: 0; padding: 0; display: grid; gap: .5rem; min-width: 0; }
.zq-rp legend { font-size: .85rem; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: .45rem; }
.zq-rp__choix { display: flex; gap: .6rem; flex-wrap: wrap; }
.zq-rp__choix label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--cream); cursor: pointer; font-weight: 600; font-size: .95rem; transition: border-color var(--t), background var(--t); }
.zq-rp__choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.zq-rp__choix label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--white); }
.zq-rp__choix label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.zq-note { font-size: .82rem; color: var(--ink-mute); margin: 0; line-height: 1.5; }
.zq-err { margin: .1rem 0 0; font-size: .85rem; font-weight: 600; color: #A3341F; }
.form-field input[aria-invalid="true"], .form-field select[aria-invalid="true"] { border-color: #A3341F; background: #FFF7F5; }
.zq-preuves { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .85rem; color: var(--ink-soft); }
.zq-preuves .rating-pill { box-shadow: none; }
.page-hero .btn-row + .zq-preuves { margin-top: 1.1rem; }
.zq-propositions { display: grid; gap: .5rem; }
.zq-prop__t { margin: 0; font-weight: 600; }
.zq-propositions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.zq-prop__b { width: 100%; min-height: 44px; text-align: left; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); font: inherit; color: var(--ink); cursor: pointer; }
.zq-prop__b:hover, .zq-prop__b:focus-visible { border-color: var(--gold); background: var(--white); }

/* étape « Votre résultat est prêt » */
.zq-gate { display: grid; gap: 1rem; }
.zq-gate__pret { display: flex; align-items: center; gap: .6rem; margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.zq-gate__pret svg { width: 26px; height: 26px; flex: none; color: #2F7D4F; }
.zq-gate__adr { margin: -.4rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.zq-gate form { display: grid; gap: .9rem; }
.zq-check { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; padding-top: .35rem; }
.zq-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--ink); cursor: pointer; }
.zq-sans { justify-self: center; min-height: 44px; padding: 0 .5rem; font-size: .92rem; color: var(--ink-soft); }
.zq-rgpd { font-size: .76rem; color: var(--ink-mute); margin: 0; line-height: 1.5; }
.zq-rgpd a { color: inherit; text-decoration: underline; }

/* ---------- résultat ---------- */
.zq-result-section { padding-block: clamp(2rem, 5vw, 3.5rem); background: var(--white); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 8px); }
.zq-result-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.zq-resultat { display: grid; gap: .9rem; }
.zq-resultat h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin: 0; }
.zq-resultat h2:focus { outline: none; }
.zq-resultat p { margin: 0; color: var(--ink-soft); line-height: 1.65; }
.zq-badge { justify-self: start; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: var(--radius-pill); font-family: var(--font-title); font-weight: 700; font-size: .85rem; letter-spacing: .02em; text-transform: uppercase; }
.zq-resultat .zq-badge--zone { background: var(--ink); color: var(--white); }
.zq-resultat .zq-badge--hors { background: #E3F0E7; color: #1F5A37; }
.zq-resultat .zq-badge--neutre { background: var(--cream-2); color: var(--ink); }
.zq-res-adresse { font-size: .92rem; color: var(--ink-mute) !important; }
.zq-alerte { display: block; padding: .7rem .9rem; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; color: var(--ink); font-weight: 600; }
.zq-faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .7rem; margin: .2rem 0 0; }
.zq-faits > div { padding: .8rem .9rem; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.zq-faits dt { font-size: .78rem; color: var(--ink-mute); margin-bottom: .2rem; }
.zq-faits dd { margin: 0; font-weight: 700; color: var(--ink); font-size: .95rem; overflow-wrap: break-word; }
.zq-faits a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }
.zq-res-principal { margin: .2rem 0 .1rem; }
.zq-res-principal .btn { white-space: normal; text-align: center; }
/* liens secondaires du résultat : une liste sobre sous le bouton principal (pas une pile de boutons) */
.zq-res-liens { list-style: none; margin: .3rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.zq-res-liens li { border-bottom: 1px solid var(--line); }
.zq-res-liens .link-arrow { display: flex; justify-content: space-between; gap: 1rem; min-height: 48px; padding-block: .7rem; margin-block: 0; color: var(--ink); line-height: 1.35; }
.zq-res-liens .link-arrow svg { flex: none; color: var(--gold-strong); }
.zq-res-liens .link-arrow:hover { gap: 1rem; color: var(--ink); }
.zq-disclaimer { font-size: .8rem !important; color: var(--ink-mute) !important; }
.zq-autre { margin: 0; }
.zq-autre .linklike { min-height: 44px; font-weight: 600; color: var(--ink); }
.zq-liste-zones { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--ink-soft); font-size: .92rem; }

/* ---------- formulaire « Recevoir mon dossier » ---------- */
.zq-lead-wrap { display: grid; gap: 1rem; scroll-margin-top: calc(var(--header-h) + 8px); }
.zq-lead-wrap .contact-form { gap: 1rem; }
.zq-suite__titre { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 0; }
.zq-suite__intro { margin: 0; color: var(--ink-soft); }
.zq-offre { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; font-size: .92rem; color: var(--ink-soft); }
.zq-offre li { position: relative; padding-left: 1.4rem; }
.zq-offre li::before { content: ""; position: absolute; left: .15rem; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.zq-lead .form-field input, .zq-lead .form-field select { min-height: 48px; font-size: 1rem; }
.zq-lead .btn { white-space: normal; }
.zq-lead__sous { margin: -.3rem 0 0; text-align: center; font-size: .85rem; color: var(--ink-soft); }
.zq-lead__avis { margin: -.7rem 0 0; text-align: center; }
.zq-avis-mini { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-size: .85rem; color: var(--ink-soft); text-decoration: none; }
.zq-avis-mini .stars { display: inline-flex; color: #E7B24A; }
.zq-avis-mini .stars svg { width: 13px; height: 13px; }
.zq-avis-mini strong { color: var(--ink); font-family: var(--font-title); }
.zq-avis-mini span:last-child { text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
.zq-lead[data-mode="complement"] .zq-champ-email { display: none; }
.zq-lead__err-global { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: #FFF1EE; color: #8A2A17; font-size: .9rem; }
.zq-confirm { padding: clamp(1.25rem, 3vw, 1.8rem); background: #F1F7F3; border: 1px solid #CFE3D6; border-radius: var(--radius-lg); }
.zq-confirm h3 { margin: 0 0 .5rem; }
.zq-confirm h3:focus { outline: none; }
.zq-confirm p { margin: 0 0 .8rem; color: var(--ink-soft); }
.zq-confirm a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }

/* ---------- contenus ---------- */
.zq-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.zq-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .95rem; border: 1px solid var(--gold-line); border-radius: var(--radius-pill); background: var(--white); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.zq-toc a:hover { border-color: var(--gold); }
.zq-carte { margin: 0; }
.zq-carte img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #E8F0F3; }
.zq-carte figcaption { margin-top: .6rem; font-size: .82rem; color: var(--ink-mute); }
.zq-legende { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .7rem 0 0; padding: 0; list-style: none; font-size: .88rem; color: var(--ink-soft); }
.zq-legende li { display: inline-flex; align-items: center; gap: .45rem; }
.zq-legende i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.25); }
.zq-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.zq-zones-cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.zq-zone-card { display: grid; gap: .45rem; align-content: start; padding: 1.2rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.zq-zone-card h3 { font-size: 1.08rem; margin: 0; display: flex; align-items: center; gap: .55rem; }
.zq-zone-card .zq-num { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .9rem; }
.zq-zone-card p { margin: 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }
.zq-zone-card strong.zq-quota { font-family: var(--font-title); font-size: 1.5rem; color: var(--ink); }
.zq-zone-card .link-arrow { margin-top: .3rem; }
.zq-details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.zq-details + .zq-details { margin-top: .7rem; }
.zq-details summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .8rem 1.1rem; cursor: pointer; font-family: var(--font-title); font-weight: 600; color: var(--ink); list-style: none; }
.zq-details summary::-webkit-details-marker { display: none; }
.zq-details summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold-strong); }
.zq-details[open] summary::after { content: "\2212"; }
.zq-details > div { padding: 0 1.1rem 1.1rem; }
.zq-voies { columns: 2; column-gap: 2rem; margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--ink-soft); }
.zq-voies li { break-inside: avoid; margin-bottom: .25rem; }
.zq-maj { font-size: .85rem; color: var(--ink-mute); margin: .8rem 0 0; }
.zq-sources { font-size: .88rem; color: var(--ink-soft); padding-left: 1.1rem; display: grid; gap: .35rem; }
.zq-sources a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }
.zq-btn-suite { margin-top: 1.4rem; }
.zq-cta-final { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }
.zq-encart { margin: 1.6rem 0; }
.zq-encart .city-links { margin-top: .8rem; }
.page-hero__visual .zq-carte img { aspect-ratio: auto; object-fit: contain; box-shadow: var(--shadow-md); clip-path: none; }

/* article réglementation Nice : en français, le formulaire du dossier remplace celui de contact
   (la version anglaise garde son formulaire : build-en.cjs retire l'attribut) */
[data-q01-masque] { display: none !important; }

/* Mobile : l'outil (ou les boutons) juste sous le H1, avant le résumé. L'ordre du HTML ne change
   pas (le résumé reste sous le H1 pour Google et les IA) : seul l'affichage est réordonné. */
@media (max-width: 980px) {
  body.zq-outil .page-hero__grid, body.zq-zone .page-hero__grid { display: flex; flex-direction: column; gap: 1.1rem; }
  body.zq-outil .page-hero__content, body.zq-zone .page-hero__content { display: contents; }
  body.zq-outil .page-hero .breadcrumb, body.zq-zone .page-hero .breadcrumb { order: 1; margin-bottom: 0; }
  body.zq-outil .page-hero h1, body.zq-zone .page-hero h1 { order: 2; margin-bottom: 0; }
  body.zq-outil .page-hero__visual { order: 3; }
  body.zq-outil .page-hero .answer-first { order: 4; margin-bottom: 0; }
  body.zq-zone .page-hero .btn-row { order: 3; }
  body.zq-zone .page-hero .btn-row + .zq-preuves { order: 3; margin-top: -.3rem; }
  body.zq-zone .page-hero .answer-first { order: 4; margin-bottom: 0; }
  body.zq-zone .page-hero__visual { order: 6; }
  .page-hero { padding-block: 1.6rem 2.4rem; }
}
@media (max-width: 480px) {
  body.zq-outil .page-hero h1, body.zq-zone .page-hero h1 { font-size: 1.62rem; line-height: 1.18; }
  body.zq-zone .page-hero .btn-row .btn { flex: 1 1 100%; padding-block: .9rem; }
  .zq-card { padding: 1.1rem; gap: .8rem; }
  .zq-card__titre { display: none; }
}

/* barre du bas d'écran (mobile) : renvoie vers l'outil ; cachée tant qu'un bouton équivalent ou un
   formulaire est à l'écran (zone-quota.js). La bulle WhatsApp redescend quand la barre est cachée. */
@media (max-width: 768px) {
  .sticky-cta { transition: transform .25s ease, visibility .25s; }
  body.zq-barre-cachee .sticky-cta { transform: translateY(110%); visibility: hidden; }
  .floaters { transition: bottom .25s ease; }
  body.zq-barre-cachee .floaters { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 980px) {
  .zq-result-grid, .zq-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* chiffres clés en lignes compactes (libellé à gauche, valeur à droite) */
  .zq-faits { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); overflow: hidden; }
  .zq-faits > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .7rem .9rem; border: 0; border-radius: 0; background: none; }
  .zq-faits > div + div { border-top: 1px solid var(--line); }
  .zq-faits dt { margin: 0; flex: none; font-size: .82rem; }
  .zq-faits dd { text-align: right; font-size: .92rem; }
  .zq-zones-cartes { grid-template-columns: minmax(0, 1fr); }
  .zq-res-principal .btn { width: 100%; justify-content: center; }
  .zq-btn-suite .btn { width: 100%; justify-content: center; }
  .zq-voies { columns: 1; }
  .zq-card { box-shadow: var(--shadow-sm); }
}

/* ---------- fiche imprimable (page 1 du dossier) ---------- */
#zq-print { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 12mm; }
  body > *:not(#zq-print) { display: none !important; }
  #zq-print { display: block !important; color: #2B2723; font-family: "Mulish", Arial, sans-serif; font-size: 10.2pt; line-height: 1.42; }
  .zq-p__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid #CCAE88; margin-bottom: 12px; font-size: 9pt; text-align: right; }
  .zq-p__head strong { font-family: "Archivo", Arial, sans-serif; font-size: 11pt; }
  #zq-print h1 { font-family: "Archivo", Arial, sans-serif; font-size: 17pt; margin: 0 0 4px; }
  #zq-print h2 { font-family: "Archivo", Arial, sans-serif; font-size: 12pt; margin: 12px 0 5px; color: #2B2723; }
  .zq-p__adr { margin: 0 0 8px; color: #5c554e; }
  .zq-p__t { width: 100%; border-collapse: collapse; }
  .zq-p__t th, .zq-p__t td { text-align: left; vertical-align: top; padding: 5px 7px; border-bottom: 1px solid #E7DECF; }
  .zq-p__t th { width: 31%; background: #F3EDE3; font-weight: 700; }
  #zq-print ul { margin: 0; padding-left: 16px; }
  #zq-print li { margin-bottom: 2px; }
  #zq-print p { margin: 4px 0; }
  .zq-p__mention { margin-top: 10px !important; padding: 6px 8px; background: #F3EDE3; font-size: 8.6pt; }
  .zq-p__foot { margin-top: 10px; padding-top: 6px; border-top: 1px solid #CCAE88; font-size: 8.4pt; color: #5c554e; }
}

/* recette du 13/10/2026 (soir) : liens seuls dans une cellule de tableau, zone tactile de 32 px au moins */
main td > a, main td strong > a { display: inline-block; padding: .4rem 0; }
