:root {
  --blue: #1c78b8;
  --dark: #102a43;
  --muted: #66788a;
  --line: #e3ebf2;
  --surface: #fff;
  --soft: #f4f8fb;
  /* Remplacez none par url('../img/background.jpg') pour ajouter votre image.--page-background-image: none; */
  --page-background-image: url('../img/background.jpg');
  --page-background-opacity: .10;
}
* { box-sizing: border-box; }
/* Indispensable : une section masquée ne doit jamais occuper de place. */
[hidden] { display: none !important; }
body { position: relative; margin: 0; min-height: 100vh; font-family: Roboto, Arial, sans-serif; color: var(--dark); background: radial-gradient(circle at 10% 10%, #edf8ff 0, transparent 35%), #f8fbfd; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--page-background-image); background-position: center; background-repeat: no-repeat; background-size: cover; opacity: var(--page-background-opacity); }
button, select { font: inherit; }
.page-shell { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 90px; }
.hero { max-width: 820px; margin-bottom: 42px; }
.eyebrow { display: inline-block; color: var(--blue); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 10px 0 14px; font-size: clamp(2.3rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.hero h1 span { color: var(--blue); }
.hero p { max-width: 690px; margin: 0; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.explorer { display: grid; grid-template-columns: minmax(380px, .8fr) minmax(520px, 1.2fr); gap: 42px; align-items: start; }
.results-panel { background: rgba(255,255,255,.94); border: 1px solid rgba(212,225,235,.9); border-radius: 30px; box-shadow: 0 25px 60px rgba(31,75,108,.09); }
.wheel-panel { position: sticky; top: 22px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.wheel-wrap { position: relative; width: min(100%, 570px); margin: auto; aspect-ratio: 1; }
#odd-wheel { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 15px 15px rgba(17, 50, 74, .13)); }
.odd-segment { cursor: pointer; transform-origin: 260px 260px; transition: transform .2s ease, filter .2s ease, opacity .2s ease; outline: none; }
.odd-segment path { stroke: #fff; stroke-width: 2; transition: stroke-width .2s ease; }
.odd-segment text { pointer-events: none; fill: #fff; font-size: 23px; font-weight: 900; paint-order: stroke; stroke: rgba(0,0,0,.15); stroke-width: 2px; }
.odd-segment .segment-count { font-size: 13px; stroke-width: 0; fill: rgba(255,255,255,.95); }
.odd-segment:hover, .odd-segment:focus, .odd-segment.active { transform: scale(1.045); filter: brightness(1.08); }
.odd-segment.active path { stroke-width: 7; }
.wheel-center { position: absolute; inset: 31%; display: grid; place-content: center; text-align: center; pointer-events: none; }
.wheel-center small { text-transform: uppercase; color: var(--muted); letter-spacing: .14em; font-weight: 700; }
.wheel-center strong { font-size: clamp(1.55rem, 3vw, 2.5rem); margin: 4px 0; }
.wheel-center span { color: var(--muted); font-size: .78rem; }
.wheel-help { margin: 8px 0 0; color: var(--muted); font-size: .86rem; text-align: center; }
.results-panel { min-height: 650px; padding: 30px; }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.toolbar label { display: grid; gap: 8px; flex: 1; max-width: 360px; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.toolbar select { width: 100%; padding: 13px 42px 13px 15px; color: var(--dark); background: #fff; border: 1px solid #cedce8; border-radius: 12px; outline: none; }
.toolbar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28,120,184,.12); }
.reset-button { padding: 13px 18px; color: var(--blue); background: #eaf5fc; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.state-card { display: grid; place-items: center; text-align: center; min-height: 470px; padding: 40px; }
.state-card.compact { min-height: 240px; border: 1px dashed #cbd9e4; border-radius: 20px; }
.state-card h2, .state-card h3 { max-width: 510px; margin: 18px 0 8px; }
.state-card p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.65; }
.state-icon { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; color: #fff; background: var(--blue); font-size: 1.8rem; font-weight: 900; box-shadow: 0 12px 30px rgba(28,120,184,.25); }
.spinner { width: 44px; height: 44px; border: 4px solid #dcebf5; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.error { color: #a21942; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 20px; }
.results-heading h2 { margin: 5px 0 0; font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.total-pill, .province-badge, .priority-badge { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; white-space: nowrap; font-size: .75rem; font-weight: 800; }
.total-pill { color: var(--blue); background: #eaf5fc; }
.consultation-list { display: grid; gap: 20px; }
.consultation-card { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 35px rgba(27, 65, 91, .06); animation: cardIn .45s ease both; animation-delay: var(--delay); }
.card-topline { display: flex; justify-content: space-between; gap: 10px; }
.province-badge { color: #fff; background: var(--blue); }
.priority-badge { color: #795f18; background: #fff2c8; text-transform: capitalize; }
.priority-badge[data-priority="urgent"], .priority-badge[data-priority="élevé"], .priority-badge[data-priority="eleve"] { color: #a21942; background: #ffe6ed; }
.problem-title { margin: 18px 0 9px; font-size: 1.35rem; line-height: 1.25; }
.problem-description { color: #526779; line-height: 1.68; white-space: pre-line; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
.meta-grid > div { padding: 12px; background: var(--soft); border-radius: 11px; }
.meta-grid small { display: block; color: var(--muted); margin-bottom: 4px; }
.meta-grid strong { font-size: .9rem; }
.problem-details { border-top: 1px solid var(--line); padding-top: 15px; }
.problem-details summary { color: var(--blue); font-weight: 800; cursor: pointer; }
.detail-columns { display: grid; gap: 15px; margin-top: 18px; }
.detail-columns > div { border-left: 3px solid #cfe7f7; padding-left: 15px; }
.detail-columns h5, .solution-card h5 { margin: 0 0 5px; font-size: .85rem; }
.detail-columns p, .solution-card p { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-line; }
.attachment { display: inline-flex; margin-top: 14px; color: var(--blue); font-size: .85rem; font-weight: 800; text-decoration: none; }
.solutions-block { margin-top: 22px; padding: 20px; background: #f3f9fd; border-radius: 16px; }
.solutions-title-row { display: flex; align-items: center; justify-content: space-between; }
.solutions-title-row h4 { margin: 0; }
.solution-count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; color: #fff; background: var(--blue); border-radius: 999px; font-weight: 900; }
.solution-list { display: grid; gap: 12px; margin-top: 15px; }
.solution-card { padding: 16px; background: #fff; border: 1px solid #dae8f2; border-radius: 12px; }
.solution-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.solution-meta span { padding: 6px 9px; color: #526779; background: #edf3f7; border-radius: 7px; font-size: .75rem; }
.solution-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.solution-details summary { color: var(--blue); font-size: .84rem; font-weight: 800; cursor: pointer; }
.solution-details > div { margin-top: 12px; padding-left: 12px; border-left: 3px solid #cfe7f7; }
.solution-details h5 { margin: 0 0 4px; }
.solution-details p { margin: 0; }
.no-solution { color: var(--muted); font-style: italic; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 1000px) {
  .explorer { grid-template-columns: 1fr; }
  .wheel-panel { position: relative; top: 0; }
  .wheel-wrap { max-width: 580px; }
}
@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 1440px); padding: 35px 0 60px; }
  .hero { margin-bottom: 26px; }
  .wheel-panel { padding: 0; }
  .results-panel { padding: 16px; border-radius: 20px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label { max-width: none; }
  .results-heading { align-items: start; flex-direction: column; }
  .meta-grid { grid-template-columns: 1fr; }
  .consultation-card { padding: 18px; }
  .card-topline { align-items: start; flex-direction: column; }
  .state-card { min-height: 370px; padding: 25px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
