/* ============================================================
   Vue « Carte » réelle (core/types/carte.js) : la carte, ses marqueurs, la tournée tracée dessus.
   Sorti de base.css le 09/10/2026 (chantier 15) : mêmes règles, même ordre, rien de retouché
   (les couleurs des marqueurs lisent la charte : voir le commit « La carte lit ses couleurs »).
   Chargée après base.css (index.html), comme les autres feuilles de vue.
   ============================================================ */

/* ------------------------------------------------------------------ transport : la carte réelle
   Ajouté le 02/10/2026 avec `core/types/carte.js` (ENT-3.2 et suivantes). Deux mondes :
   le PANNEAU suit les variables du site et de l'entreprise, comme toutes les vues ; la CARTE,
   elle, est un plan papier — couleurs fixes, désaturées, les mêmes en clair et en sombre, parce
   qu'une ville ne change pas de couleur avec le thème et que l'élève doit la reconnaître. */
.ct-grille-vue{ display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:16px; align-items:start }
@media (max-width:1180px){ .ct-grille-vue{ grid-template-columns:1fr } }
.ct-bloc{ min-width:0 }
.ct-barre{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-bottom:8px }
.ct-aide{ margin-left:auto; font-size:13px; color:var(--encre-douce) }
.ct-cadre-carte{
  position:relative; height:min(70vh,700px); min-height:440px; overflow:hidden;
  border:1px solid var(--filet); border-radius:var(--r); background:#f3f1ec;
}
.ct-svg{ width:100%; height:100%; display:block; user-select:none; touch-action:manipulation }
.ct-pose .ct-svg{ cursor:crosshair }
.ct-reperes{ position:absolute; inset:0; pointer-events:none }
.ct-reperes span{
  position:absolute; transform:translate(-50%,-50%); font:700 13px/1 system-ui,"Segoe UI",sans-serif;
  color:#3d372f; background:rgba(255,255,255,.85); border:1px solid #b9b0a3; border-radius:4px; padding:3px 5px;
}
.ct-attrib{ position:absolute; right:6px; bottom:4px; font-size:11px; color:#4a443d; background:rgba(255,255,255,.8); padding:1px 6px; border-radius:4px }
.ct-echelle{ position:absolute; left:10px; bottom:8px; font-size:11px; color:#3d372f; background:rgba(255,255,255,.8); padding:3px 6px; border-radius:4px }
.ct-echelle i{ display:block; height:5px; border:1.5px solid #3d372f; border-top:0; margin-top:2px }
.ct-bulle{
  position:absolute; left:50%; top:10px; transform:translateX(-50%); max-width:90%;
  background:#13163e; color:#eef0fa; padding:7px 13px; border-radius:7px; font-size:14px;
  opacity:0; transition:opacity .2s; pointer-events:none;
}
.ct-bulle.vue{ opacity:1 }

/* le dessin */
.ct-fond{ fill:#f3f1ec }
.ct-r{ fill:none; stroke-linecap:round; stroke-linejoin:round }
.ct-cas{ stroke:#c9c1b4 }
.ct-cas.maj{ stroke:#cdb58a }
.ct-cas.sec{ stroke:#cbbfa8 }
.ct-fil{ stroke:#fff }
.ct-fil.maj{ stroke:#f4e6c9 }
.ct-fil.sec{ stroke:#fbf5e8 }
.ct-fil.ped{ stroke:#ece5d9 }
.ct-pie{ stroke:#a99f92 }
.ct-bati{ fill:#e3dccf; stroke:#d2c8b9 }
.ct-vert{ fill:#dbe5d1 }
.ct-cimetiere{ fill:#e1e5da }
.ct-eau{ fill:#cde0ec }
.ct-eauL{ fill:none; stroke:#b9d4e6 }
.ct-rail{ fill:none; stroke:#7d7770 }
.ct-railT{ fill:none; stroke:#fff }
.ct-frontiere{ fill:none; stroke:#9a9288; stroke-opacity:.85; stroke-linecap:round }
.ct-grille{ stroke:#5b544b; stroke-opacity:.55; fill:none }
.ct-cadre{ stroke:#5b544b; fill:none }
.ct-q{ fill:rgba(52,92,253,.10); stroke:var(--ardoise-fond); cursor:pointer; transition:fill .15s }
.ct-q:hover{ fill:rgba(52,92,253,.22) }
.ct-q:focus{ outline:none }
.ct-q:focus-visible{ fill:rgba(52,92,253,.28) }
.ct-zoom .ct-q{ fill:transparent }
.ct-zoom .ct-q:hover{ fill:rgba(52,92,253,.08) }
.ct-zoom .ct-q.actif{ fill:none; pointer-events:none }
.ct-masque{ fill:#fff; fill-opacity:.62; fill-rule:evenodd; pointer-events:none }
.ct-qnom{ fill:#1f3fae; font-weight:750; paint-order:stroke; stroke:#fff; stroke-linejoin:round; pointer-events:none; text-anchor:middle; font-family:system-ui,"Segoe UI",sans-serif }
.ct-zoom .ct-qnom{ display:none }
/* La police des noms de rues est celle dans laquelle leurs largeurs ont été MESURÉES
   (outils/carte/mesure.py) : en changer, c'est risquer des noms coupés. */
.ct-etiq{ display:none; pointer-events:none }
.ct-etiq.vue{ display:block }
.ct-etiq text{ fill:#3f3932; paint-order:stroke; stroke:#fff; stroke-linejoin:round; font-family:system-ui,"Segoe UI",sans-serif }
.ct-etiq text.r0, .ct-etiq text.r1{ font-weight:650 }
.ct-rep{ display:none; fill:#8a6440; font-style:italic; font-weight:600; paint-order:stroke; stroke:#fff; text-anchor:middle; pointer-events:none; font-family:system-ui,"Segoe UI",sans-serif }
.ct-zoom .ct-rep{ display:block }
.ct-mk .ct-rond{ stroke:#13163e; stroke-width:2 }
/* La cible de clic (r = 20) est plus grande que le rond : elle doit rester INVISIBLE, quelle que
   soit la couleur du marqueur — une règle « circle » trop large l'a peinte en bleu au premier essai. */
.ct-mk .plan-pt-cible{ fill:transparent; stroke:none }
.ct-mk text{ font-weight:800; text-anchor:middle; dominant-baseline:central; pointer-events:none; font-size:12px; font-family:system-ui,"Segoe UI",sans-serif }
.ct-mk .ct-mk-nom{ text-anchor:start; dominant-baseline:auto; font-weight:700; font-size:12.5px; paint-order:stroke; stroke:#fff; stroke-width:3; fill:#2a2622 }
.ct-mk-depart .ct-rond{ fill:var(--vert) }
.ct-mk-depart .ct-mk-l{ fill:#09073b }
.ct-mk-arrivee .ct-rond{ fill:var(--terre) }
.ct-mk-arrivee .ct-mk-l{ fill:#09073b }
.ct-mk-client .ct-rond{ fill:var(--ardoise-fond) }
.ct-mk-client .ct-mk-l{ fill:#fff }
/* Mode « lire la case » (ENT-3.1) : halo ambre du client choisi, sur la carte et dans le tableau. */
.ct-mk-lecture{ cursor:pointer }
.ct-mk-lecture .ct-halo{ fill:none; stroke:var(--terre); stroke-width:3; opacity:0 }
.ct-mk-lecture.ct-mk-choisi .ct-halo{ opacity:1 }
.ct-mk-lecture.ct-mk-choisi .ct-rond{ stroke:var(--terre); stroke-width:3.5 }
.ct-mk-lecture:focus{ outline:none }
.ct-mk-lecture:focus-visible .ct-halo{ opacity:1 }

/* le panneau */
.ct-panneau{ background:var(--panneau); border:1px solid var(--filet); border-radius:var(--r); padding:12px 14px }
.ct-panneau h3{ font-size:12.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--encre-douce); margin:14px 0 6px }
.ct-panneau h3:first-child{ margin-top:0 }
.ct-panneau .note{ font-size:13.5px; margin:0 0 10px }
.ct-client{ border:1px solid var(--filet); border-radius:8px; padding:9px 10px; margin-bottom:8px }
.ct-client.arme{ border-color:var(--ardoise); box-shadow:0 0 0 1px var(--ardoise) }
.ct-habituel{ padding:6px 10px }
.ct-tete{ display:flex; gap:8px; align-items:baseline }
.ct-num{ flex:none; width:22px; height:22px; border-radius:50%; background:var(--ardoise-fond); color:#fff; font-weight:750; font-size:13px; display:grid; place-items:center }
.ct-nom{ font-weight:650 }
.ct-poids{ margin-left:auto; font-size:12.5px; color:var(--encre-douce); white-space:nowrap }
.ct-adr{ font-size:13.5px; color:var(--encre-douce); margin:2px 0 6px 30px }
.ct-habituel .ct-adr{ margin-bottom:0 }
.ct-ch{ display:flex; gap:8px; margin-left:30px; align-items:center; flex-wrap:wrap }
.ct-essais{ font-size:12.5px; color:var(--encre-douce) }
.ct-bilan{ margin-top:6px; font-weight:600 }
.ct-bilan .avis{ margin:6px 0 0 }
.ct-index input{ width:100% }
.ct-index ul{ list-style:none; margin:6px 0 0; padding:0; max-height:230px; overflow:auto }
.ct-index li{ display:flex; gap:8px; align-items:baseline; padding:4px 6px; border-radius:5px; cursor:pointer; font-size:13.5px }
.ct-index li:hover, .ct-index li:focus-visible{ background:var(--survol); outline:none }
.ct-ou{ margin-left:auto; white-space:nowrap; color:var(--encre-douce); font-size:12.5px }
.ct-vide{ color:var(--encre-douce); cursor:default }

/* la tournée sur la carte réelle (02/10/2026) : mêmes signes que le plan schématique —
   rond bleu = le client, pastille menthe = l'ordre de passage, rond creux pointillé = à quai.
   Le tracé suit les rues, en menthe comme tout ce qui appartient à la tournée. */
.ct-cadre-tournee{ height:min(62vh,600px); min-height:420px }
.ct-trace{ fill:none; stroke:var(--vert); stroke-opacity:.9; stroke-linecap:round; stroke-linejoin:round; pointer-events:none }
.ct-mk-creux .ct-rond{ fill-opacity:.16; stroke-dasharray:3.5 2.5; stroke-width:2.5 }
.ct-mk-client.ct-mk-creux .ct-rond{ stroke:var(--ardoise-fond) }
.ct-mk-depart.ct-mk-creux .ct-rond{ stroke:#159d74 }
.ct-mk-arrivee.ct-mk-creux .ct-rond{ stroke:#c4931a }
.ct-mk-client.ct-mk-creux .ct-mk-l{ fill:var(--ardoise-fond) }
.ct-mk-depart.ct-mk-creux .ct-mk-l{ fill:#159d74 }
.ct-mk-arrivee.ct-mk-creux .ct-mk-l{ fill:#c4931a }
.ct-mk-annule{ opacity:.9 }
.ct-mk-annule .ct-barre{ stroke:#2a2622; stroke-width:3.5; stroke-linecap:round }
.ct-mk-annule .ct-mk-nom{ text-decoration:line-through; font-weight:600 }
.ct-ordre circle{ fill:var(--vert); stroke:#13163e; stroke-width:1.6 }
.ct-ordre text{ fill:#07261c; font-size:10.5px }
.ct-mk .plan-pt-cible{ cursor:pointer }
.ct-mk .plan-pt-cible:focus{ outline:none }
.ct-mk .plan-pt-cible:focus-visible{ stroke:var(--terre); stroke-width:3 }
.ct-mk.plan-pt-clic:hover .ct-rond{ stroke-width:3.5 }

/* ------------------------------------------------------------------ la carte des itinéraires
   Ajouté le 13/10/2026 avec `core/types/carte-itineraires.js` (brief MOTEUR-carte-regionale, lot 2). Mêmes deux
   mondes que la carte de ville : le PANNEAU suit les variables du site ; la CARTE est un plan papier, couleurs fixes.
   Les couleurs des tracés (encre, violet, ambre) sont posées par la vue, couche par couche (`TRAITS`) : ni vert ni rouge.
   1366 × 768 et 1280 × 720 sans défilement de page : la carte prend la hauteur qui reste, la colonne fait 300 px. */
.ci-vue{ display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:14px; align-items:start }
.ci-bloc{ min-width:0 }
.ci-boite{ height:max(380px, calc(100vh - 250px)); min-height:0 }
.ci-svg .ci-fond{ fill:#f3f1ec }
.ci-eau{ fill:#cde0ec }
.ci-eauL{ fill:none; stroke:#9cc0da; stroke-linecap:round; stroke-linejoin:round }
.ci-auto{ fill:none; stroke:#d8ccb3; stroke-linecap:round; stroke-linejoin:round }
.ci-rail{ fill:none; stroke:#c4beb4 }
.ci-front{ fill:none; stroke:#8a8378 }
.ci-grille{ fill:none; stroke:#5b544b; stroke-opacity:.35 }
.ci-cadre{ fill:none; stroke:#5b544b }
.ci-pays{ fill:#8a8378; font-weight:700; letter-spacing:.25em; text-anchor:middle; font-family:system-ui,"Segoe UI",sans-serif; pointer-events:none }
.ci-ville{ fill:#5b544b }
.ci-vnom{ fill:#3d372f; paint-order:stroke; stroke:#f3f1ec; stroke-linejoin:round; font-family:system-ui,"Segoe UI",sans-serif; pointer-events:none }
.ci-it path{ fill:none; stroke-linejoin:round }
.ci-it .ci-halo{ stroke:#f3f1ec; stroke-linecap:round }
/* La zone de clic d'un tracé : large et INVISIBLE (comme la cible d'un point de la tournée). */
.ci-it .ci-clic{ stroke:transparent; stroke-linecap:round; pointer-events:stroke; cursor:pointer }
.ci-it.ci-estompe{ opacity:.25 }
.ci-it.ci-choisi .ci-halo{ stroke:#1f1c18; stroke-opacity:.16 }
.ci-lieu .ci-rond{ stroke:#1f1c18; stroke-width:2 }
.ci-port .ci-rond, .ci-terminal .ci-rond{ fill:#fdfbf7 }
.ci-entrepot .ci-rond{ fill:#1f5fa8 }
.ci-lieu .ci-lettre{ font-weight:800; text-anchor:middle; dominant-baseline:central; fill:#1f1c18; font-family:system-ui,"Segoe UI",sans-serif; pointer-events:none }
.ci-entrepot .ci-lettre{ fill:#fdfbf7 }
.ci-lnom{ fill:#1f1c18; font-weight:700; paint-order:stroke; stroke:#f3f1ec; stroke-linejoin:round; font-family:system-ui,"Segoe UI",sans-serif; pointer-events:none }

/* le panneau */
.ci-panneau{ background:var(--panneau); border:1px solid var(--filet); border-radius:var(--r); padding:12px 14px; font-size:13.5px }
.ci-panneau h3{ font-size:12.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--encre-douce); margin:12px 0 6px }
.ci-panneau h3:first-child{ margin-top:0 }
.ci-liste{ display:flex; flex-direction:column; gap:5px }
.ci-choix{ display:flex; align-items:center; gap:8px; width:100%; padding:6px 8px; font:inherit; color:var(--encre); text-align:left;
  background:var(--panneau); border:1px solid var(--filet); border-radius:var(--r); cursor:pointer }
.ci-choix:hover{ background:var(--survol) }
/* Choisi : bordure et graisse à l'ENCRE (l'accent d'une charte n'a rien à faire ici). */
.ci-choix[aria-pressed="true"]{ border:2px solid var(--encre); padding:5px 7px; font-weight:700 }
.ci-choix .ci-nom{ flex:1 }
.ci-km{ color:var(--encre-douce); font-variant-numeric:tabular-nums; font-weight:600 }
/* Un échantillon de trait est un morceau de CARTE : posé sur le papier, il garde ses couleurs fixes (l'encre de la route
   disparaissait sur le panneau sombre de Boost, essai du 13/10). */
.ci-ech{ flex:none; border-radius:3px; background:#f3f1ec; box-shadow:inset 0 0 0 1px rgba(0,0,0,.12) }
.ci-fiche{ margin-top:10px }
.ci-fiche h4{ margin:0 0 4px; font-size:14.5px }
.ci-fiche p{ margin:4px 0 }
.ci-fiche dl{ margin:6px 0 0; display:grid; grid-template-columns:auto; gap:1px }
.ci-fiche dt{ font-size:12px; color:var(--encre-douce); margin-top:4px }
.ci-fiche dd{ margin:0 }
.ci-legende{ position:absolute; left:8px; top:8px; list-style:none; margin:0; padding:5px 9px 5px 5px; font-size:12px; color:#2a2622;
  background:rgba(253,251,247,.9); border:1px solid #d6cfc2; border-radius:4px; pointer-events:none }
.ci-legende li{ display:flex; align-items:center; gap:6px; margin:1px 0 }
.ci-legende svg{ flex:none; transform:scale(.85); transform-origin:left center; margin-right:-6px }
.ci-legende .ci-ech{ box-shadow:none }
/* Lot 3 (13/10/2026) : la marque d'aléa, SANS COULEUR (rond blanc, croix à l'encre, cartouche) ; le tronçon arrêté, estompé
   après elle ; l'avis dans la fiche, à l'encre (ni rouge, qui dirait « faux », ni ambre, qui dit le rail). */
.ci-marque .ci-m-rond{ fill:#fdfbf7; stroke:#1f1c18; stroke-width:2 }
.ci-marque .ci-m-croix{ fill:none; stroke:#1f1c18; stroke-width:3.5; stroke-linecap:round }
.ci-marque .ci-m-cartouche rect{ fill:#fdfbf7; stroke:#1f1c18; stroke-width:1.5 }
.ci-marque text{ fill:#1f1c18; font-family:system-ui,"Segoe UI",sans-serif; pointer-events:none }
.ci-marque .ci-m-titre{ font-weight:800; font-size:12.5px }
.ci-marque .ci-m-texte{ font-size:11.5px }
.ci-it .ci-apres{ opacity:.3 }
.ci-alea{ border-left:4px solid var(--encre); padding:4px 0 4px 8px; margin:6px 0 }
