/* DTG — feuille de style du site.
   Mise en page : papier de plan clair, texte aligné à gauche, encadrés inspirés du cartouche ;
   une seule bande marine pour le formulaire. Une seule apparence (claire), choisie délibérément. */

@font-face {
  font-family: "Archivo DTG";
  src: url("assets/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif DTG";
  src: url("assets/source-serif.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --papier: #F2F4F6;      /* papier de plan, légèrement bleuté */
  --papier-2: #E6EAF0;    /* bandes et emplacements */
  --blanc: #FBFCFD;       /* champs du formulaire */
  --encre: #16243B;       /* texte courant */
  --gris: #48566C;        /* texte secondaire */
  --marine: #14294B;      /* couleur de la marque */
  --marine-fonce: #0D1C35;
  --or: #C6A052;          /* or de la marque : traits, repères, sur marine */
  --or-texte: #8A6820;    /* or lisible sur papier */
  --trait: #A9B4C3;       /* lignes de contexte */
  --erreur: #A32630;
  --erreur-sur-marine: #F2B8B0;

  --f-titre: "Archivo DTG", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-texte: "Source Serif DTG", Georgia, "Times New Roman", serif;

  --t-1: clamp(2.15rem, 1.4rem + 3.2vw, 3.55rem);
  --t-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --t-3: 1.2rem;
  --t-texte: 1.125rem;
  --t-petit: 0.95rem;
  --t-mini: 0.84rem;

  --gouttiere: max(16px, env(safe-area-inset-left, 0px));
  --gouttiere-d: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: var(--t-texte);
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--f-titre);
  color: var(--marine);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-1); font-weight: 650; font-stretch: 78%; letter-spacing: -0.01em; }
h2 { font-size: var(--t-2); font-weight: 620; font-stretch: 82%; }
h3 { font-size: var(--t-3); font-weight: 620; font-stretch: 88%; line-height: 1.2; }
p { margin: 0; }
a { color: var(--marine); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

.enveloppe {
  max-width: 72rem;
  margin-inline: auto;
  padding-left: var(--gouttiere);
  padding-right: var(--gouttiere-d);
}
.texte { max-width: 38rem; display: grid; gap: 1rem; }

.evitement {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--marine); color: var(--papier);
  padding: 0.6rem 1rem; z-index: 20; font-family: var(--f-titre);
}
.evitement:focus { top: 1rem; }

/* En-tête */
.entete { border-bottom: 1px solid var(--trait); }
.entete-rang {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1rem;
}
.marque { display: block; flex: 0 1 254px; min-width: 0; }
.marque img { width: 100%; max-width: 254px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.bouton) {
  font-family: var(--f-titre); font-stretch: 88%; font-size: var(--t-petit);
  color: var(--encre); text-decoration: none;
}
.nav a:not(.bouton):hover { color: var(--marine); text-decoration: underline; }
@media (max-width: 52rem) { .nav-secondaire { display: none; } }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-titre); font-weight: 600; font-stretch: 88%; font-size: 1rem;
  background: var(--marine); color: var(--papier);
  border: 1px solid var(--marine); border-radius: 2px;
  padding: 0.8rem 1.35rem; text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease;
}
.bouton:hover { background: var(--marine-fonce); text-decoration: none; }
.bouton-petit { padding: 0.55rem 0.95rem; font-size: var(--t-petit); white-space: nowrap; }
.bouton-plein { width: 100%; padding-block: 0.95rem; }
.bouton[disabled] { opacity: 0.7; cursor: progress; }

/* Accueil */
.accueil { padding-block: clamp(2.5rem, 6vw, 5rem); }
.accueil-grille {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 56rem) { .accueil-grille { grid-template-columns: minmax(0, 1fr); } }
.accueil-texte { display: grid; gap: 1.4rem; max-width: 36rem; }
.chapeau { font-size: 1.2rem; color: var(--encre); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; padding-top: 0.4rem; }
.lien-discret { font-family: var(--f-titre); font-stretch: 88%; font-size: 1rem; }

/* Feuille : dessin + cartouche */
.feuille {
  margin: 0; background: var(--blanc);
  border: 1.5px solid var(--marine);
  display: grid; max-width: 100%;
}
.feuille-dessin { padding: 0.6rem; }
.plan { display: block; width: 100%; height: auto; }
.plan .ctx { fill: none; stroke: var(--trait); stroke-width: 1.1; }
.plan .off { fill: none; stroke: var(--marine); stroke-width: 2.4; stroke-linejoin: round; }
.plan text {
  font-family: var(--f-titre); font-stretch: 85%; fill: var(--encre);
  text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums lining-nums;
}
.plan .mes { font-size: 10.5px; }
.plan .sup { font-size: 12.5px; font-weight: 600; fill: var(--marine); }
.plan .rue { font-size: 11px; letter-spacing: 0.35em; fill: var(--gris); }
.plan .nord path { fill: var(--or); }
.plan .nord text { font-size: 13px; font-weight: 700; fill: var(--marine); }
.cartouche {
  display: grid; grid-template-columns: 1.1fr 1.4fr 1fr;
  font-family: var(--f-titre); font-stretch: 85%; font-size: var(--t-mini); color: var(--gris);
}
.cartouche span { padding: 0.5rem 0.7rem; min-width: 0; }
.cartouche span + span { border-left: 1px solid var(--marine); }
.cartouche span:first-child { color: var(--marine); font-weight: 600; }
.chiffres { font-variant-numeric: tabular-nums lining-nums; }
@media (max-width: 26rem) {
  .cartouche { grid-template-columns: 1fr 1fr; }
  .cartouche span:nth-child(2) { display: none; }
  .cartouche span:last-child { border-left: 1px solid var(--marine); }
}

/* Tracé à l'ouverture : le seul mouvement de la page */
@media (prefers-reduced-motion: no-preference) {
  .plan .off { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 1.5s 0.2s ease-out forwards; }
  .plan .etiquettes, .plan .nord { opacity: 0; animation: apparait 0.5s 1.4s ease-out forwards; }
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes apparait { to { opacity: 1; } }

/* Sections */
.bloc { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--trait); }
.bloc-teinte { background: var(--papier-2); }
.deux-colonnes {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 56rem) { .deux-colonnes { grid-template-columns: minmax(0, 1fr); } }

/* Encadrés façon cartouche */
.encadres { display: grid; gap: 1.25rem; }
.encadre { border: 1.5px solid var(--marine); background: var(--blanc); }
.encadre-titre {
  font-size: var(--t-petit); font-stretch: 85%; font-weight: 600;
  background: var(--marine); color: var(--papier);
  padding: 0.5rem 0.9rem;
}
.encadre > p, .encadre > ul { padding: 0.9rem; }
.encadre-clair { background: transparent; }
.encadre-clair .encadre-titre { background: transparent; color: var(--marine); border-bottom: 1px solid var(--marine); }
.liste-repere { list-style: none; margin: 0; display: grid; gap: 0.7rem; }
.liste-repere li { padding-left: 1.5rem; position: relative; font-size: 1.05rem; }
.liste-repere li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.55em;
  width: 0.55rem; height: 0.55rem; border: 2px solid var(--or); border-radius: 50%;
}

/* Engagements */
.engagements {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  display: grid; gap: 2rem clamp(1.5rem, 3vw, 2.75rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 56rem) { .engagements { grid-template-columns: minmax(0, 1fr); max-width: 38rem; } }
.engagements li { display: grid; gap: 0.7rem; align-content: start; border-top: 1.5px solid var(--marine); padding-top: 1.1rem; }
.engagements p { font-size: 1.05rem; }
.repere { width: 26px; height: 26px; fill: none; stroke: var(--or-texte); stroke-width: 1.6; }
.repere-grand { width: 40px; height: 40px; stroke: var(--or); }

/* Exemples */
.exemples {
  margin-top: 2.25rem;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 56rem) { .exemples { grid-template-columns: minmax(0, 1fr); max-width: 30rem; } }
.exemple { margin: 0; display: grid; gap: 0.6rem; }
.exemple img, .exemple-vide { aspect-ratio: 4 / 3; width: 100%; max-width: 100%; border: 1px solid var(--marine); background: var(--blanc); object-fit: cover; }
.exemple-vide {
  display: grid; place-items: center;
  font-family: var(--f-titre); font-stretch: 85%; color: var(--gris); font-size: var(--t-petit);
  background-color: var(--papier-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 9px, var(--trait) 9px 10px);
}
.exemple figcaption { font-family: var(--f-titre); font-stretch: 88%; font-size: var(--t-petit); color: var(--gris); }

/* Formulaire */
.bloc-marine { background: var(--marine); color: var(--papier); border-top: none; }
.bloc-marine h2 { color: var(--papier); }
.bloc-marine a { color: var(--papier); }
.bloc-marine .note { color: #C9D2E0; font-size: 1rem; }
.deux-colonnes-formulaire { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 56rem) { .deux-colonnes-formulaire { grid-template-columns: minmax(0, 1fr); } }
.courriel { overflow-wrap: anywhere; font-family: var(--f-titre); font-stretch: 90%; }
.formulaire-zone { background: var(--papier); color: var(--encre); padding: clamp(1.25rem, 3vw, 2rem); border-top: 4px solid var(--or); min-width: 0; }
.formulaire-zone a { color: var(--marine); }
.formulaire { display: grid; gap: 1.1rem; }
.champ { display: grid; gap: 0.35rem; min-width: 0; }
.champ-rang { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 34rem) { .champ-rang { grid-template-columns: minmax(0, 1fr); } }
label { font-family: var(--f-titre); font-weight: 600; font-stretch: 88%; font-size: 1rem; color: var(--marine); }
.facultatif { font-weight: 400; color: var(--gris); }
input, select, textarea {
  font: inherit; font-size: 1.05rem; color: var(--encre);
  background: var(--blanc); border: 1px solid #7F8CA0; border-radius: 2px;
  padding: 0.65rem 0.75rem; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--marine) 50%), linear-gradient(135deg, var(--marine) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--or); outline-offset: 1px; border-color: var(--marine); }
[aria-invalid="true"] { border-color: var(--erreur); border-width: 2px; }
.aide { font-size: var(--t-mini); color: var(--gris); font-family: var(--f-titre); font-stretch: 90%; }
.erreur, .erreur-envoi { color: var(--erreur); font-family: var(--f-titre); font-stretch: 90%; font-size: var(--t-petit); font-weight: 600; }
.sommaire-erreurs { border: 2px solid var(--erreur); padding: 0.75rem 0.9rem; color: var(--erreur); font-family: var(--f-titre); font-stretch: 90%; font-size: var(--t-petit); }
.sommaire-erreurs ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.sommaire-erreurs a { color: var(--erreur); }
.mention { font-size: var(--t-mini); color: var(--gris); font-family: var(--f-titre); font-stretch: 90%; }
.piege { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.confirmation { display: grid; gap: 0.8rem; justify-items: start; }
.confirmation h3 { font-size: var(--t-2); }
.confirmation .note { color: var(--gris); font-size: 1rem; }
.confirmation:focus { outline: none; }

/* Pied de page */
.pied { background: var(--marine-fonce); color: #C9D2E0; font-size: var(--t-petit); }
.pied a { color: var(--papier); }
.pied-grille {
  display: grid; gap: 1.5rem 3rem; padding-block: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 40rem) { .pied-grille { grid-template-columns: minmax(0, 1fr); } }
.pied-grille p + p { margin-top: 0.4rem; }
.pied-nom { font-family: var(--f-titre); font-weight: 600; font-stretch: 88%; color: var(--papier); }
.pied-mention { grid-column: 1 / -1; border-top: 1px solid #2B3D5E; padding-top: 1.25rem; font-size: var(--t-mini); max-width: 48rem; }

/* Page de politique */
.page-simple { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-simple .texte { max-width: 42rem; gap: 1.1rem; }
.page-simple h1 { font-size: var(--t-2); }
.page-simple h2 { font-size: 1.3rem; margin-top: 1rem; }
.page-simple ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.date-maj { color: var(--gris); font-family: var(--f-titre); font-stretch: 90%; font-size: var(--t-petit); }

/* Avantages : six cartes */
@media (min-width: 56.01rem) { .engagements-six { row-gap: 2.75rem; } }

/* Sceau « Développé au Québec » */
.sceau {
  display: inline-flex; align-items: center; gap: 0.8rem; justify-self: start;
  border: 1.5px solid var(--or); border-radius: 2px; padding: 0.55rem 0.95rem 0.55rem 0.7rem;
  background: var(--blanc);
  font-family: var(--f-titre); font-stretch: 88%; font-size: var(--t-mini); color: var(--gris); line-height: 1.3;
}
.sceau svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--marine); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sceau svg path:first-child { fill: var(--or); stroke: var(--or-texte); }
.sceau strong { display: block; color: var(--marine); font-size: var(--t-petit); font-weight: 650; letter-spacing: 0.02em; }
