/* meshcore.va2rfc.ca : feuille de style (claire et sombre). Aucune police ni script externe. */
:root {
  --fond: #f4f7fb; --fond2: #ffffff; --texte: #0d1b2a; --doux: #4f5d73; --ligne: #dbe3ee;
  --accent: #0f9d8a; --accent-fort: #0b7a6b; --accent-doux: #d9f3ef; --nuit: #071a2b; --nuit2: #0c2a42;
  --or: #f5b942; --ok: #16a34a; --vieux: #9aa8bd;
  --ombre: 0 12px 34px rgba(13, 27, 42, .12), 0 2px 6px rgba(13, 27, 42, .06);
  --rayon: 18px; --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #071420; --fond2: #0d1f30; --texte: #e7eef7; --doux: #9fb0c6; --ligne: #1d3349;
    --accent: #2ed3b7; --accent-fort: #5ee6cf; --accent-doux: #0f3a37; --ombre: 0 12px 34px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #071420; --fond2: #0d1f30; --texte: #e7eef7; --doux: #9fb0c6; --ligne: #1d3349;
  --accent: #2ed3b7; --accent-fort: #5ee6cf; --accent-doux: #0f3a37; --ombre: 0 12px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--texte); line-height: 1.6;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent-fort); }
img, svg { max-width: 100%; }
.enveloppe { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* En-tête */
header.barre {
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--nuit) 88%, transparent); color: #eaf4ff;
}
header.barre .enveloppe { display: flex; align-items: center; gap: 18px; height: 64px; }
.marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.marque svg { width: 34px; height: 34px; }
.marque small { display: block; font-weight: 500; font-size: 12px; opacity: .75; letter-spacing: .3px; }
nav.menu { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.menu a { color: #d6e6f7; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 15px; }
nav.menu a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
nav.menu a.bouton { background: var(--accent); color: #04221d; font-weight: 700; }
@media (max-width: 860px) { nav.menu a:not(.bouton) { display: none; } }

/* Bandeau d'accueil */
.accueil {
  position: relative; overflow: hidden; color: #eaf4ff;
  background: radial-gradient(1200px 600px at 80% -10%, #12507a 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 110%, #0d5c52 0%, transparent 55%), var(--nuit);
}
.accueil .enveloppe { position: relative; padding: 84px 20px 96px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .accueil .enveloppe { grid-template-columns: 1fr; padding: 56px 20px 64px; } }
.surtitre { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; letter-spacing: .4px;
  background: rgba(46, 211, 183, .14); color: #8ff0de; padding: 6px 12px; border-radius: 999px; }
.surtitre .point { width: 8px; height: 8px; border-radius: 50%; background: #2ed3b7; box-shadow: 0 0 0 0 rgba(46, 211, 183, .7); animation: battement 2s infinite; }
@keyframes battement { 70% { box-shadow: 0 0 0 10px rgba(46, 211, 183, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 211, 183, 0); } }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 18px 0 18px; letter-spacing: -.5px; }
h1 em { font-style: normal; color: #5ee6cf; }
.accueil p.chapeau { font-size: 20px; color: #c3d6ea; max-width: 34em; margin: 0 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 16px; border: 0; cursor: pointer; }
.btn.plein { background: var(--accent); color: #04221d; }
.btn.plein:hover { filter: brightness(1.08); }
.btn.contour { background: transparent; color: #eaf4ff; box-shadow: inset 0 0 0 2px rgba(234, 244, 255, .35); }
.btn.contour:hover { box-shadow: inset 0 0 0 2px #eaf4ff; }
.chiffres { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.chiffres div { min-width: 120px; }
.chiffres b { display: block; font-size: 30px; color: #fff; line-height: 1.1; }
.chiffres span { font-size: 14px; color: #9fb7cf; }
.illustration { position: relative; }
.illustration svg { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }

/* Sections */
section { padding: 84px 0; }
section.alt { background: var(--fond2); border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.titre-section { max-width: 760px; margin-bottom: 40px; }
.titre-section .surtitre-clair { color: var(--accent-fort); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; font-size: 13px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; margin: 8px 0 14px; letter-spacing: -.3px; }
h3 { font-size: 20px; margin: 0 0 8px; }
.titre-section p { color: var(--doux); font-size: 18px; margin: 0; }

.grille { display: grid; gap: 22px; }
.grille.quatre { grid-template-columns: repeat(4, 1fr); }
.grille.trois { grid-template-columns: repeat(3, 1fr); }
.grille.deux { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grille.quatre { grid-template-columns: repeat(2, 1fr); } .grille.trois { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grille.quatre, .grille.deux { grid-template-columns: 1fr; } }
.carte-info { background: var(--fond2); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 26px; box-shadow: var(--ombre); }
section.alt .carte-info { background: var(--fond); }
.carte-info p { color: var(--doux); margin: 0; }
.pastille { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-doux); color: var(--accent-fort); margin-bottom: 16px; }
.pastille svg { width: 26px; height: 26px; }

/* Schéma */
.schema { background: var(--fond2); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 28px; box-shadow: var(--ombre); }
.schema svg { display: block; width: 100%; height: auto; }
.schema text { fill: var(--texte); font: 600 14px system-ui, sans-serif; }
.schema .legende { fill: var(--doux); font-weight: 500; font-size: 12.5px; }
.schema .onde { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-dasharray: 6 8; animation: defile 1.4s linear infinite; }
@keyframes defile { to { stroke-dashoffset: -28; } }
.schema .noeud { fill: var(--accent-doux); stroke: var(--accent); stroke-width: 2; }
.schema .rel { fill: var(--accent); }
.points-cles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
@media (max-width: 820px) { .points-cles { grid-template-columns: 1fr; } }
.points-cles div { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--doux); }
.points-cles b { color: var(--texte); display: block; }

/* Carte en direct */
.bloc-carte { display: grid; grid-template-columns: 1fr 340px; gap: 22px; }
@media (max-width: 980px) { .bloc-carte { grid-template-columns: 1fr; } }
#carte { height: 560px; border-radius: var(--rayon); border: 1px solid var(--ligne); box-shadow: var(--ombre); z-index: 0; }
@media (max-width: 640px) { #carte { height: 420px; } }
.panneau { background: var(--fond2); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; display: flex; flex-direction: column; min-height: 0; }
.panneau h3 { display: flex; align-items: center; gap: 8px; }
.direct { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .5px; }
.direct::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: battement 2s infinite; }
.liste-noeuds, .flux { list-style: none; margin: 0; padding: 0; }
.liste-noeuds li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.liste-noeuds li:last-child { border-bottom: 0; }
.liste-noeuds .icone { width: 30px; height: 30px; flex: none; }
.liste-noeuds b { display: block; font-size: 15px; }
.liste-noeuds small { color: var(--doux); font-size: 13px; }
.flux { margin-top: 8px; overflow: auto; max-height: 260px; }
.flux li { display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--ligne); }
.flux .h { color: var(--doux); font-variant-numeric: tabular-nums; }
.flux .t { font-weight: 600; }
.flux .s { color: var(--doux); }
.note-carte { font-size: 13px; color: var(--doux); margin-top: 12px; }
.marqueur-noeud { background: none; border: 0; }

/* Étapes */
.etapes { counter-reset: etape; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .etapes { grid-template-columns: 1fr; } }
.etape { position: relative; background: var(--fond2); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 30px 26px 26px; box-shadow: var(--ombre); }
.etape::before { counter-increment: etape; content: counter(etape); position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--accent); color: #04221d; font-weight: 800; font-size: 20px; }
.etape p { color: var(--doux); margin: 0 0 12px; }
.etape ul { margin: 0; padding-left: 18px; color: var(--doux); }

/* Répéteur */
.repeteur { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .repeteur { grid-template-columns: 1fr; } }
table.reglages { width: 100%; border-collapse: collapse; background: var(--fond2); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); border: 1px solid var(--ligne); }
section.alt table.reglages { background: var(--fond); }
table.reglages th, table.reglages td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ligne); vertical-align: top; font-size: 15px; }
table.reglages tr:last-child td { border-bottom: 0; }
table.reglages th { background: var(--accent-doux); color: var(--accent-fort); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
code { font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-doux); color: var(--accent-fort); padding: 2px 6px; border-radius: 6px; }
.liste-coche { list-style: none; padding: 0; margin: 0 0 20px; }
.liste-coche li { padding-left: 30px; position: relative; margin: 10px 0; color: var(--doux); }
.liste-coche li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-doux)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a6b' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
.liste-coche b { color: var(--texte); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--fond2); border: 1px solid var(--ligne); border-radius: 14px; padding: 4px 20px; }
section.alt .faq details { background: var(--fond); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-fort); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--doux); margin: 0 0 16px; }

/* Appel final */
.appel { background: linear-gradient(135deg, var(--nuit2), var(--nuit)); color: #eaf4ff; border-radius: 26px; padding: 54px 44px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; box-shadow: var(--ombre); }
@media (max-width: 820px) { .appel { grid-template-columns: 1fr; padding: 38px 26px; } }
.appel h2 { color: #fff; }
.appel p { color: #c3d6ea; margin: 0; }
.appel .actions { justify-content: flex-end; }
@media (max-width: 820px) { .appel .actions { justify-content: flex-start; } }

footer { padding: 40px 0 56px; color: var(--doux); font-size: 14px; }
footer .enveloppe { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: var(--doux); }

/* Leaflet : bulles aux couleurs du site */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--fond2); color: var(--texte); }
.leaflet-popup-content { margin: 12px 16px; font: 14px/1.45 system-ui, sans-serif; }
.leaflet-container a.leaflet-popup-close-button { color: var(--doux); }
