/* Construction Rénovation Portneuf — feuille de style unique, mobile d'abord. */

/* ---------- Polices (SIL OFL 1.1, voir assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Jetons ---------- */
:root {
  --rouge: #D8292F;
  --noir: #231F20;
  --blanc: #FFFFFF;
  --gris-100: #F3F2F1;
  --gris-300: #D6D3D2;
  --gris-texte: #5E5859;
  --gris-sur-noir: #BDB8B8;

  --f-titre: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-texte: "Barlow", Arial, sans-serif;

  --h1: clamp(3.25rem, 2rem + 5vw, 6rem);
  --h2: clamp(2.5rem, 1.75rem + 3vw, 4rem);
  --h3: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  --tel: clamp(3rem, 1.75rem + 5vw, 5.25rem);

  --espace-section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --bande-fixe-h: 3.5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--f-texte);
  font-size: 1.125rem;
  line-height: 1.55;
  padding-bottom: var(--bande-fixe-h);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.15em; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }
.noir :focus-visible, .bande :focus-visible, .bande-fixe :focus-visible, .pied :focus-visible {
  outline-color: var(--blanc);
}
.conteneur { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.sans-coupure { white-space: nowrap; }

/* Marqueurs [À CONFIRMER] : temporaires, aucun ne doit rester à la mise en ligne. */
.marqueur {
  font-style: italic;
  font-weight: 400;
  outline: 1px dashed currentColor;
  outline-offset: 2px;
  padding: 0 0.25rem;
}

.lien-evitement {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--blanc);
  color: var(--noir);
  font-weight: 600;
}
.lien-evitement:focus { top: 1rem; }

/* ---------- Bouton ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.5rem;
  border: 0;
  background: var(--rouge);
  color: var(--blanc);
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--noir); }
.noir .btn:hover { background: var(--blanc); color: var(--noir); }

/* ---------- En-tête et héros ---------- */
.noir { background: var(--noir); color: var(--blanc); }
.nav-bureau { display: none; }
.heros { padding: 2rem 0 2.5rem; text-align: center; }
.heros-logo { width: min(16rem, 100%); margin: 0 auto 1.75rem; }
.heros h1 {
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: var(--h1);
  line-height: 0.95;
  margin: 0 0 1rem;
}
.ligne-services { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin: 0 0 0.75rem; }
.puce { color: var(--rouge); padding-inline: 0.15em; }
.territoire { margin: 0 0 1.75rem; color: var(--gris-sur-noir); font-size: 1rem; }
.rbq { margin: 1rem 0 0; color: var(--gris-sur-noir); font-size: 0.9375rem; }

@media (min-width: 60rem) {
  .nav-bureau { display: flex; justify-content: flex-end; align-items: center; gap: 2rem; padding-top: 1.25rem; }
  .nav-bureau a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
  .nav-bureau a:not(.btn):hover { text-decoration: underline; }
  .nav-bureau .btn { font-size: 1.125rem; min-height: 2.75rem; }
  .heros {
    display: grid;
    grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
    gap: 4rem;
    align-items: center;
    text-align: left;
    padding: 1.5rem 0 4rem;
  }
  .heros-logo { width: 100%; margin: 0; }
  .ligne-services { font-size: 1.5rem; }
}

/* ---------- Élément mémorable : la bande rouge des numéros ---------- */
.bande { background: var(--rouge); color: var(--blanc); }
.bande-numeros {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 1rem 0 1.25rem;
}
.bande-numeros a { display: block; padding: 0.25rem 0.75rem; text-align: center; text-decoration: none; }
.bande-numeros a:hover .num { text-decoration: underline; text-decoration-thickness: 0.06em; }
.num {
  display: block;
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: var(--tel);
  line-height: 1;
  white-space: nowrap;
}
.role { display: block; font-size: 0.875rem; margin-top: 0.25rem; }
.sep { display: none; }
@media (min-width: 48rem) {
  .bande-numeros { flex-direction: row; justify-content: center; align-items: flex-start; gap: 1rem; }
  .sep { display: block; font-family: var(--f-titre); font-weight: 700; font-size: var(--tel); line-height: 1; padding-top: 0.25rem; }
}

/* Version compacte fixée au bas de l'écran, cellulaire seulement.
   Sans JavaScript, elle reste visible ; avec, main.js l'affiche une fois la grande bande dépassée. */
.bande-fixe {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--rouge);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, visibility 0.2s;
}
.bande-fixe a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bande-fixe-h);
  color: var(--blanc);
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  white-space: nowrap;
}
.bande-fixe a + a { border-left: 1px solid rgba(255, 255, 255, 0.55); }
.js .bande-fixe:not(.visible) { transform: translateY(100%); visibility: hidden; }
@media (min-width: 60rem) {
  .bande-fixe { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: var(--espace-section) 0; }
.gris { background: var(--gris-100); }
.section h2 {
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: var(--h2);
  line-height: 1;
  margin: 0 0 2rem;
}

/* Services : liste typographique */
.liste-services { list-style: none; margin: 0; padding: 0; border-bottom: 3px solid var(--noir); }
.liste-services li { border-top: 3px solid var(--noir); padding: 1.25rem 0 1.5rem; }
.liste-services h3 {
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: var(--h3);
  line-height: 1;
  margin: 0 0 0.75rem;
}
.liste-services p { margin: 0; max-width: 40ch; }
@media (min-width: 48rem) {
  .liste-services li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: baseline; }
  .liste-services h3 { margin: 0; }
}

/* Licence et garanties */
.grille-preuves { display: grid; gap: 2.5rem; }
.preuve p { margin: 0.75rem 0 0; font-size: 1rem; }
.preuve .rbq-num {
  margin: 0;
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.5rem + 2vw, 3rem);
  line-height: 1;
}
@media (min-width: 48rem) {
  .grille-preuves { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .preuve { padding: 0 2rem; }
  .preuve:first-child { padding-left: 0; }
  .preuve:last-child { padding-right: 0; }
  .preuve + .preuve { border-left: 1px solid var(--gris-300); }
  .preuve .rbq-num { display: flex; align-items: center; aspect-ratio: 3 / 2; }
}

/* Espaces réservés (logos et photos à venir) */
.reserve {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 1rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: #4A4546;
  background: repeating-linear-gradient(135deg, var(--blanc) 0 10px, #E9E7E6 10px 20px);
  border: 2px dashed #8C8687;
}
.reserve-photo { aspect-ratio: 4 / 3; }

/* Réalisations */
.grille-realisations { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 48rem) {
  .grille-realisations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Territoire */
.territoire-section { padding-top: 0; }

/* ---------- Formulaire ---------- */
.estimation { background: var(--gris-100); }
.grille-estimation { display: grid; gap: 2rem; }
@media (min-width: 60rem) {
  .grille-estimation { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4rem; align-items: start; }
}
.estimation-numeros { display: flex; flex-direction: column; gap: 0.25rem; }
.estimation-numeros a {
  font-family: var(--f-titre);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}
.estimation-numeros a:hover { text-decoration: underline; }

.formulaire { position: relative; background: var(--blanc); padding: 1.5rem 1rem; }
@media (min-width: 48rem) { .formulaire { padding: 2rem; } }
.note-obligatoire { font-size: 0.9375rem; color: var(--gris-texte); }
.champ { margin: 0 0 1.25rem; }
.champ > label, .choix legend { display: block; font-weight: 600; margin-bottom: 0.375rem; }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--gris-texte);
  border-radius: 0;
  background: var(--blanc);
  color: var(--noir);
  font: inherit;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--noir); }
.choix { border: 0; padding: 0; min-width: 0; }
.choix label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  cursor: pointer;
}
.choix input { width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--rouge); flex: none; }
.formulaire .btn { width: 100%; margin-top: 0.5rem; }
@media (min-width: 48rem) { .formulaire .btn { width: auto; } }
.message-formulaire { margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-left: 4px solid var(--noir); background: var(--gris-100); font-weight: 600; }
.message-formulaire.erreur { border-left-color: var(--rouge); }
.message-formulaire:focus { outline: none; }
.message-formulaire:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }
.erreur-champ { margin: 0.375rem 0 0; color: var(--rouge); font-weight: 600; font-size: 1rem; }
[aria-invalid="true"]:not(fieldset) { border-color: var(--rouge); }
/* Champ piège : hors écran, pas display:none (certains robots l'ignorent alors). */
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn:disabled { opacity: 0.7; cursor: progress; }
.avis-collecte { margin: 1.5rem 0 0; font-size: 0.9375rem; color: var(--gris-texte); }

/* ---------- Pied de page ---------- */
.pied { background: var(--noir); color: var(--blanc); padding: 3rem 0 2rem; font-size: 1rem; }
.grille-pied { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .grille-pied { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.pied a { display: inline-block; min-height: 44px; line-height: 44px; }
.pied-nom { font-family: var(--f-titre); font-weight: 700; font-size: 1.75rem; line-height: 1.1; margin-bottom: 0.5rem; }
.copyright { color: var(--gris-sur-noir); font-size: 0.875rem; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bande-fixe { transition: none; }
}

/* ---------- Pages secondaires ---------- */
.page-simple { padding-bottom: 0; }
.titre-page { font-family: var(--f-titre); font-weight: 700; font-size: var(--h2); line-height: 1; margin: 0 0 2rem; }
.texte-courant { max-width: 65ch; }
.texte-courant h2 { font-family: var(--f-titre); font-weight: 700; font-size: 2rem; line-height: 1.1; margin: 2.5rem 0 0.75rem; }
.texte-courant ul { padding-left: 1.25rem; }
