/* MairieConnect : feuille commune aux pages de la vitrine (accueil, espace de publication, pages légales, 404). */

@font-face {
  font-family: "Radio Canada";
  src: url("/fonts/radio-canada.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --fond: #ffffff;
  --fond-teinte: #eef3f9;
  --encre: #0f1d38;
  --texte: #2a3750;
  --discret: #55627a;
  --bleu: #0066cc;
  --bleu-fonce: #004fa3;
  --nuit: #0c1a33;
  --filet: #d2dbe8;
  --rayon: 8px;
  --rayon-image: 10px;
  --largeur: 1180px;
  --marge: clamp(20px, 5vw, 48px);
  --police: "Radio Canada", "Helvetica Neue", Arial, sans-serif;
  --ombre: 0 18px 40px -18px rgba(15, 29, 56, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--bleu); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { color: var(--encre); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 4vw, 3.15rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
p { text-wrap: pretty; }
a { color: var(--bleu-fonce); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { color: var(--encre); font-weight: 700; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 3px; }

.acces-contenu {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--encre); color: #fff; padding: 10px 16px; border-radius: var(--rayon);
}
.acces-contenu:focus { top: 12px; }

.cadre { width: 100%; max-width: calc(var(--largeur) + 2 * var(--marge)); margin: 0 auto; padding: 0 var(--marge); }
.bloc { padding: clamp(64px, 9vw, 116px) 0; }
.bloc-teinte { background: var(--fond-teinte); }
.chapeau { font-size: 1.2rem; max-width: 62ch; margin-top: 18px; }
.mesure { max-width: 66ch; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2; white-space: nowrap;
  color: #fff; background: var(--bleu); border: 2px solid var(--bleu); border-radius: var(--rayon);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.bouton:active { transform: translateY(1px); }
.bouton[disabled] { opacity: 0.6; cursor: progress; }
.bouton-second { background: transparent; color: var(--encre); border-color: var(--encre); }
.bouton-second:hover { background: var(--encre); border-color: var(--encre); color: #fff; }
.bouton-petit { min-height: 44px; padding: 8px 18px; font-size: 1rem; }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--filet);
}
.entete .cadre { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; white-space: nowrap; }
.marque svg { flex: none; }
.menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.menu a { color: var(--texte); text-decoration: none; font-size: 1rem; font-weight: 600; padding: 10px 0; white-space: nowrap; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--bleu-fonce); text-decoration: underline; text-decoration-thickness: 2px; }
.entete-actions { display: flex; align-items: center; gap: 18px; }
.entete-tel { color: var(--encre); font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.menu-bouton { display: none; }

@media (max-width: 1080px) {
  .entete .cadre { gap: 12px; min-height: 64px; }
  .entete-tel { display: none; }
  .entete-actions { margin-left: auto; }
  .menu-bouton {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px;
    font: inherit; font-weight: 700; font-size: 1rem; color: var(--encre);
    background: #fff; border: 2px solid var(--encre); border-radius: var(--rayon); cursor: pointer;
  }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--filet); padding: 8px var(--marge) 18px;
    box-shadow: var(--ombre);
  }
  .menu.ouvert { display: flex; }
  .menu a { padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--filet); }
  .menu a:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
  .entete .cadre { padding: 0 14px; gap: 8px; }
  .marque { font-size: 1.05rem; gap: 7px; }
  .marque svg { width: 32px; height: 32px; }
  .entete-actions { gap: 8px; }
  .entete .bouton-petit { padding: 8px 10px; font-size: 0.95rem; }
  .menu-bouton { padding: 8px 9px; font-size: 0.95rem; }
}

/* Ouverture */
.ouverture { padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.ouverture .cadre { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.ouverture .chapeau { margin-top: 22px; max-width: 34em; }
.ouverture-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.planche { position: relative; padding: 0 0 34px 0; }
.planche .ecran { border: 1px solid var(--filet); border-radius: var(--rayon-image); box-shadow: var(--ombre); width: 100%; }
.planche .telephone {
  position: absolute; right: -10px; bottom: 0; width: 25%;
  border: 5px solid var(--encre); border-radius: 22px; box-shadow: var(--ombre); background: var(--encre);
}
.planche figcaption, .legende { font-size: 0.95rem; color: var(--discret); margin-top: 14px; max-width: 60ch; }
.planche figcaption { padding-right: 28%; }

@media (prefers-reduced-motion: no-preference) {
  .planche .ecran { animation: pose 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .planche .telephone { animation: pose 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes pose { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 900px) {
  .ouverture .cadre { grid-template-columns: 1fr; }
  .planche .telephone { right: 0; }
}

/* Ce qui est compris */
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.colle { position: sticky; top: 112px; }
.compris h3 { margin-top: 44px; padding-bottom: 12px; border-bottom: 2px solid var(--encre); font-size: 1.05rem; }
.compris h3:first-child { margin-top: 0; }
.compris dt { color: var(--encre); font-weight: 700; font-size: 1.2rem; margin-top: 24px; }
.compris dd { margin-top: 6px; max-width: 58ch; }
@media (max-width: 900px) {
  .deux-colonnes { grid-template-columns: 1fr; }
  .colle { position: static; }
}

/* Réalisations */
.realisation-une { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; margin-top: 52px; }
.realisation-paire { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); align-items: start; }
.realisation img { border: 1px solid var(--filet); border-radius: var(--rayon-image); box-shadow: var(--ombre); background: #fff; width: 100%; }
.realisation h3 { font-size: 1.45rem; margin-top: 22px; }
.realisation-une h3 { margin-top: 0; }
.realisation p { margin-top: 12px; }
.realisation .nature { color: var(--discret); font-size: 1rem; margin-top: 6px; }
.realisation .liens { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.realisation .liens a { font-weight: 700; }
.avertissement { margin-top: clamp(44px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--filet); color: var(--texte); max-width: 78ch; font-size: 1.05rem; }
@media (max-width: 900px) {
  .realisation-une, .realisation-paire { grid-template-columns: 1fr; }
  .realisation-une h3 { margin-top: 4px; }
}

/* Déroulement */
.etapes { width: 100%; border-collapse: collapse; margin-top: 44px; font-size: 1.05rem; }
.etapes caption { text-align: left; color: var(--discret); font-size: 1rem; padding-bottom: 14px; }
.etapes th, .etapes td { text-align: left; vertical-align: top; padding: 20px 24px 20px 0; }
.etapes thead th { font-size: 0.98rem; color: var(--encre); font-weight: 700; border-bottom: 2px solid var(--encre); padding-top: 0; padding-bottom: 12px; }
.etapes tbody tr + tr th, .etapes tbody tr + tr td { border-top: 1px solid var(--filet); }
.etapes tbody th { color: var(--encre); font-weight: 700; font-size: 1.15rem; width: 24%; }
.etapes tbody th span { display: block; color: var(--bleu-fonce); font-size: 0.98rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.etapes td { width: 25.33%; }
.etapes td:last-child { padding-right: 0; }
.apres-etapes { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) {
  .etapes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .etapes, .etapes tbody, .etapes tr, .etapes th, .etapes td { display: block; width: 100%; }
  .etapes tbody tr { padding: 22px 0; border-top: 1px solid var(--filet); }
  .etapes tbody tr:first-child { border-top: 2px solid var(--encre); }
  .etapes tbody tr + tr th, .etapes tbody tr + tr td { border-top: 0; }
  .etapes th, .etapes td, .etapes tbody th, .etapes td:last-child { padding: 0; width: 100%; }
  .etapes tbody th span { display: inline; margin-right: 8px; }
  .etapes td { margin-top: 12px; }
  .etapes td::before { content: attr(data-titre); display: block; font-size: 0.95rem; font-weight: 700; color: var(--encre); }
  .apres-etapes { grid-template-columns: 1fr; }
}

/* Espace de publication */
.publication { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.publication img { border: 1px solid var(--filet); border-radius: var(--rayon-image); box-shadow: var(--ombre); width: 100%; }
.liste-simple { margin-top: 20px; }
.liste-simple li { position: relative; padding: 9px 0 9px 22px; border-top: 1px solid var(--filet); }
.liste-simple li:first-child { border-top: 0; }
.liste-simple li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 8px; height: 8px; border-radius: 50%; background: var(--bleu); }
.suite-liens { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.suite-liens a:not(.bouton) { font-weight: 700; }
@media (max-width: 900px) { .publication { grid-template-columns: 1fr; } }

/* Ce que la commune garde, obligations */
.paires { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); }
.paires h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.fiches { margin-top: 26px; }
.fiches dt { color: var(--encre); font-weight: 700; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--filet); }
.fiches dt:first-child { margin-top: 0; }
.fiches dd { margin-top: 4px; }
@media (max-width: 860px) { .paires { grid-template-columns: 1fr; } }

/* Achat */
.achat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.achat p + p { margin-top: 16px; }
.achat h3 + p { margin-top: 12px; }
#tarifs .achat { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(36px, 4vw, 52px); border-top: 1px solid var(--filet); }

/* Prix */
.prix { width: 100%; border-collapse: collapse; margin-top: 40px; }
.prix caption { text-align: left; color: var(--discret); font-size: 1rem; padding-bottom: 12px; }
.prix th, .prix td { text-align: left; vertical-align: baseline; padding: 22px 0; border-top: 1px solid var(--filet); }
.prix tr:first-child th, .prix tr:first-child td { border-top: 2px solid var(--encre); }
.prix tr:last-child th, .prix tr:last-child td { border-bottom: 1px solid var(--filet); }
.prix th { font-weight: 400; font-size: 1.2rem; color: var(--encre); width: 46%; padding-right: 24px; }
.prix td strong { display: block; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.prix td span { display: block; margin-top: 4px; font-size: 1.05rem; }
.prix-note { margin-top: 14px; color: var(--discret); font-size: 0.98rem; }
.prix-compris { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); margin-top: clamp(40px, 5vw, 64px); }
.prix-action { margin-top: 36px; }
@media (max-width: 700px) {
  .prix, .prix tbody, .prix tr, .prix th, .prix td { display: block; width: 100%; }
  .prix caption { display: block; }
  .prix th { padding: 18px 0 2px; }
  .prix td, .prix tr:first-child td { border-top: 0; padding: 0 0 18px; }
  .prix tr:last-child th { border-bottom: 0; }
  .prix-compris { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .achat, #tarifs .achat { grid-template-columns: 1fr; } }

/* Interlocuteur */
.interlocuteur { max-width: 780px; }
.interlocuteur p { margin-top: 18px; font-size: 1.2rem; }
.interlocuteur .signature { font-weight: 700; color: var(--encre); margin-top: 26px; font-size: 1.1rem; }
.interlocuteur .signature span { display: block; font-weight: 400; color: var(--discret); font-size: 1rem; }

/* Questions */
.questions { margin-top: 40px; border-top: 2px solid var(--encre); max-width: 900px; }
.questions details { border-bottom: 1px solid var(--filet); }
.questions summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 22px 52px 22px 0; font-weight: 700; font-size: 1.2rem; color: var(--encre);
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--encre); border-bottom: 2px solid var(--encre);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.questions details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.questions summary:hover { color: var(--bleu-fonce); }
.questions .reponse { padding: 0 0 24px; max-width: 70ch; }
.questions .reponse p + p { margin-top: 12px; }

/* Rendez-vous */
.rendez-vous { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.coordonnees { margin-top: 28px; }
.coordonnees dt { font-size: 0.98rem; color: var(--discret); margin-top: 18px; }
.coordonnees dd { font-size: 1.3rem; font-weight: 700; color: var(--encre); }
.coordonnees dd a { color: inherit; }
.formulaire { background: #fff; border: 1px solid var(--filet); border-radius: var(--rayon-image); padding: clamp(22px, 3.5vw, 40px); box-shadow: var(--ombre); }
.formulaire .rang { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.champ { margin-bottom: 18px; }
.champ label { display: block; font-weight: 700; color: var(--encre); font-size: 1rem; margin-bottom: 6px; }
.champ .aide { display: block; font-weight: 400; color: var(--discret); font-size: 0.95rem; }
.champ input, .champ textarea, .champ select {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--encre);
  padding: 12px 14px; min-height: 52px; background: #fff;
  border: 2px solid #8794aa; border-radius: var(--rayon);
}
.champ textarea { min-height: 130px; resize: vertical; }
.champ input:focus, .champ textarea:focus, .champ select:focus { outline: 3px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }
.formulaire .bouton { width: 100%; }
.formulaire .note { font-size: 0.95rem; color: var(--discret); margin-top: 14px; }
.formulaire .etat { margin-top: 14px; font-weight: 700; color: var(--encre); }
.formulaire .etat:empty { display: none; }
.pot { position: absolute; left: -9999px; }
@media (max-width: 900px) { .rendez-vous { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .formulaire .rang { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Guides */
.guides { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.guides li { border-top: 2px solid var(--encre); padding-top: 16px; }
.guides a { font-weight: 700; font-size: 1.15rem; color: var(--encre); text-decoration: none; line-height: 1.3; display: block; }
.guides a:hover { color: var(--bleu-fonce); text-decoration: underline; }
.guides p { margin-top: 8px; font-size: 1rem; color: var(--texte); }
@media (max-width: 860px) { .guides { grid-template-columns: 1fr; } }

/* Pied de page */
.pied { background: var(--nuit); color: #c9d4e6; padding: clamp(48px, 6vw, 72px) 0 28px; font-size: 1rem; }
.pied a { color: #fff; }
.pied :focus-visible { outline-color: #fff; }
.pied-colonnes { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.pied .marque { color: #fff; }
.pied-colonnes p { margin-top: 14px; max-width: 34ch; }
.pied h2 { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: 12px; }
.pied li { padding: 5px 0; }
.pied li a { text-decoration: none; }
.pied li a:hover { text-decoration: underline; }
.pied-bas { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.18); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; font-size: 0.95rem; }
@media (max-width: 860px) { .pied-colonnes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied-colonnes { grid-template-columns: 1fr; } }

/* Pages intérieures */
.titre-page { padding: clamp(44px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); }
.fil-ariane { font-size: 0.98rem; color: var(--discret); margin-bottom: 18px; }
.fil-ariane ol { display: flex; flex-wrap: wrap; gap: 6px; }
.fil-ariane li + li::before { content: "/"; margin-right: 6px; color: var(--discret); }
.prose { max-width: 720px; padding-bottom: clamp(64px, 8vw, 104px); }
.prose h2 { font-size: 1.45rem; margin-top: 40px; }
.prose p { margin-top: 12px; }
.prose .date { color: var(--discret); margin-top: 36px; font-size: 1rem; }
.taches { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.taches div { padding: 22px 0; border-top: 1px solid var(--filet); }
.taches dt { color: var(--encre); font-weight: 700; font-size: 1.2rem; }
.taches dd { margin-top: 6px; }
@media (max-width: 760px) { .taches { grid-template-columns: 1fr; } }
.appel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.appel p { margin-top: 10px; max-width: 52ch; }
.introuvable { padding: clamp(72px, 12vw, 150px) 0; }
.introuvable p { margin-top: 18px; max-width: 52ch; }
.introuvable ul { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }

.court { display: none; }
@media (max-width: 520px) {
  .entete .long { display: none; }
  .entete .court { display: inline; }
}
