/* Balise Web — feuille de style
   Palette inspirée des bouées de navigation du fleuve Saint-Laurent. */
:root {
  --fleuve: #0f2e36;
  --fleuve-2: #17414b;
  --glace: #f2f5f4;
  --blanc: #ffffff;
  --rouge: #c8372d;
  --rouge-fonce: #a92a22;
  --vert: #23704a;
  --ardoise: #56676c;
  --ligne: #d3dcda;
  --texte: #14262b;

  --police: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --large: 118;
  --etroit: 100;

  --t-0: 0.875rem;
  --t-1: 1rem;
  --t-2: 1.125rem;
  --t-3: 1.375rem;
  --t-4: clamp(1.75rem, 1.2rem + 1.8vw, 2.375rem);
  --t-5: clamp(2.4rem, 1.4rem + 4vw, 4.25rem);

  --rayon: 6px;
  --mesure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--police);
  font-variation-settings: "wdth" var(--etroit);
  font-size: var(--t-1);
  line-height: 1.6;
  color: var(--texte);
  background: var(--blanc);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 760; font-variation-settings: "wdth" var(--large); letter-spacing: -0.01em; }
h1 { font-size: var(--t-5); max-width: 15ch; }
h2 { font-size: var(--t-4); max-width: 22ch; }
h3 { font-size: var(--t-2); font-weight: 700; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; border-radius: 2px; }

.evitement { position: absolute; left: -999px; top: 0; background: var(--fleuve); color: var(--blanc); padding: .75rem 1rem; z-index: 100; }
.evitement:focus { left: 1rem; }

.conteneur { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.conteneur-etroit { width: min(780px, 100% - 2.5rem); }

/* Boutons et liens */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.4rem;
  font: inherit; font-weight: 650; font-variation-settings: "wdth" 108;
  color: var(--blanc); background: var(--rouge);
  border: 0; border-radius: var(--rayon); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.bouton:hover { background: var(--rouge-fonce); }
.bouton-petit { min-height: 40px; padding: .5rem 1rem; font-size: var(--t-0); }
.bouton-secondaire { background: var(--fleuve); }
.bouton-secondaire:hover { background: var(--fleuve-2); }
.bouton[disabled] { opacity: .6; cursor: progress; }
.lien-fort {
  font: inherit; font-weight: 600; color: var(--fleuve);
  background: none; border: 0; padding: .5rem 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--rouge);
}

/* En-tête */
.entete { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.entete-rangee { display: flex; align-items: center; gap: 2rem; min-height: 68px; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; font-size: 1.3rem; font-variation-settings: "wdth" 100; letter-spacing: -0.02em; color: var(--fleuve); }
.logo-bouee { width: 36px; height: 33px; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: var(--t-0); font-weight: 560; color: var(--ardoise); }
.nav a:hover { color: var(--fleuve); }
@media (max-width: 760px) { .nav { display: none; } .entete-rangee .bouton { margin-left: auto; } }

/* Accueil */
.accueil { background: var(--glace); padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6.5rem); border-bottom: 1px solid var(--ligne); }
.accueil-grille { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.accueil h1 { color: var(--fleuve); }
.chapeau { margin-top: 1.4rem; font-size: var(--t-2); color: var(--ardoise); max-width: 52ch; }
.accueil-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.accueil-note { margin-top: 2.2rem; padding-left: .9rem; border-left: 3px solid var(--vert); font-weight: 600; color: var(--fleuve); }
@media (max-width: 880px) { .accueil-grille { grid-template-columns: 1fr; } }

/* Démo du calculateur */
.demo { margin: 0; }
.demo-legende { font-size: var(--t-0); color: var(--ardoise); margin-bottom: .7rem; }
.demo-carte {
  background: var(--blanc); border: 1px solid var(--ligne); border-top: 6px solid var(--fleuve);
  border-radius: var(--rayon); padding: 1.5rem 1.5rem 1.4rem;
  box-shadow: 0 18px 40px -24px rgba(15, 46, 54, .45);
}
.demo-entreprise { font-weight: 760; font-variation-settings: "wdth" 120; color: var(--fleuve); }
.demo-produit { font-size: var(--t-0); color: var(--ardoise); margin-bottom: 1.2rem; }
.demo-champ { display: flex; justify-content: space-between; font-size: var(--t-0); font-weight: 600; }
.demo-champ output { font-variant-numeric: tabular-nums; color: var(--fleuve); }
.demo input[type="range"] { width: 100%; margin: .6rem 0 1rem; accent-color: var(--rouge); height: 28px; }
.demo-rangee { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-top: 1px solid var(--ligne); font-size: var(--t-0); font-weight: 600; }
.demo-rangee select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--ligne); border-radius: 4px; background: var(--blanc); min-width: 4.5rem; }
.demo-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .6rem; padding-top: 1rem; border-top: 2px solid var(--fleuve); }
.demo-total span { font-size: var(--t-0); color: var(--ardoise); }
.demo-total strong { white-space: nowrap; font-size: 2rem; font-weight: 780; font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; color: var(--fleuve); }
.demo-bouton { display: block; margin-top: 1rem; padding: .7rem; text-align: center; border-radius: var(--rayon); background: var(--vert); color: var(--blanc); font-weight: 650; font-size: var(--t-0); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-glace { background: var(--glace); }
.section-fleuve { background: var(--fleuve); color: var(--glace); }
.intro { margin-top: .9rem; font-size: var(--t-2); color: var(--ardoise); max-width: 56ch; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); margin: 2.8rem 0 0; }
.service { padding: 1.4rem 0; border-top: 1px solid var(--ligne); }
.service dt { font-weight: 720; font-size: var(--t-2); font-variation-settings: "wdth" 112; color: var(--fleuve); }
.service dd { margin: .45rem 0 0; color: var(--ardoise); max-width: 50ch; }
.service-vedette { border-top: 3px solid var(--rouge); }
@media (max-width: 720px) { .services { grid-template-columns: 1fr; } }

/* Engagements */
.engagements { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); }
.engagements h2 { color: var(--blanc); }
.engagements-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.engagements-liste li { color: #c4d3d1; max-width: 60ch; padding-left: 1.2rem; border-left: 2px solid #3d6670; }
.engagements-liste strong { display: block; color: var(--blanc); font-size: var(--t-2); font-variation-settings: "wdth" 110; margin-bottom: .2rem; }
@media (max-width: 820px) { .engagements { grid-template-columns: 1fr; } }

/* Configurateur */
.config { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; margin-top: 2.5rem; }
@media (max-width: 900px) { .config { grid-template-columns: 1fr; } }
.etape { display: grid; gap: 1.6rem; }
.etape[hidden] { display: none; }
.groupe { margin: 0; padding: 0; border: 0; display: grid; gap: .6rem; }
.groupe[hidden] { display: none; }
.groupe legend { font-weight: 760; font-size: var(--t-3); font-variation-settings: "wdth" 115; color: var(--fleuve); margin-bottom: .8rem; padding: 0; }
.choix {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: .95rem 1rem; border: 1px solid var(--ligne); border-radius: var(--rayon);
  background: var(--blanc); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.choix:hover { border-color: #9fb1ae; }
.choix:has(input:checked) { border-color: var(--fleuve); background: #f5f8f8; box-shadow: inset 4px 0 0 var(--fleuve); }
.choix input { margin: .2rem 0 0; width: 20px; height: 20px; flex: none; accent-color: var(--fleuve); }
.choix b { display: block; font-weight: 650; }
.choix small { display: block; color: var(--ardoise); font-size: var(--t-0); margin-top: .15rem; }
.choix-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 560px) { .choix-ligne { grid-template-columns: 1fr; } }
.sous-options { display: grid; gap: .6rem; margin-left: 1.4rem; padding-left: 1rem; border-left: 2px solid var(--ligne); }
.sous-options[hidden], .quantite[hidden] { display: none; }
.quantite { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem 1rem; padding: .7rem 1rem; background: var(--glace); border-radius: var(--rayon); }
.quantite label { font-weight: 600; font-size: var(--t-0); }
.quantite label small { font-weight: 400; color: var(--ardoise); }
.quantite input { width: 6.5rem; font: inherit; font-variant-numeric: tabular-nums; padding: .5rem .6rem; border: 1px solid #b8c6c3; border-radius: 4px; text-align: right; background: var(--blanc); }
.quantite .aide { grid-column: 1 / -1; color: var(--ardoise); font-size: .8rem; }

.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.champ { display: grid; gap: .35rem; }
.champ-large { grid-column: 1 / -1; }
.champ label { font-weight: 600; font-size: var(--t-0); }
.champ label small { font-weight: 400; color: var(--ardoise); }
.champ input, .champ select, .champ textarea {
  font: inherit; padding: .7rem .8rem; border: 1px solid #b8c6c3; border-radius: var(--rayon); background: var(--blanc); width: 100%;
}
.champ [aria-invalid="true"] { border-color: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }
@media (max-width: 600px) { .champs { grid-template-columns: 1fr; } }
.consentement { display: flex; gap: .8rem; align-items: flex-start; margin-top: .6rem; font-size: var(--t-0); color: var(--ardoise); cursor: pointer; }
.consentement input { width: 20px; height: 20px; margin-top: .1rem; flex: none; accent-color: var(--fleuve); }
.erreur { color: var(--rouge-fonce); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }

/* Bordereau */
.bordereau {
  position: sticky; top: 90px;
  background: var(--glace); border-radius: var(--rayon); padding: 1.5rem;
  border-top: 6px solid var(--rouge);
}
.bordereau h3 { font-size: var(--t-3); color: var(--fleuve); margin-bottom: 1rem; }
.bordereau-lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; font-size: var(--t-0); }
.bordereau-lignes li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; }
.bordereau-lignes .montant { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bordereau-lignes .detail { display: block; color: var(--ardoise); font-size: .8rem; }
.bordereau-lignes .vide { display: block; color: var(--ardoise); }
.bordereau-totaux { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--ligne); display: grid; gap: .35rem; font-size: var(--t-0); }
.bordereau-totaux div { display: flex; justify-content: space-between; }
.bordereau-totaux dt { color: var(--ardoise); }
.bordereau-totaux dd { margin: 0; font-variant-numeric: tabular-nums; }
.bordereau-totaux .grand-total { margin-top: .5rem; padding-top: .7rem; border-top: 2px solid var(--fleuve); align-items: baseline; }
.grand-total dt { color: var(--fleuve); font-weight: 700; font-size: var(--t-1); }
.grand-total dd { white-space: nowrap; font-size: 1.9rem; font-weight: 780; font-variation-settings: "wdth" 112; color: var(--fleuve); }
.bordereau-note { margin-top: 1rem; font-size: .8rem; color: var(--ardoise); }
@media (max-width: 900px) { .bordereau { position: static; order: -1; } }

/* Document de soumission */
.document { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: clamp(1.25rem, 3vw, 2.25rem); }
.doc-entete { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.2rem; border-bottom: 2px solid var(--fleuve); }
.doc-entete h3 { font-size: var(--t-3); color: var(--fleuve); }
.doc-meta { font-size: var(--t-0); color: var(--ardoise); text-align: right; }
.doc-meta b { color: var(--texte); }
.doc-client { margin: 1.2rem 0; font-size: var(--t-0); }
.doc-client b { display: block; font-size: var(--t-1); }
.doc-table { width: 100%; border-collapse: collapse; font-size: var(--t-0); }
.doc-table th { text-align: left; font-weight: 650; color: var(--ardoise); padding: .5rem 0; border-bottom: 1px solid var(--ligne); }
.doc-table td { padding: .6rem 0; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.doc-table td:last-child, .doc-table th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 1rem; }
.doc-table .detail { display: block; color: var(--ardoise); font-size: .8rem; }
.doc-table tfoot td { border: 0; padding: .3rem 0; }
.doc-table tfoot .grand td { padding-top: .7rem; border-top: 2px solid var(--fleuve); font-weight: 780; font-size: var(--t-3); color: var(--fleuve); }
.doc-mentions { margin-top: 1.4rem; padding: 1rem 1.2rem; background: var(--glace); border-radius: var(--rayon); font-size: .85rem; color: var(--ardoise); display: grid; gap: .5rem; }

/* Confirmation */
.confirmation { text-align: left; padding: 2rem; border: 1px solid var(--ligne); border-left: 6px solid var(--vert); border-radius: var(--rayon); display: grid; gap: 1rem; justify-items: start; }
.confirmation-bouee { width: 30px; }
.confirmation h3 { font-size: var(--t-4); color: var(--fleuve); }
.confirmation p { max-width: 58ch; }

/* Démarche */
.demarche { list-style: none; counter-reset: etape; margin: 2.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.demarche li { counter-increment: etape; padding-top: 1.1rem; border-top: 3px solid var(--fleuve); }
.demarche li::before { content: counter(etape); display: block; font-size: 2.4rem; font-weight: 780; font-variation-settings: "wdth" 125; color: var(--rouge); line-height: 1; margin-bottom: .8rem; }
.demarche p { margin-top: .5rem; color: var(--ardoise); font-size: var(--t-0); }
@media (max-width: 900px) { .demarche { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .demarche { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 2.2rem; border-top: 1px solid var(--ligne); }
.faq details { border-bottom: 1px solid var(--ligne); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 650; font-size: var(--t-2); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--fleuve); border-bottom: 2px solid var(--fleuve); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 1.3rem; color: var(--ardoise); max-width: var(--mesure); }

/* Contact */
.contact { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.contact h2 { color: var(--blanc); }
.contact p { margin-top: .9rem; color: #c4d3d1; max-width: 48ch; }
.contact-courriel { font-size: clamp(1.4rem, 1rem + 2vw, 2.4rem); font-weight: 760; font-variation-settings: "wdth" 120; color: var(--blanc); text-decoration: underline; text-decoration-color: var(--rouge); text-decoration-thickness: 3px; text-underline-offset: 8px; overflow-wrap: anywhere; }

/* Pied de page */
.pied { background: #0a2228; color: #9fb4b2; font-size: var(--t-0); padding: 1.6rem 0; }
.pied-rangee { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Page politique */
.page-texte { padding: clamp(3rem, 6vw, 5rem) 0; }
.page-texte h1 { font-size: var(--t-4); max-width: none; color: var(--fleuve); }
.page-texte h2 { font-size: var(--t-3); margin-top: 2.2rem; color: var(--fleuve); max-width: none; }
.page-texte p, .page-texte li { max-width: var(--mesure); margin-top: .8rem; color: var(--texte); }
.page-texte ul { padding-left: 1.2rem; }
.page-texte .maj { color: var(--ardoise); font-size: var(--t-0); margin-top: .6rem; }

/* Impression de la soumission */
@media print {
  body * { visibility: hidden; }
  #document-soumission, #document-soumission * { visibility: visible; }
  #document-soumission { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; padding: 0; }
  #etape-revision[hidden] { display: block !important; }
}
