/* IMTM, onepager temporaire : le plateau. */

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --plateau: #00457e;
  --plateau-profond: #00345f;
  --carton: #ffffff;
  --jaune: #ffc928;
  --vert: #63a844;
  --encre: #0b2a45;
  --encre-douce: #3a5068;
  --table: #eaf0f6;
  --trait-blanc: rgba(255, 255, 255, .82);

  --ombre-carton: 0 2px 3px rgba(0, 22, 48, .3), 0 16px 28px -14px rgba(0, 18, 40, .6);
  --ombre-carte: 0 1px 2px rgba(11, 42, 69, .1), 0 18px 36px -20px rgba(11, 42, 69, .4);
  --ombre-carte-haute: 0 2px 4px rgba(11, 42, 69, .12), 0 26px 44px -20px rgba(11, 42, 69, .5);

  --rayon: 20px;
  --rayon-case: 16px;
  --marge: clamp(16px, 2.2vw, 32px);
  --largeur: 1360px;
  --sortie: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
  scrollbar-color: var(--plateau) var(--table);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--table);
  color: var(--encre);
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol { margin: 0; }
p, li { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
address { font-style: normal; }
::selection { background: var(--jaune); color: var(--encre); }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; border-radius: 6px; }

.icones { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.evitement {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--jaune); color: var(--encre); font-weight: 700;
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top .2s var(--sortie);
}
.evitement:focus { top: 12px; }

/* ---------- Le plateau : en-tête et premier écran ---------- */

.haut, .plateau { background: var(--plateau); color: #fff; }
.haut { padding: var(--marge) var(--marge) 0; }
.plateau { padding: 0 var(--marge) var(--marge); }

.entete, .jeu {
  max-width: var(--largeur);
  margin-inline: auto;
  border: 3px solid var(--trait-blanc);
  position: relative;
}
.entete {
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  padding: clamp(14px, 1.8vw, 24px) clamp(14px, 2.4vw, 32px) 0;
  display: flex; flex-wrap: wrap; gap: 14px 24px;
  align-items: center; justify-content: space-between;
}
.jeu {
  border-top: 0;
  border-radius: 0 0 30px 30px;
  --jeu-g: clamp(18px, 2.4vw, 34px);
  padding: clamp(14px, 1.6vw, 24px) clamp(14px, 2.4vw, 32px) clamp(18px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--jeu-g);
  align-items: start;
}

.cartouche {
  display: block;
  background: var(--carton);
  border-radius: 14px;
  padding: 10px 18px;
  box-shadow: var(--ombre-carton);
}
.cartouche img { height: clamp(36px, 3.2vw, 48px); width: auto; }

.sections { display: flex; flex-wrap: wrap; gap: 10px; }
.sections a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, .6); border-radius: 12px;
  padding: 9px 15px;
  transition: background-color .2s, border-color .2s;
}
.sections a:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* La case DÉPART */
.depart {
  background: var(--carton);
  color: var(--encre);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--ombre-carton);
}
.depart-bande, .arrivee-bande {
  display: flex; justify-content: space-between; gap: 12px;
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  font-size: clamp(.95rem, .8rem + .35vw, 1.2rem);
}
.depart-bande { background: var(--jaune); padding: 13px clamp(18px, 2vw, 28px); }
.depart-bande span:last-child { letter-spacing: .06em; font-weight: 700; text-transform: none; }
.depart-corps { padding: clamp(18px, 2vw, 28px); padding-top: clamp(16px, 1.6vw, 24px); }

h1 {
  font-size: clamp(1.75rem, 1rem + 1.4vw, 2.2rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--plateau);
  text-wrap: balance;
}
.depart-texte { margin-top: 12px; font-size: clamp(1rem, .92rem + .2vw, 1.125rem); max-width: 48ch; color: var(--encre-douce); }
.depart-consigne { margin-top: 16px; font-weight: 700; }

.tels { display: grid; gap: 0; margin-top: 6px; container-type: inline-size; }
.tel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "lieu lieu" "num pastille" "terr terr";
  column-gap: 14px;
  align-items: center;
  padding: 8px 12px;
  margin-inline: -12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--plateau);
  transition: background-color .25s var(--sortie);
}
.tels li + li { border-top: 2px solid var(--table); padding-top: 2px; }
.tel:hover { background: var(--table); }
.tel:focus-visible { outline-color: var(--plateau); outline-offset: 2px; border-radius: 14px; }
.tel-lieu { grid-area: lieu; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 700; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre); }
.tel-num {
  grid-area: num;
  font-size: clamp(1.6rem, calc((100cqi - 80px) / 6.9), 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tel-lieu .tel-poste {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--table);
  color: var(--plateau);
  letter-spacing: .06em;
  white-space: nowrap;
}
.tel-terr { grid-area: terr; font-size: .9rem; line-height: 1.35; color: var(--encre-douce); margin-top: 2px; }
.tel-pastille {
  grid-area: pastille;
  display: grid; place-items: center;
  width: clamp(44px, 3.6vw, 54px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--vert);
  color: var(--encre);
  transition: transform .3s var(--sortie);
}
.tel-pastille svg { width: 46%; height: 46%; stroke-width: 2.2; }
.tel:hover .tel-pastille { transform: scale(1.08) rotate(-8deg); }

/* Le chemin */
.chemin {
  --g: clamp(12px, 1.25vw, 18px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--g);
}
.etapes { display: contents; }
.case, .chemin-note, .arrivee { grid-column: var(--c, 1 / -1); grid-row: var(--r); }
.case {
  position: relative;
  aspect-ratio: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(10px, 1vw, 14px);
  background: var(--carton);
  color: var(--encre);
  border-radius: var(--rayon-case);
  box-shadow: var(--ombre-carton);
  transition: box-shadow .35s var(--sortie);
}
.case::after {
  content: "";
  position: absolute;
  background: var(--trait-blanc);
  border-radius: 3px;
  pointer-events: none;
}
.etapes > .case:first-child::before {
  content: "";
  position: absolute;
  right: 100%; top: calc(50% - 3px);
  width: var(--jeu-g); height: 6px;
  background: var(--trait-blanc);
  border-radius: 3px;
  pointer-events: none;
}
.case[data-d="droite"]::after { left: 100%; top: calc(50% - 3px); width: var(--g); height: 6px; }
.case[data-d="gauche"]::after { right: 100%; top: calc(50% - 3px); width: var(--g); height: 6px; }
.case[data-d="bas"]::after { top: 100%; left: calc(50% - 3px); height: var(--g); width: 6px; }

.case-num {
  display: grid; place-items: center;
  width: 2.15em; height: 2.15em;
  border-radius: 50%;
  background: var(--plateau); color: #fff;
  font-weight: 800; font-size: clamp(.9rem, .8rem + .2vw, 1.05rem);
  font-variant-numeric: tabular-nums;
}
.case-nom {
  font-weight: 700;
  font-size: clamp(.92rem, .72rem + .42vw, 1.15rem);
  line-height: 1.15;
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.case.est-active { box-shadow: var(--ombre-carton), inset 0 0 0 4px var(--vert); }

.case-speciale { background: var(--jaune); text-decoration: none; }
.case-speciale .case-num { background: var(--encre); }
.case-num svg { width: 1.05em; height: 1.05em; stroke-width: 2.6; }
.case-speciale:hover { box-shadow: var(--ombre-carton), inset 0 0 0 3px var(--encre); }
.case-speciale:focus-visible { outline-color: #fff; }
.case-speciale.est-active { box-shadow: var(--ombre-carton), inset 0 0 0 4px var(--vert); }

.chemin-note {
  align-self: center;
  font-size: clamp(.95rem, .82rem + .3vw, 1.1rem);
  line-height: 1.35;
  font-weight: 600;
  color: #fff;
  padding-right: 6px;
}

.arrivee {
  position: relative;
  background: var(--jaune);
  color: var(--encre);
  border-radius: 24px;
  padding-bottom: clamp(18px, 2vw, 28px);
  box-shadow: var(--ombre-carton);
}
.arrivee.est-active { outline: 4px solid var(--vert); outline-offset: -4px; }
.arrivee-bande { background: var(--carton); border-radius: 24px 24px 0 0; padding: 13px clamp(18px, 2.2vw, 32px); }
.arrivee-corps { padding: clamp(14px, 1.6vw, 22px) clamp(18px, 2.2vw, 32px) 0; }
.arrivee-titre {
  font-size: clamp(1.5rem, 1rem + 1vw, 1.8rem);
  line-height: 1.06; font-weight: 800; letter-spacing: -.02em;
  color: var(--plateau);
  text-wrap: balance;
}
.arrivee-texte { margin-top: 10px; max-width: 52ch; }

/* Le pion */
.pion {
  position: absolute;
  top: clamp(8px, .8vw, 12px);
  right: clamp(8px, .8vw, 12px);
  width: clamp(30px, 2.6vw, 40px);
  z-index: 2;
  pointer-events: none;
}
.pion-corps {
  display: block; width: 100%; height: auto;
  fill: var(--vert); stroke: #fff; stroke-width: 2.4;
  filter: drop-shadow(0 5px 4px rgba(0, 20, 40, .35));
  overflow: visible;
}

/* ---------- Les cartes de services ---------- */

.services {
  max-width: var(--largeur);
  margin-inline: auto;
  padding: clamp(56px, 7vw, 104px) var(--marge);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.services-panneau { position: sticky; top: 24px; }
h2 {
  font-size: clamp(2rem, 1.3rem + 1.8vw, 3rem);
  line-height: 1.05; font-weight: 800; letter-spacing: -.02em;
  color: var(--plateau);
  text-wrap: balance;
}
.services-panneau > p { margin-top: 14px; max-width: 34ch; color: var(--encre-douce); font-size: 1.125rem; }

.lieux { display: grid; gap: 12px; margin-top: 28px; }
.lieu {
  display: flex; align-items: center; gap: 12px;
  background: var(--plateau); color: #fff;
  font-weight: 700; font-size: 1.15rem;
  padding: 18px 20px;
  border-radius: var(--rayon-case);
  box-shadow: var(--ombre-carte);
  transition: opacity .4s var(--sortie), box-shadow .4s var(--sortie), transform .4s var(--sortie);
}
.lieu svg { width: 1.4em; height: 1.4em; color: var(--jaune); }
.services[data-lieux]:not([data-lieux=""]) .lieu { opacity: .32; transform: scale(.98); }
.services[data-lieux~="longueuil"] .lieu[data-lieu="longueuil"],
.services[data-lieux~="saint-hyacinthe"] .lieu[data-lieu="saint-hyacinthe"] {
  opacity: 1; transform: none;
  box-shadow: var(--ombre-carte), inset 0 0 0 4px var(--vert);
}

.cartes { display: grid; gap: clamp(18px, 2vw, 26px); }
.carte {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  background: var(--carton);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--ombre-carte);
  transition: box-shadow .4s var(--sortie), transform .4s var(--sortie);
}
.carte.est-active { box-shadow: var(--ombre-carte-haute); transform: translateY(-3px); }
.carte-photo { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.carte-corps { padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; }
.etiquettes li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .875rem; font-weight: 600; line-height: 1.2;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  background: var(--table); color: var(--plateau);
}
.etiquettes svg { width: 1.1em; height: 1.1em; }
.etiquettes .etiquette-reference { background: var(--jaune); color: var(--encre); }
h3 { font-size: clamp(1.3rem, 1.05rem + .6vw, 1.6rem); line-height: 1.15; font-weight: 800; letter-spacing: -.012em; color: var(--plateau); text-wrap: balance; }
h3 span { display: block; margin-top: 4px; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--encre-douce); }
.carte-corps > p { max-width: 62ch; }
.points { display: grid; gap: 6px; }
.points li { position: relative; padding-left: 22px; color: var(--encre-douce); }
.points li::before {
  content: ""; position: absolute; left: 2px; top: .52em;
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--plateau);
}
.carte-note { font-weight: 700; color: var(--encre); }

/* ---------- La feuille de règles ---------- */

.regles {
  background: var(--jaune);
  padding: clamp(56px, 7vw, 104px) var(--marge);
}
.regles > * { max-width: var(--largeur); }
.regles {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px);
  justify-content: center;
}
@media (min-width: 1424px) {
  .regles { padding-inline: calc((100vw - var(--largeur)) / 2); }
}
.regles h2 { color: var(--plateau); }
.regles-intro h3 { margin-top: clamp(24px, 3vw, 40px); }
.regles-intro p { margin-top: 10px; max-width: 52ch; }
.regles-liste {
  background: var(--carton);
  border-radius: var(--rayon);
  padding: 4px clamp(20px, 2.6vw, 40px);
  box-shadow: 0 1px 2px rgba(80, 60, 0, .12), 0 18px 34px -20px rgba(80, 60, 0, .45);
}
.regles-liste li {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 6px clamp(18px, 2.4vw, 36px);
  padding: clamp(18px, 2vw, 26px) 0;
}
.regles-liste li + li { border-top: 1px solid #dfe6ee; }
.regles-liste h3 { font-size: clamp(1.15rem, 1rem + .4vw, 1.35rem); }
.regles-liste p { grid-column: 2; }
.regles :focus-visible { outline-color: var(--plateau); }

/* ---------- Nous joindre ---------- */

.joindre {
  background: var(--plateau);
  color: #fff;
  padding: clamp(56px, 7vw, 104px) var(--marge);
}
.joindre-tete, .points-service { max-width: var(--largeur); margin-inline: auto; }
.joindre-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.joindre h2 { color: #fff; }
.joindre-heures { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.125rem; }
.joindre-heures svg { color: var(--jaune); }
.points-service { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: clamp(24px, 3vw, 40px); }
.point {
  background: var(--carton); color: var(--encre);
  border-radius: 24px; overflow: hidden;
  box-shadow: var(--ombre-carton);
}
.point-bande {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  background: var(--table);
  padding: 16px clamp(18px, 2vw, 28px);
  font-size: clamp(1.3rem, 1.05rem + .6vw, 1.6rem);
}
.point-bande span { font-size: 1rem; font-weight: 600; color: var(--encre-douce); letter-spacing: 0; }
.point-corps { padding: clamp(18px, 2vw, 28px); display: grid; gap: 16px; container-type: inline-size; }
.tel-compact { grid-template-areas: "num pastille" "poste pastille"; padding: 8px 12px; }
.tel-compact .tel-num { font-size: clamp(1.5rem, calc((100cqi - 124px) / 6.9), 2.4rem); }
.tel-compact .tel-poste { grid-area: poste; font-weight: 700; font-size: 1rem; color: var(--encre); }
.tel-compact .tel-pastille { width: 52px; }
.point address { font-size: 1.125rem; }
.point-liens { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.point-liens a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--plateau); }
.point-liens a:hover { text-decoration-thickness: .14em; }
.point :focus-visible { outline-color: var(--plateau); }
.point-fax { color: var(--encre-douce); font-size: .95rem; }

/* ---------- Pied de page ---------- */

.pied { background: var(--plateau-profond); color: #dbe6f1; padding: clamp(44px, 5vw, 72px) var(--marge) 28px; }
.pied-grille {
  max-width: var(--largeur); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.pied-org img { width: 150px; }
.pied-org p, .pied-loi25 p { margin-top: 14px; font-size: .95rem; max-width: 46ch; }
.pied h2 { font-size: 1.05rem; letter-spacing: 0; color: #fff; font-weight: 700; }
.pied a { color: #fff; }
.pied-liens { display: grid; gap: 18px; justify-items: start; }
.pied-facebook { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.pied-quebec { display: block; background: var(--carton); border-radius: 12px; padding: 8px 12px; }
.pied-quebec img { width: 170px; }
.pied-droits { max-width: var(--largeur); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .875rem; color: #b9cadb; }

/* ---------- Tablette ---------- */

@media (max-width: 1080px) {
  .jeu { grid-template-columns: minmax(0, 1fr); }
  .depart { max-width: 720px; }
  .etapes > .case:first-child::before { right: auto; top: auto; bottom: 100%; left: calc(50% - 3px); width: 6px; height: var(--jeu-g); }
  .services { grid-template-columns: minmax(0, 1fr); }
  .services-panneau { position: static; }
  .regles { grid-template-columns: minmax(0, 1fr); }
  .pied-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pied-liens { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; }
}

/* ---------- Cellulaire : le plateau se replie à la verticale ---------- */

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .entete { border-radius: 22px 22px 0 0; }
  .jeu { border-radius: 0 0 22px 22px; }
  .cartouche { padding: 10px 14px; }
  .tel { grid-template-areas: "lieu pastille" "num num" "terr terr"; }
  .tel-pastille { width: 42px; }
  .tel-num { font-size: clamp(1.6rem, calc((100cqi - 4px) / 6.8), 2.8rem); }
  .tel-compact { grid-template-areas: "num pastille" "poste pastille"; }
  .tel-compact .tel-num { font-size: clamp(1.5rem, calc((100cqi - 110px) / 6.9), 2.2rem); }
  .sections { gap: 8px; }
  .sections a { font-size: .9rem; padding: 7px 11px; border-radius: 10px; }

  .chemin { grid-template-columns: repeat(2, minmax(0, 1fr)); --g: 16px; }
  .case, .chemin-note, .arrivee { grid-column: var(--mc, 1 / -1); grid-row: var(--mr); }
  .case { aspect-ratio: 5 / 4; }
  .case::after { display: none; }
  .case[data-m]::after { display: block; inset: auto; }
  .case[data-m="droite"]::after { left: 100%; right: auto; top: calc(50% - 3px); width: var(--g); height: 6px; }
  .case[data-m="gauche"]::after { right: 100%; left: auto; top: calc(50% - 3px); width: var(--g); height: 6px; }
  .case[data-m="bas"]::after { top: 100%; left: calc(50% - 3px); height: var(--g); width: 6px; }
  .case-nom { font-size: 1.05rem; }

  .lieux { position: sticky; top: 8px; z-index: 3; display: flex; gap: 8px; margin-top: 20px; }
  .lieu { flex: 1 1 auto; white-space: nowrap; font-size: .95rem; padding: 12px 10px; gap: 6px; }
  .services-panneau { display: contents; }
  .services { display: block; }
  .services-panneau > h2, .services-panneau > p { position: static; }
  .cartes { margin-top: 18px; }
  .carte { grid-template-columns: minmax(0, 1fr); }
  .carte-photo { aspect-ratio: 16 / 9; height: auto; }

  .regles-liste li { grid-template-columns: minmax(0, 1fr); }
  .regles-liste p { grid-column: auto; }
  .points-service { grid-template-columns: minmax(0, 1fr); }
  .pied-grille { grid-template-columns: minmax(0, 1fr); }
  .pied-liens { grid-auto-flow: row; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
