/* ==========================================================================
   ACCUEIL (index.html) : bandes propres à l'accueil.
   Le système partagé est dans borne/css/borne.css ; tableau des formules : formules.css ;
   scène d'avant/après : avant-apres.css.
   ========================================================================== */

/* ---------- Les programmes (services, émail bleu) ---------- */
.services { row-gap: 28px; }
.services .section-title { grid-column: 1 / span 7; }
.services .section-description { grid-column: 8 / span 5; align-self: end; }

/* ---------- Pourquoi nous choisir : plaque d'instructions et schéma « sur place » (châssis) ---------- */
.pourquoi { row-gap: 40px; align-items: stretch; }
.pourquoi-texte { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 22px; }
.pourquoi .plaque-instructions { align-self: center; grid-column: 7 / span 6; }

.schema-sur-place {
    width: 100%;
    height: auto;
    margin-top: auto;
    padding-top: 18px;
    fill: none;
    stroke: #C9D6EA;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sp-sol { stroke: rgba(255, 255, 255, 0.3); stroke-dasharray: 2 9; }
.sp-mur rect, .sp-mur path { stroke: rgba(201, 214, 234, 0.5); stroke-width: 2; }
.sp-robinet { stroke: var(--blanc); }
.sp-tuyau { stroke: var(--vif-clair); stroke-width: 5; }
.sp-voiture { stroke: var(--blanc); stroke-width: 3.5; }
/* Prise électrique et point d'eau du client, sur lesquels on branche le nettoyeur haute pression ; la lance relie
   le nettoyeur à la voiture, rien n'est branché dans la voiture (29/09/2026 : plus de groupe électrogène).
   En bleu vif-clair, ce qui se branche (câble, tuyau, flexible, embouts) et le jet ; en blanc, les appareils. */
.sp-prise { stroke: var(--blanc); }
.sp-prise rect, .sp-fiche circle { fill: var(--marine); }
.sp-fiche { stroke: var(--vif-clair); stroke-width: 3; }
.sp-cable { stroke: var(--vif-clair); stroke-width: 3; }
.sp-embout { fill: var(--marine); stroke: var(--vif-clair); stroke-width: 3; }
.sp-nettoyeur { stroke: var(--blanc); stroke-width: 3; }
.sp-nettoyeur rect, .sp-nettoyeur circle { fill: var(--marine); }
.sp-flexible { stroke: var(--vif-clair); stroke-width: 3; }
.sp-lance { stroke: var(--blanc); stroke-width: 3; }
.sp-lance rect { fill: var(--marine); }
.sp-jet { stroke: var(--vif-clair); stroke-width: 2.5; }
.sp-legende {
    fill: var(--bleu-texte);
    stroke: none;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- Le rayon des produits (matériel) ---------- */
.materiel { row-gap: 32px; }
.materiel .section-title { grid-column: 1 / span 8; font-size: clamp(1.9rem, 1rem + 1.9vw, 2.8rem); }

.rayon {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 12px;
}
.rayon li {
    --h-cible: 64px;
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    height: 104px;
    padding: 12px;
    border-radius: 10px;
    background: var(--blanc);
    box-shadow: inset 0 0 0 1px var(--inox-2);
}
/* Chaque fichier de logo garde ses marges : on dimensionne sa zone utile (encre), mesurée sur les
   pixels, à 88 % de la largeur de la tuile ou à --h-cible de haut, et on centre cette zone. */
.rayon img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(calc(88cqi * var(--rw, 1)), calc(var(--h-cible) * var(--rh, 1)));
    height: auto;
    max-width: none;
    max-height: none;
    transform: translate(-50%, -50%) translate(var(--tx, 0%), var(--ty, 0%));
    /* Logos des marques en monochrome : aucune couleur hors charte sur la page */
    filter: grayscale(1) contrast(1.3) brightness(1.1);
    mix-blend-mode: multiply;
}
.rayon img[alt="Alchimy7"] { filter: grayscale(1) invert(1) contrast(1.2); }
.rayon img[alt="Stanley"] { filter: grayscale(1) contrast(1.8) brightness(1.3); }
/* Zones utiles mesurées (largeur ou hauteur du fichier rapportée à celle de l'encre, décalage du centre) */
.rayon img[alt="Stanley"] { --rw: 1.232; --rh: 7.972; }
.rayon img[alt="Karcher"] { --rw: 1; --rh: 2.768; }
.rayon img[alt="Prodif"] { --rw: 1.016; --rh: 4.808; --tx: 0.8%; }
.rayon img[alt="KochChemie"] { --rw: 1.111; --rh: 2.174; }
.rayon img[alt="Shine"] { --rw: 1.64; --rh: 1.172; --ty: -0.63%; }
.rayon img[alt="Chemical Guys"] { --rw: 1.879; --rh: 1.875; }
.rayon img[alt="Alchimy7"] { --rw: 1.324; --rh: 1.416; --tx: -2.55%; --ty: 6.59%; }
.rayon img[alt="CarPro"] { --rw: 1.022; --rh: 4.9; }
.rayon img[alt="MaxShine"] { --rw: 1.031; --rh: 7.463; }

/* ---------- La zone : schéma à paliers et vérification d'adresse ---------- */
.zone { row-gap: 40px; align-items: center; }
.zone-texte { grid-column: 1 / span 5; display: grid; gap: 22px; }

.zone-info { display: grid; gap: 20px; margin-top: 6px; }
.zone-info h3 { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; }
.zone-info h3 svg { width: 28px; height: 28px; color: var(--vif); }

.zone-cities {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-radius: 12px;
    background: var(--ecran);
    box-shadow: var(--ecran-creuse);
}
.zone-cities li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    font-family: var(--matrice);
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--blanc);
    background-image: radial-gradient(rgba(255, 255, 255, 0.075) 0.9px, transparent 1.25px);
    background-size: 5px 5px;
    cursor: default;
    transition: background-color 0.2s ease;
}
.zone-cities li::before {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}
.zone-cities li:first-child { grid-column: 1 / -1; }
.zone-cities li:first-child::before, .zone-cities li.est-survolee::before { background: var(--vif); outline: 2px solid rgba(255, 255, 255, 0.35); }
.zone-cities li.est-survolee { background-color: rgba(0, 99, 206, 0.28); }

.zone-note { color: var(--ardoise); }
.zone-note a { color: var(--bleu); font-weight: 600; }

#checkZoneBtn { justify-self: start; }

/* Volet de vérification : ouvert par script.js (classe .active sur #zoneModal), refermé par sa croix */
.zone-verif {
    display: none;
    gap: 14px;
    padding: 22px;
    border-radius: var(--rayon-plaque);
    background: var(--inox-0);
    box-shadow: inset 0 0 0 1px var(--inox-2);
}
.zone-verif.active { display: grid; }
.zone-verif-tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.zone-verif h3 { font-size: 1.45rem; }
.zone-verif-fermer {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--marine);
    color: var(--blanc);
    cursor: pointer;
}
.zone-verif-fermer svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; }
.zone-verif-fermer:hover { background: var(--vif); }
.zone-input-group { display: grid; gap: 10px; }
.zone-input-group label { color: var(--ardoise); font-size: 1rem; }
.zone-input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--blanc);
    box-shadow: inset 0 0 0 1.5px var(--inox-2);
    color: var(--marine);
    font-size: 1rem;
}
.zone-input-group input::placeholder { color: #6A7C99; }
.zone-input-group input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--vif); }
.zone-input-group .poussoir { justify-self: start; }

/* Résultat écrit par script.js (titre h4 à pictogramme, message, frais) */
.zone-result {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--blanc);
    box-shadow: inset 0 0 0 1.5px var(--inox-2);
}
.zone-result h4 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; margin-bottom: 6px; }
.zone-result h4 svg { flex: none; width: 22px; height: 22px; }
.zone-result p { color: var(--ardoise); }
.zone-result.success { box-shadow: inset 0 0 0 2px var(--vif); }
.zone-result.success h4 { color: var(--vif); }
.zone-result.warning { box-shadow: inset 0 0 0 2px var(--bleu); }
.zone-result.error { background: var(--inox-0); box-shadow: inset 0 0 0 2px var(--marine); }
.zone-result .zone-fee,
.zone-result p[style] { margin-top: 6px; font-weight: 600; color: var(--bleu) !important; }

/* Schéma de zone : cadran à l'échelle, trois paliers de frais */
.zone-carte {
    position: relative;
    grid-column: 6 / span 7;
    padding: clamp(16px, 2vw, 28px);
    border-radius: var(--rayon-plaque);
    background: var(--inox-0);
    box-shadow: inset 0 0 0 1px var(--inox-2), var(--ombre-plaque);
}

.segments {
    position: absolute;
    top: clamp(26px, 2.6vw, 38px);
    left: clamp(26px, 2.6vw, 38px);
    width: clamp(96px, 9vw, 132px);
    height: auto;
    padding: 10px 10px 6px;
    border-radius: 8px;
    background-color: var(--ecran);
    box-shadow: var(--ecran-creuse);
}
.segments .on { fill: var(--blanc); }
.segments .off { fill: rgba(255, 255, 255, 0.08); }

.carte { width: 100%; height: auto; overflow: visible; }
.carte-graduation circle { fill: none; stroke: var(--inox-3); stroke-width: 10; stroke-dasharray: 1.6 13.4; }
/* Paliers : offert jusqu'à 30 km (allumé), puis 30 à 50 km, puis 50 à 80 km */
.palier { stroke-width: 2; }
.palier--80 { fill: rgba(0, 37, 81, 0.035); stroke: var(--marine); stroke-width: 2.5; }
.palier--50 { fill: rgba(0, 60, 147, 0.07); stroke: var(--bleu); stroke-width: 2.5; stroke-dasharray: 9 7; }
.palier--30 { fill: rgba(0, 99, 206, 0.14); stroke: var(--vif); stroke-width: 4; }
.carte-axe { stroke: var(--inox-3); stroke-width: 1.5; stroke-dasharray: 3 6; }
.carte-cran { stroke: var(--marine); stroke-width: 2.5; stroke-linecap: round; }
.borne-km rect { fill: var(--marine); }
.borne-km text {
    fill: var(--blanc);
    font-family: var(--condense);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.borne-km--30 rect { fill: var(--vif); }
.frais text {
    font-family: var(--condense);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    fill: var(--bleu);
    paint-order: stroke;
    stroke: var(--inox-0);
    stroke-width: 6px;
    stroke-linejoin: round;
}
.frais--offert text { fill: var(--vif); }
.carte-nord path { fill: var(--marine); }
.rayons line { stroke: var(--inox-3); stroke-width: 1.5; transition: stroke 0.2s ease, stroke-width 0.2s ease; }
.rayons line.est-survolee { stroke: var(--vif); stroke-width: 3.5; }
.ville circle { fill: var(--marine); transition: r 0.2s var(--course), fill 0.2s ease; }
.ville .ville-trait { fill: none; stroke: var(--marine); stroke-width: 1.2; }
.ville text {
    font-family: var(--condense);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    fill: var(--marine);
    /* Halo large : les anneaux des paliers s'interrompent autour du nom au lieu de le barrer */
    paint-order: stroke;
    stroke: var(--inox-0);
    stroke-width: 10px;
    stroke-linejoin: round;
}
.ville.est-survolee circle { r: 9px; fill: var(--vif); }
.ville--centre circle { fill: var(--vif); }
.ville--centre .centre-halo { fill: rgba(0, 99, 206, 0.18); }

/* ---------- FAQ et borne de réservation ---------- */
.faq { row-gap: 40px; align-items: start; }
.faq-colonne { grid-column: 1 / span 7; display: grid; gap: 22px; }
.faq .borne--reservation { grid-column: 9 / span 4; position: sticky; top: calc(var(--auvent) + 28px); }

/* ---------- Avis (émail bleu) ---------- */
.avis { row-gap: 32px; align-items: center; }
.avis-tete { grid-column: 1 / span 4; display: grid; gap: 18px; }
.avis-plaque {
    grid-column: 5 / span 4;
    display: grid;
    gap: 12px;
    padding: 28px;
    border-radius: var(--rayon-plaque);
    background: var(--marine);
    color: var(--blanc);
    box-shadow: var(--ombre-plaque);
}
.avis-plaque h3 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.avis-plaque h3 svg { width: 30px; height: 30px; color: var(--anneau-start); flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.avis-plaque p { color: var(--bleu-texte); }
.avis-action { grid-column: 9 / span 4; display: grid; gap: 14px; justify-items: start; }
.avis-merci { color: var(--bleu-texte); font-size: 0.95rem; }
.btn-google-review .poussoir-cap svg { width: 50%; height: 50%; }

/* ==========================================================================
   ÉCRANS INTERMÉDIAIRES ET TÉLÉPHONE
   ========================================================================== */
@media (max-width: 1260px) {
    .rayon { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
    .services .section-title, .services .section-description { grid-column: 1 / -1; }
    .pourquoi-texte, .pourquoi .plaque-instructions { grid-column: 1 / -1; }
    .schema-sur-place { max-width: 560px; }
    .zone-texte, .zone-carte { grid-column: 1 / -1; }
    .faq-colonne { grid-column: 1 / span 12; }
    .faq .borne--reservation { grid-column: 1 / -1; position: relative; top: 0; }
    .avis-tete { grid-column: 1 / -1; }
    .avis-plaque { grid-column: 1 / span 7; }
    .avis-action { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .services { row-gap: 18px; }
    .pourquoi { row-gap: 28px; }
    .rayon { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .rayon li { height: 84px; padding: 10px; --h-cible: 48px; }
    .zone { row-gap: 28px; }
    .zone-cities li { font-size: 0.92rem; padding: 0.5rem 0.6rem; }
    .zone-carte { padding: 12px; }
    .segments { position: static; width: 84px; margin: 6px 0 4px 6px; padding: 7px 7px 4px; }
    .faq { row-gap: 28px; }
    .avis-plaque { padding: 22px; }
}

/* Téléphone : le cadran passe sous 470 px de large, ses libellés grossissent (en unités du schéma)
   pour rester lisibles, soit environ 12 px pour les villes à 390 px */
@media (max-width: 520px) {
    .ville text { font-size: 27px; stroke-width: 12px; }
    .villes .ville circle { r: 8px; }
    .villes .ville.est-survolee circle { r: 11px; }
    .frais text { font-size: 29px; stroke-width: 7px; }
    .borne-km text { font-size: 22px; }
}

@media (max-width: 420px) {
    .zone-cities { grid-template-columns: minmax(0, 1fr); }
}
