/* La Loire à Orléans — vivre-orleans.fr (styles de l'outil, préfixe .loire-) */
.loire-app { --rouge: #bf0a37; --bleu: #1f6fc2; --bleu-fonce: #0e3a7d; --encre: #222; --gris: #666; --filet: #e3e3e3; position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; font-family: "Open Sans", sans-serif; color: var(--encre); }
.loire-app *, .loire-app *::before, .loire-app *::after { box-sizing: border-box; }
.loire-app button, .loire-app input { font-family: inherit; }
.loire-app [hidden] { display: none !important; }

.loire-btn { height: 46px; padding: 0 20px; border: 0; border-radius: 6px; background: var(--rouge); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.loire-btn:hover { background: #a10830; }
.loire-btn--discret { background: #fff; color: var(--rouge); border: 1.5px solid #e1c3cb; height: 40px; padding: 0 16px; font-size: 14px; }
.loire-btn--discret:hover { background: #faf3f4; }
.loire-btn--lecture { background: var(--bleu); height: 44px; }
.loire-btn--lecture:hover { background: var(--bleu-fonce); }
.loire-btn:focus-visible, .loire-repere:focus-visible, .loire-ctl button:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }

/* mesure en direct */
.loire-direct { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 16px; background: #f1f7fd; border: 1px solid #c9dff3; border-radius: 8px; }
.loire-direct__puce { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #e0242a; box-shadow: 0 0 0 0 rgba(224, 36, 42, .5); animation: loire-puls 1.8s infinite; }
@keyframes loire-puls { 70% { box-shadow: 0 0 0 10px rgba(224, 36, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 36, 42, 0); } }
.loire-direct__corps { flex: 1 1 0; min-width: 200px; }
.loire-direct__ligne { margin: 0; font-size: 16px; line-height: 1.4; }
.loire-direct__h { font: 500 22px/1 Oswald, sans-serif; color: var(--bleu-fonce); }
.loire-direct__q { color: var(--gris); }
.loire-direct__norme { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--encre); }
.loire-direct__norme strong { color: var(--bleu-fonce); }
.loire-direct__aide { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--gris); }

/* recherche d'adresse */
.loire-recherche { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; max-width: 760px; margin: 0 auto 16px; position: relative; }
.loire-champ { position: relative; flex: 1 1 280px; }
.loire-champ input { width: 100%; height: 46px; padding: 0 16px; border: 1.5px solid #cfcfcf; border-radius: 6px; font-size: 16px; background: #fff; color: var(--encre); }
.loire-champ input:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(31, 111, 194, .18); }
.loire-resultats { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #d5d5d5; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); max-height: 280px; overflow: auto; }
.loire-res { padding: 10px 16px; font-size: 14.5px; cursor: pointer; list-style: none; margin: 0; }
.loire-res:hover { background: #f1f7fd; }

/* carte */
.loire-carte { position: relative; height: clamp(420px, 66vh, 700px); background: #ece8df; border: 1px solid var(--filet); border-radius: 8px; overflow: hidden; }
.loire-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.loire-canvas:active { cursor: grabbing; }
.loire-chargement { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-weight: 600; color: var(--gris); background: rgba(236, 232, 223, .8); z-index: 5; }
.loire-app.est-charge-en-cours .loire-chargement { display: flex; }
.loire-niveau { position: absolute; z-index: 10; top: 12px; left: 12px; max-width: min(300px, calc(100% - 80px)); padding: 10px 16px 10px; background: rgba(255, 255, 255, .95); border: 1px solid #d6e3f0; border-radius: 8px; box-shadow: 0 6px 20px rgba(14, 58, 125, .16); }
.loire-niveau__h { display: block; font: 500 38px/1 Oswald, sans-serif; color: var(--bleu-fonce); }
.loire-niveau__txt { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: #444; }
.loire-ctl { position: absolute; z-index: 10; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.loire-ctl button { width: 38px; height: 38px; border: 1px solid #ccc; border-radius: 6px; background: #fff; color: #333; font-size: 19px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.loire-ctl button:hover { background: #f1f7fd; }
.loire-legende { position: absolute; z-index: 10; left: 12px; bottom: 12px; padding: 8px 12px 7px; background: rgba(255, 255, 255, .94); border: 1px solid #ddd; border-radius: 6px; font-size: 11.5px; color: #444; }
.loire-degrade { width: 150px; height: 9px; margin-bottom: 3px; border-radius: 2px; background: linear-gradient(90deg, rgb(160, 220, 245), rgb(105, 185, 235) 10%, rgb(55, 140, 215) 30%, rgb(28, 95, 185) 60%, rgb(14, 48, 125)); }
.loire-degre-lib { display: flex; justify-content: space-between; }
.loire-degre-nom { margin-top: 2px; font-size: 10.5px; color: var(--gris); }
.loire-attribution { position: absolute; z-index: 9; right: 8px; bottom: 6px; padding: 1px 6px; font-size: 10px; color: #555; background: rgba(255, 255, 255, .8); border-radius: 3px; }
.loire-toast { position: absolute; z-index: 20; left: 50%; bottom: 64px; transform: translateX(-50%) translateY(8px); padding: 9px 16px; background: #222; color: #fff; font-size: 13.5px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 90%; text-align: center; }
.loire-toast.est-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.loire-bulle { position: absolute; z-index: 12; right: 12px; bottom: 34px; width: min(330px, calc(100% - 24px)); padding: 10px 34px 10px 14px; background: rgba(255, 255, 255, .97); border: 1px solid #d6e3f0; border-radius: 8px; box-shadow: 0 6px 20px rgba(14, 58, 125, .2); font-size: 13.5px; line-height: 1.4; }
.loire-bulle strong { display: block; margin-bottom: 2px; font-size: 13.5px; }
.loire-bulle__x { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border: 0; background: none; font-size: 20px; line-height: 1; color: #666; cursor: pointer; }
@media (max-width: 800px) { .loire-bulle { right: 8px; left: 8px; width: auto; bottom: 8px; } .loire-legende { display: none; } }

/* commandes */
.loire-commande { margin: 0 0 14px; padding: 12px 18px 12px; background: #f6f9fd; border: 1px solid #dbe6f2; border-radius: 8px; }
.loire-curseur__lib { display: block; margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gris); }
.loire-curseur__rail { position: relative; padding: 4px 0 12px; }
.loire-curseur input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; margin: 0; border-radius: 6px; cursor: pointer; background: linear-gradient(90deg, #2e7fd1 var(--pct, 0%), #d3dbe5 var(--pct, 0%)); }
.loire-curseur input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--bleu); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.loire-curseur input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--bleu); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.loire-curseur input[type=range]:focus-visible { outline: 2px solid var(--rouge); outline-offset: 6px; }
.loire-graduations { position: absolute; left: 14px; right: 14px; bottom: 0; height: 10px; pointer-events: none; }
.loire-grad { position: absolute; bottom: 0; width: 2px; height: 9px; margin-left: -1px; background: #6d7b8c; }
.loire-incertitude { position: absolute; bottom: 0; height: 6px; background: rgba(191, 10, 55, .22); border-radius: 3px; }
.loire-grad.est-protection { background: var(--rouge); height: 12px; width: 3px; }
.loire-curseur__bornes { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--gris); }
.loire-reperes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.loire-repere { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 4px 12px; border: 1.5px solid #c5d6e8; border-radius: 6px; background: #fff; color: var(--encre); cursor: pointer; line-height: 1.25; }
.loire-repere:hover { border-color: var(--bleu); background: #eef5fc; }
.loire-repere__n { font-size: 13px; font-weight: 700; }
.loire-repere__h { font-size: 12px; color: var(--gris); min-height: 1em; }
.loire-options { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin-top: 10px; font-size: 14px; }
.loire-groupe { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.loire-groupe > span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gris); }
.loire-groupe label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.loire-groupe input { accent-color: var(--bleu); width: 16px; height: 16px; }

/* lecture */
.loire-lecture-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 0; }
.loire-bilan, .loire-sonde { padding: 14px 18px; border: 1px solid var(--filet); border-radius: 8px; background: #fff; font-size: 14.5px; line-height: 1.55; }
.loire-bilan p, .loire-sonde p { margin: 0 0 8px; }
.loire-bilan p:last-child, .loire-sonde p:last-child { margin-bottom: 0; }
.loire-stat__n { font: 500 30px/1 Oswald, sans-serif; color: var(--bleu-fonce); margin-right: 4px; }
.loire-sonde__tit { font: 500 18px/1.25 Oswald, sans-serif; color: var(--encre); }
.loire-sonde__etat { display: inline-block; padding: 3px 10px; border-radius: 4px; font-weight: 700; font-size: 13.5px; }
.loire-sonde__etat.est-inonde { background: #dcecfb; color: var(--bleu-fonce); }
.loire-sonde__etat.est-sec { background: #eef3e8; color: #3d6b1e; }
.loire-aide { font-size: 12.5px; color: var(--gris); }
.loire-avertissement { margin: 16px 0 0; padding: 12px 16px; border-left: 4px solid var(--rouge); background: #faf3f4; font-size: 13.5px; line-height: 1.55; color: #444; }
.loire-avertissement a { color: var(--rouge); text-decoration: underline; }

@media (max-width: 800px) {
  .loire-app { padding: 0 14px; }
  .loire-direct { flex-wrap: wrap; align-items: flex-start; }
  .loire-direct .loire-btn { flex: 1 1 100%; }
  .loire-direct__puce { margin-top: 6px; }
  .loire-btn { flex: 1 1 auto; }
  .loire-carte { height: 58vh; min-height: 360px; }
  .loire-niveau { padding: 8px 12px; max-width: calc(100% - 70px); }
  .loire-niveau__h { font-size: 30px; }
  .loire-niveau__txt { font-size: 12px; }
  .loire-legende { left: 8px; bottom: 8px; }
  .loire-degrade { width: 120px; }
  .loire-attribution { display: none; }
  .loire-lecture-zone { grid-template-columns: 1fr; }
  .loire-commande { padding: 14px 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { .loire-toast { transition: none; } .loire-direct__puce { animation: none; } }

/* ---------- page « La Loire à Orléans » (titre, introduction, sections de texte) ---------- */
.vo-loire-page { padding: 34px 0 40px; font-family: "Open Sans", sans-serif; color: #222; }
.vo-loire-entete { max-width: 760px; margin: 0 auto 26px; padding: 0 20px; text-align: center; }
.vo-loire-page h1.vo-loire-h1 { margin: 0 0 16px !important; padding: 0 !important; font: 500 46px/1.1 Oswald, sans-serif !important; color: #222 !important; text-transform: none !important; }
.vo-loire-intro p { margin: 0 0 12px; font-size: 17px; line-height: 1.6; color: #444; }
.vo-loire-texte { max-width: 760px; margin: 34px auto 0; padding: 0 20px; }
.vo-loire-page .vo-loire-texte h2 { margin: 0 0 14px !important; padding: 0 0 10px !important; font: 500 28px/1.2 Oswald, sans-serif !important; color: #222 !important; border-bottom: 3px solid #bf0a37; text-transform: none !important; }
.vo-loire-texte p { margin: 0 0 14px; font-size: 16px; line-height: 1.65; color: #333; }
.vo-loire-texte ul { margin: 0 0 14px; padding-left: 22px; }
.vo-loire-texte li { margin: 0 0 6px; font-size: 16px; line-height: 1.6; color: #333; }
.vo-loire-texte a { color: #bf0a37; text-decoration: underline; }
@media (max-width: 700px) {
  .vo-loire-page { padding-top: 22px; }
  .vo-loire-page h1.vo-loire-h1 { font-size: 34px !important; }
  .vo-loire-intro p { font-size: 16px; }
  .vo-loire-page .vo-loire-texte h2 { font-size: 24px !important; }
}
