/* Site d'Alexis Rivière. Pas de build : ce fichier est servi tel quel. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --fond: #EDEFEA;        /* gris-vert froid, le plan de travail */
  --feuille: #FFFFFF;     /* la feuille du devis */
  --encre: #1B2A41;       /* texte principal, 12,9:1 sur le fond */
  --encre-douce: #4A5566; /* texte secondaire */
  --reglure: #C5D3E2;     /* lignes bleues du carnet */
  --ocre: #8A5A00;        /* chiffres, conforme AA sur le blanc et le fond */
  --ocre-vif: #C8961E;    /* décor uniquement : jamais pour du texte */

  --titre: "Archivo", "Arial Narrow", sans-serif;
  --texte: "Source Sans 3", "Segoe UI", sans-serif;
  --chiffre: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --mesure: 42rem;
  --gouttiere: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.55;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ocre-vif); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--titre); line-height: 1.1; margin: 0; }
p { margin: 0 0 1rem; }

.enveloppe {
  max-width: calc(var(--mesure) + 2 * var(--gouttiere));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
.num { font-family: var(--chiffre); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- En-tête ---- */
.entete { border-bottom: 1px solid var(--reglure); }
.entete__ligne { display: flex; justify-content: space-between; align-items: center; min-height: 3.5rem; gap: 1rem; }
.entete__nom { font-family: var(--titre); font-weight: 700; font-stretch: 112%; text-decoration: none; }
.entete__tel { font-family: var(--chiffre); font-weight: 500; font-size: 1rem; }

/* ---- Accroche : lettrage de camionnette ---- */
.accroche { padding-block: 3rem 3.5rem; }
.accroche__auteur { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.5rem; font-size: 1rem; line-height: 1.35; }
.accroche__auteur img { border-radius: 50%; box-shadow: 0 0 0 2px var(--feuille), 0 0 0 3px var(--reglure); }
.accroche__auteur p { margin: 0; color: var(--encre-douce); }
.accroche__auteur strong { color: var(--encre); }
.accroche__metier { color: var(--encre-douce); font-size: 1.0625rem; margin-bottom: 1.25rem; }
.accroche__titre {
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -.01em;
  max-width: 16ch;
  margin-bottom: 1.25rem;
}
.accroche__texte { max-width: 36ch; font-size: 1.1875rem; }
.accroche__numero {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--titre);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.015em;
  text-decoration: none;
  padding-bottom: .15em;
  border-bottom: .12em solid var(--ocre-vif);
}
.accroche__numero:hover { color: var(--ocre); }
.accroche__sous-numero { margin-top: 1rem; color: var(--encre-douce); max-width: 40ch; }

/* ---- Titres de section ---- */
.titre-section { font-size: clamp(1.625rem, 4.5vw, 2.125rem); font-weight: 800; font-stretch: 108%; margin-bottom: .75rem; }
.chapeau { color: var(--encre-douce); }
/* Filet tracé en fond pour s'arrêter au contenu, pas au bord de la gouttière */
.bloc {
  padding-block: 3rem;
  background: linear-gradient(var(--reglure), var(--reglure)) center top / calc(100% - 2 * var(--gouttiere)) 1px no-repeat;
}
.bloc > p { max-width: 38em; }

/* ---- Le devis : la seule pièce « document » ---- */
.devis-zone { padding-block: 1rem 3.5rem; }
.devis {
  margin-top: 1.5rem;
  background: var(--feuille);
  border: 1px solid var(--reglure);
  box-shadow: 0 1px 0 var(--reglure), 0 12px 24px -18px rgba(27, 42, 65, .35);
  padding: 1.25rem 1rem 1.5rem;
}
@media (min-width: 40rem) { .devis { padding: 2rem 2.25rem 2.25rem; } }

.devis__entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: 1rem; color: var(--encre-douce); padding-bottom: 1rem; border-bottom: 2px solid var(--encre); }
.devis__entete p { margin: 0; }
.devis__entete strong { color: var(--encre); }

.devis__lignes { width: 100%; border-collapse: collapse; }
.devis__lignes thead th { font-size: .875rem; font-weight: 600; color: var(--encre-douce); text-align: left; padding: .75rem 0 .5rem; border-bottom: 1px solid var(--reglure); }
.devis__lignes thead th.num { font-family: var(--texte); text-align: right; }
.devis__lignes td { vertical-align: top; padding: 1rem 0; border-bottom: 1px solid var(--reglure); }
.devis__lignes td.num { padding-left: 1rem; color: var(--ocre); font-size: 1.0625rem; }

.ligne__titre { display: block; font-weight: 600; font-size: 1.125rem; }
.ligne__detail { display: block; color: var(--encre-douce); font-size: 1rem; line-height: 1.45; margin-top: .2rem; max-width: 34em; }
.ligne--remise td.num { color: var(--encre); }
.ligne--sur-devis td.num { font-family: var(--texte); font-weight: 400; color: var(--encre-douce); }

/* Options : le sélecteur est grand, un doigt d'artisan doit l'attraper */
.ligne__coche { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.ligne__coche + .ligne__detail { padding-left: 2.25rem; }
.ligne__coche input {
  appearance: none; flex: none;
  width: 1.5rem; height: 1.5rem; margin: .05rem 0 0;
  border: 2px solid var(--encre); border-radius: 3px; background: var(--feuille);
  display: grid; place-content: center; cursor: pointer;
}
.ligne__coche input::before {
  content: ""; width: .8rem; height: .45rem;
  border: solid var(--feuille); border-width: 0 0 3px 3px;
  transform: translateY(-2px) rotate(-45deg);
}
.ligne__coche input:checked { background: var(--encre); }
.devis__lignes .ligne--option.inactive td.num { color: var(--encre-douce); }

.quantite { display: inline-flex; align-items: stretch; margin-top: .6rem; border: 2px solid var(--encre); border-radius: 3px; }
.quantite__btn {
  width: 2.75rem; min-height: 2.75rem; border: 0; background: var(--feuille);
  font: 600 1.375rem/1 var(--texte); color: var(--encre); cursor: pointer;
}
.quantite__btn:hover { background: #EEF3F8; }
.quantite input {
  width: 3rem; border: 0; border-inline: 1px solid var(--reglure); text-align: center;
  font: 500 1.125rem var(--chiffre); color: var(--encre); background: var(--feuille);
  -moz-appearance: textfield; appearance: textfield;
}
.quantite input::-webkit-inner-spin-button, .quantite input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.devis__lignes tfoot th { text-align: left; font-weight: 400; padding: .5rem 0; }
.devis__lignes tfoot td { padding: .5rem 0 .5rem 1rem; border: 0; }
.devis__lignes .total th, .devis__lignes .total td { padding-top: 1.25rem; border-top: 2px solid var(--encre); }
.devis__lignes .total th { font-family: var(--titre); font-weight: 800; font-size: 1.5rem; }
.total td.num { font-size: 1.75rem; color: var(--ocre); }
.echeance th { color: var(--encre-douce); font-size: 1rem; }
.echeance td.num { color: var(--encre); font-size: 1rem; }

.devis__annexes { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--reglure); font-size: 1rem; }
.devis__annexes p { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: .35rem 0; }
.devis__annexes .num { color: var(--encre); }
.devis__note { font-size: .9375rem; color: var(--encre-douce); margin-top: 1rem; }

.devis__accord { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--encre-douce); }
.devis__accord-texte { margin: 0; font-family: var(--titre); font-weight: 700; font-style: italic; font-size: 1.25rem; }

.bouton {
  display: inline-block; background: var(--encre); color: var(--feuille);
  font-weight: 600; font-size: 1.125rem; text-decoration: none;
  padding: .85rem 1.25rem; border-radius: 3px;
}
.bouton:hover { background: #2B3F5E; }
.bouton--second { background: var(--feuille); color: var(--encre); box-shadow: inset 0 0 0 2px var(--encre); }
.bouton--second:hover { background: #EEF3F8; }
.devis__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- Étapes : une vraie séquence, donc numérotée ---- */
.etapes { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 1.5rem 3.25rem; }
.etapes li::before {
  content: counter(etape);
  position: absolute; left: 0; top: -.1rem;
  width: 2.25rem; height: 2.25rem; display: grid; place-content: center;
  font: 500 1.0625rem var(--chiffre); color: var(--encre);
  border: 2px solid var(--encre); border-radius: 50%; background: var(--fond);
}
.etapes li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0;
  border-left: 2px dotted var(--reglure);
}
.etapes h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .3rem; }
.etapes p { margin: 0; max-width: 36em; }

/* ---- Listes ---- */
.liste { margin: 1rem 0 0; padding: 0; list-style: none; }
.liste li { padding: .75rem 0; border-bottom: 1px solid var(--reglure); max-width: 38em; }
.liste li:last-child { border-bottom: 0; }
.liste--sobre li { color: var(--encre-douce); }

/* ---- Questions ---- */
.faq { margin-top: 1rem; }
.faq details { border-bottom: 1px solid var(--reglure); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-weight: 600; font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font: 500 1.375rem var(--chiffre); color: var(--ocre); }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 38em; }

/* ---- Portrait ---- */
.portrait { display: block; width: min(100%, 16rem); height: auto; margin-bottom: 1.5rem; border-radius: 3px; }

/* ---- Contact ---- */
.contact { background: var(--encre); color: var(--feuille); padding-block: 3.5rem 4rem; }
.contact a { color: var(--feuille); }
.contact__numero {
  display: inline-block; margin: .5rem 0 1.25rem;
  font-family: var(--titre); font-weight: 900; font-stretch: 125%;
  font-size: clamp(2.1rem, 10.5vw, 2.75rem); line-height: 1;
  text-decoration: none; padding-bottom: .15em; border-bottom: .12em solid var(--ocre-vif);
}
.contact p { max-width: 36em; color: #D5DDE8; }

/* ---- Pied ---- */
.pied { font-size: 1rem; color: var(--encre-douce); padding-block: 1.5rem 6rem; }
.pied__ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.pied p { margin: 0; }
@media (min-width: 48rem) { .pied { padding-bottom: 1.5rem; } }

/* ---- Barre d'appel fixe, mobile uniquement ---- */
.barre-appel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: block; text-align: center; text-decoration: none;
  background: var(--encre); color: var(--feuille);
  font-weight: 700; font-size: 1.125rem;
  padding: 1rem var(--gouttiere) calc(1rem + env(safe-area-inset-bottom));
  border-top: 3px solid var(--ocre-vif);
}
@media (min-width: 48rem) { .barre-appel { display: none; } }

/* ---- Menu d'en-tête : grand écran seulement ---- */
.entete__menu { display: none; }
@media (min-width: 48rem) {
  .entete__menu { display: flex; gap: 1.5rem; margin-left: auto; font-size: 1rem; }
  .entete__menu a { text-decoration: none; color: var(--encre-douce); }
  .entete__menu a:hover { color: var(--encre); text-decoration: underline; }
  .entete__tel { margin-left: 1.5rem; }
}
.titre-section[id] { scroll-margin-top: 1.5rem; }

/* ---- Banderole : le seul mouvement de la page ---- */
.banderole {
  overflow: hidden; cursor: pointer;
  background: var(--feuille); color: var(--encre);
  border-block: 1px solid var(--reglure);
}
.banderole__piste { display: flex; width: max-content; animation: defile 45s linear infinite; }
.banderole__groupe { display: flex; list-style: none; margin: 0; padding: .9rem 0; }
.banderole__groupe li {
  display: flex; align-items: center; white-space: nowrap;
  font-family: var(--titre); font-weight: 800; font-stretch: 115%; font-size: 1.25rem;
}
.banderole__groupe li::before {
  content: ""; width: .45rem; height: .45rem; margin-inline: 1.75rem;
  background: var(--ocre-vif); transform: rotate(45deg);
}
@keyframes defile { to { transform: translateX(-33.3333%); } }
.banderole:hover .banderole__piste,
.banderole.en-pause .banderole__piste { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .banderole__piste { animation: none; } }

/* ---- Exemple : bande encre, le téléphone est l'image de la page ---- */
.exemple { background: var(--encre); color: var(--feuille); padding-block: 3.5rem; }
.exemple .titre-section { color: var(--feuille); }
.exemple p { color: #D5DDE8; max-width: 36em; }
.exemple__fictif { font-size: 1rem; border-left: 3px solid var(--ocre-vif); padding-left: .75rem; }
.bouton--clair { background: var(--feuille); color: var(--encre); }
.bouton--clair:hover { background: #EEF3F8; }

.telephone {
  width: min(100%, 18.5rem); aspect-ratio: 9 / 18.5;
  margin: 2.5rem auto 0;
  border: 10px solid #0E1726; border-radius: 2.25rem;
  background: #0E1726; overflow: hidden;
  box-shadow: 0 0 0 2px #3A4A63, 0 24px 48px -20px rgba(0, 0, 0, .6);
}
.telephone iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 1.5rem; background: #FFFDF9; }

/* ---- Bureau : titres dans une marge à gauche, contenu à droite ---- */
@media (min-width: 64rem) {
  :root { --gouttiere: 2.5rem; }
  .enveloppe { max-width: calc(72rem + 2 * var(--gouttiere)); }

  /* L'accroche garde la colonne centrée du mobile, et la taille du numéro choisie plus haut */
  .accroche.enveloppe { max-width: calc(var(--mesure) + 2 * var(--gouttiere)); padding-block: 5rem; }
  .accroche__titre { font-size: 4rem; max-width: 15ch; }
  .accroche__texte { font-size: 1.25rem; }

  .bloc,
  .devis-zone > .enveloppe,
  .contact > .enveloppe {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: 4rem;
    align-items: start;
  }
  .bloc > *,
  .contact > .enveloppe > * { grid-column: 2; }
  .bloc > .titre-section,
  .contact > .enveloppe > .titre-section {
    grid-column: 1; grid-row: 1 / span 12;
    position: sticky; top: 2rem;
  }
  .bloc > .etapes, .bloc > .liste, .bloc > .faq { margin-top: 0; }
  .contact__numero { margin-top: 0; justify-self: start; }

  .exemple { padding-block: 5rem; }
  .exemple__grille { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5rem; align-items: center; }
  .telephone { width: 19rem; margin: 0; }

  /* Étapes en frise horizontale : c'est une séquence, elle se lit de gauche à droite */
  .etapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
  .etapes li { padding: 3.25rem 0 0; }
  .etapes li:not(:last-child)::after {
    left: 2.75rem; right: -1.25rem; top: calc(1.125rem - 1px); bottom: auto;
    border-left: 0; border-top: 2px dotted var(--reglure);
  }
  .etapes h3 { font-size: 1.125rem; }
  .etapes p { font-size: 1rem; }

  .devis-zone__marge { grid-column: 1; position: sticky; top: 2rem; }
  .devis { grid-column: 2; margin-top: 0; }
}

/* ---- Page mentions légales ---- */
.page-simple { padding-block: 2.5rem 3rem; }
.page-simple h1 { font-size: clamp(1.875rem, 6vw, 2.5rem); font-weight: 800; font-stretch: 108%; margin-bottom: 1.5rem; }
.page-simple h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .5rem; }
.a-completer { background: #FFF3D6; padding: 0 .25em; }

/* Le devis suit la bande sombre de l'exemple : il lui faut de l'air au-dessus */
.exemple + .devis-zone { padding-top: 3.5rem; }
