/* ==========================================================================
   OsmoTools : carte de France interactive ([osmova_carte_france])
   ========================================================================== */

.ogeo {
    --ogeo-noir: #0A0A0A;
    --ogeo-gris: #6B6B6B;
    --ogeo-bg: #F3F4F6;
    --ogeo-border: #E5E7EB;
    --ogeo-blue: #0064FF;
    --ogeo-land: #E6EAF0;
    --ogeo-ok: #1E8E5A;
    --ogeo-ko: #D2382E;
    --ogeo-mono: 'JetBrains Mono', monospace;
    margin: 0 0 40px;
    padding: 24px;
    border: 1px solid var(--ogeo-border);
    border-radius: 16px;
    background: #fff;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ogeo-noir);
}

.ogeo *, .ogeo *::before, .ogeo *::after { box-sizing: border-box; }
.ogeo [hidden] { display: none !important; }

.ogeo__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ogeo__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 16px; }
.ogeo__badge { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 4px; background: color-mix(in srgb, var(--ogeo-blue) 10%, white); color: var(--ogeo-blue); font: 700 11px/1.4 var(--ogeo-mono); letter-spacing: .08em; text-transform: uppercase; }
.ogeo .ogeo__title { margin: 0; font-size: 1.45rem; line-height: 1.25; }

.ogeo__tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--ogeo-bg); }
.ogeo__tab, .ogeo__sbtn { appearance: none; border: 0; background: transparent; color: var(--ogeo-gris); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; }
.ogeo__tab { padding: 10px 14px; border-radius: 7px; white-space: nowrap; }
.ogeo__tab.is-on { background: #fff; color: var(--ogeo-noir); box-shadow: 0 1px 3px rgba(10, 10, 10, .12); }

.ogeo__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ogeo__seg { display: inline-flex; padding: 3px; border: 1px solid var(--ogeo-border); border-radius: 9px; }
.ogeo__sbtn { padding: 9px 12px; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.ogeo__sbtn.is-on { background: var(--ogeo-noir); color: #fff; }
.ogeo__search { position: relative; flex: 1 1 220px; min-width: 180px; }
.ogeo__q { width: 100%; padding: 11px 12px; border: 1px solid var(--ogeo-border); border-radius: 9px; font: inherit; font-size: 16px; background: #fff; color: inherit; }
.ogeo__results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; border: 1px solid var(--ogeo-border); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(10, 10, 10, .14); max-height: 280px; overflow: auto; }
.ogeo__results button { display: flex; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 14px; color: inherit; text-align: left; cursor: pointer; }
.ogeo__results button:hover, .ogeo__results button:focus { background: var(--ogeo-bg); }
.ogeo__results b { font-family: var(--ogeo-mono); font-size: 13px; min-width: 32px; }
.ogeo__results small { color: var(--ogeo-gris); margin-left: auto; }

.ogeo__main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ogeo__left { min-width: 0; }

.ogeo__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ogeo__chip { width: 32px; height: 32px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--ogeo-border); cursor: pointer; }
.ogeo__chip[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ogeo-noir); }
.ogeo__quick .ogeo__btn { margin-left: auto; padding: 8px 12px; font-size: 13px; }

.ogeo__stage { position: relative; padding: 6px 10px 0; border: 1px solid var(--ogeo-border); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #FBFCFE, #F6F8FB); }
/* Le thème impose une police d'icônes à tous les svg (Custom_Fonts_Manager) : sans ça, accents cassés. */
.ogeo__svg { display: block; width: 100%; height: auto; cursor: pointer; touch-action: pan-y; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; }
.ogeo__stage.is-zoomed .ogeo__svg { touch-action: none; cursor: grab; }
.ogeo__zoom { position: absolute; z-index: 5; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.ogeo__zbtn { width: 38px; height: 38px; border: 1px solid var(--ogeo-border); border-radius: 8px; background: #fff; color: var(--ogeo-noir); font-size: 20px; line-height: 1; cursor: pointer; }
.ogeo__zbtn:hover { background: var(--ogeo-bg); }
.ogeo__tip { position: absolute; z-index: 6; margin: 0; padding: 4px 8px; border-radius: 6px; background: var(--ogeo-noir); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; transform: translate(-50%, -130%); }

.ogeo__z { fill: var(--ogeo-land); stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; }
.ogeo__z:hover { fill: color-mix(in srgb, var(--ogeo-blue) 30%, var(--ogeo-land)); }
.ogeo__z.is-paint:hover { filter: brightness(.94); }
.ogeo__z.is-sel { stroke: var(--ogeo-blue); stroke-width: 2.2; fill: color-mix(in srgb, var(--ogeo-blue) 28%, var(--ogeo-land)); }
.ogeo__z.is-paint.is-sel { fill-opacity: .85; }
.ogeo__z.is-ok { fill: var(--ogeo-ok); }
.ogeo__z.is-ko { fill: var(--ogeo-ko); }
.ogeo__z.is-rep { stroke: var(--ogeo-ko); stroke-width: 2.4; }
.ogeo__z.is-out { fill: #F3F4F6; opacity: .55; pointer-events: none; }
.ogeo__z:focus { outline: none; stroke: var(--ogeo-blue); stroke-width: 2.6; }
.ogeo__regline { fill: none; stroke: #8D97A5; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }
.ogeo__box { fill: rgba(255, 255, 255, .55); stroke: var(--ogeo-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ogeo__box--hit { cursor: pointer; }
.ogeo__boxt { fill: var(--ogeo-gris); font-weight: 600; pointer-events: none; }
.ogeo__lbl { fill: var(--ogeo-noir); paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 2.5px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.ogeo__lbl tspan { font-weight: 600; }

.ogeo__maptitle { margin: 0 2px 8px; font-size: 15px; font-weight: 700; }

.ogeo__hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--ogeo-gris); }
.ogeo__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 2px 0; padding: 0; list-style: none; font-size: 13px; }
.ogeo__legend li { display: flex; align-items: center; gap: 6px; }
.ogeo__legend i { width: 14px; height: 14px; border-radius: 3px; }

.ogeo__actions, .ogeo__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.ogeo__btn { padding: 10px 14px; border: 1px solid var(--ogeo-noir); border-radius: 8px; background: var(--ogeo-noir); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ogeo__btn:hover { background: #2a2a2a; }
.ogeo__btn--ghost { background: #fff; color: var(--ogeo-noir); border-color: var(--ogeo-border); }
.ogeo__btn--ghost:hover { background: var(--ogeo-bg); }
.ogeo__btn:disabled { opacity: .4; cursor: not-allowed; }

.ogeo__side { min-width: 0; }
.ogeo__h3 { margin: 0 0 12px; font-size: 16px; }
.ogeo__empty { margin: 0; padding: 18px; border-radius: 10px; background: var(--ogeo-bg); color: var(--ogeo-gris); font-size: 14px; line-height: 1.5; }

.ogeo__fiche { padding: 18px; border: 1px solid var(--ogeo-border); border-radius: 12px; }
.ogeo__fiche-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ogeo__fiche-num { padding: 6px 10px; border-radius: 8px; background: var(--ogeo-blue); color: #fff; font: 700 18px/1 var(--ogeo-mono); }
.ogeo__fiche-name { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; }
.ogeo__dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.ogeo__dl dt { color: var(--ogeo-gris); }
.ogeo__dl dd { margin: 0; font-weight: 600; text-align: right; }
.ogeo__fiche-note { margin: 12px 0 0; font-size: 12px; color: var(--ogeo-gris); line-height: 1.45; }
.ogeo__children { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.ogeo__children button { padding: 5px 8px; border: 1px solid var(--ogeo-border); border-radius: 6px; background: #fff; font: inherit; font-size: 12px; color: inherit; cursor: pointer; }
.ogeo__children button:hover { background: var(--ogeo-bg); }

.ogeo__field { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ogeo-gris); }
.ogeo__field > span { display: block; margin-bottom: 5px; }
.ogeo__field input, .ogeo__field select, .ogeo__field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--ogeo-border); border-radius: 8px; font: inherit; font-size: 16px; color: var(--ogeo-noir); background: #fff; }
.ogeo__sub { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--ogeo-border); }
.ogeo__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.ogeo__label span { font-weight: 400; color: var(--ogeo-gris); }
.ogeo__palettes { display: flex; flex-wrap: wrap; gap: 6px; }
.ogeo__pal { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--ogeo-border); border-radius: 7px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.ogeo__pal:hover { background: var(--ogeo-bg); }
.ogeo__pal-chips { display: flex; }
.ogeo__pal-chips i { width: 10px; height: 14px; }
.ogeo__colors { margin: 0; padding: 0; list-style: none; }
.ogeo__colors li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ogeo__active { position: relative; width: 26px; height: 26px; flex: none; }
.ogeo__active input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ogeo__active span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ogeo-border); }
.ogeo__active input:checked + span { box-shadow: 0 0 0 2px var(--ogeo-noir); }
.ogeo__active input:focus-visible + span { box-shadow: 0 0 0 3px var(--ogeo-blue); }
.ogeo__pick { width: 34px; height: 30px; padding: 0; border: 1px solid var(--ogeo-border); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.ogeo__colors input[type=text] { flex: 1 1 auto; min-width: 0; padding: 7px 9px; border: 1px solid var(--ogeo-border); border-radius: 6px; font: inherit; font-size: 16px; }
.ogeo__del { width: 28px; height: 28px; border: 0; background: none; color: var(--ogeo-gris); font-size: 16px; cursor: pointer; flex: none; }
.ogeo__check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.ogeo__list-msg { margin: 8px 0 0; font-size: 13px; color: var(--ogeo-gris); }
.ogeo__note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ogeo-gris); }

.ogeo__ask { margin: 0 0 6px; font-size: 22px; font-weight: 800; line-height: 1.25; min-height: 28px; }
.ogeo__feedback { margin: 0 0 6px; font-size: 14px; min-height: 20px; color: var(--ogeo-gris); }
.ogeo__feedback.is-ok { color: var(--ogeo-ok); font-weight: 600; }
.ogeo__feedback.is-ko { color: var(--ogeo-ko); font-weight: 600; }
.ogeo__score { margin: 0; font: 600 13px/1.4 var(--ogeo-mono); color: var(--ogeo-gris); }
.ogeo__review { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; padding: 12px; border-radius: 8px; background: var(--ogeo-bg); }

.ogeo__list { margin-top: 18px; }
.ogeo__list summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.ogeo__group { margin-top: 12px; }
.ogeo__group h3 { margin: 0 0 6px; font-size: 13.5px; color: var(--ogeo-gris); }
.ogeo__group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.ogeo__group button { display: flex; gap: 8px; width: 100%; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--ogeo-bg); background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ogeo__group button:hover { background: var(--ogeo-bg); }
.ogeo__group b { font-family: var(--ogeo-mono); font-size: 12.5px; min-width: 28px; }

.ogeo__credit { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ogeo-gris); }

.ogeo :focus-visible { outline: 2px solid var(--ogeo-blue); outline-offset: 2px; }

@media (max-width: 860px) {
    .ogeo { padding: 14px; }
    .ogeo__main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ogeo__head { align-items: stretch; flex-direction: column; }
    .ogeo__tabs { width: 100%; }
    .ogeo__tab { flex: 1 1 auto; padding: 10px 6px; font-size: 13.5px; text-align: center; }
    .ogeo__bar .ogeo__seg { flex: 1 1 auto; }
    .ogeo__seg .ogeo__sbtn { flex: 1 1 auto; text-align: center; padding: 9px 6px; }
    .ogeo__search { flex: 1 1 100%; }
    .ogeo__actions .ogeo__btn { flex: 1 1 calc(50% - 4px); padding: 10px 6px; font-size: 13px; }
    .ogeo__group ul { grid-template-columns: minmax(0, 1fr); }
    /* En révision, la question reste au-dessus de la carte, pas sous elle. */
    .ogeo.is-revise .ogeo__side { order: -1; }
    .ogeo.is-revise .ogeo__note { display: none; }
}

/* Impression : seule la feuille construite à la demande sort sur papier. */
.ogeo__sheet { display: none; }

@media print {
    html.ogeo-printing body > * { display: none !important; }
    html.ogeo-printing body > .ogeo__sheet { display: block !important; background: #fff; }
    html.ogeo-printing .ogeo__sheet svg { font-family: Arial, Helvetica, sans-serif !important; }
    .ogeo__sheet svg { display: block; width: 100%; height: auto; max-height: 277mm; }
    @page { size: A4 portrait; margin: 10mm; }
}
