/* Davenca, le semainier : couleurs, polices et mise en page du site vitrine. */

@font-face { font-family: "Literata"; src: url("/polices/literata-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/polices/literata-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans Extra Condensed"; src: url("/polices/sofia-sans-extra-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sofia Sans Extra Condensed"; src: url("/polices/sofia-sans-extra-condensed-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  /* Couleurs */
  --papier: #eef2ed;       /* le vert-gris pâle des registres */
  --encre: #1d2b4a;        /* bleu-noir : tout le texte */
  --crayon: #5b6670;       /* heures, légendes, notes */
  --filet: #b7c3bb;        /* les lignes imprimées */
  --rouge: #b02a30;        /* seulement les rendez-vous */
  --rouge-fonce: #8f2228;  /* survol du bouton */

  /* Polices : la voix (ce que je dis) et l'imprimé (jours, heures, en-têtes) */
  --voix: "Literata", Georgia, "Times New Roman", serif;
  --imprime: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;

  /* Échelle classique de Bringhurst : 14, 18, 24, 36, 48, 72 px */
  --t14: 0.875rem;
  --t18: 1.125rem;
  --t24: 1.5rem;
  --t36: 2.25rem;
  --t48: 3rem;
  --t72: 4.5rem;

  /* Mise en page */
  --mesure: 66ch;
  --marge: 1rem;
  --entre-blocs: 4rem;
}
@media (min-width: 48em) {
  :root { --marge: 1.5rem; --entre-blocs: 6rem; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light; /* le site n'a qu'un thème clair : barres de défilement et flèches restent claires */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(29, 43, 74, 0.12); /* un léger voile bleu-noir au toucher */
}
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 var(--t18) / 1.6 var(--voix);
  font-synthesis: none;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.aller-au-contenu {
  position: absolute; left: var(--marge); top: -5rem; z-index: 10;
  padding: 0.75rem 1rem; background: var(--encre); color: var(--papier);
}
.aller-au-contenu:focus { top: 0.75rem; }

.grille { width: 100%; max-width: 75rem; margin-inline: auto; padding-inline: var(--marge); }
.texte { max-width: var(--mesure); }
.texte > * + * { margin-top: 1rem; }
.a-fournir { color: var(--crayon); text-decoration: underline dotted; text-underline-offset: 0.2em; }
.insecable { white-space: nowrap; }

/* ---------- Boutons et liens d'action ---------- */
.bouton {
  display: inline-flex; align-items: center; min-height: 3rem;
  padding: 0.625rem 1.25rem; border-radius: 4px;
  background: var(--rouge); color: #fff; font-weight: 600; text-decoration: none;
  transition: background-color 150ms ease;
}
.bouton:hover { background: var(--rouge-fonce); }
.lien-action { display: inline-flex; align-items: center; min-height: 3rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; }

/* ---------- En-tête ---------- */
.entete { border-bottom: 1px solid var(--filet); }
.entete-interieur { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }
.marque { font: 800 var(--t36) / 1 var(--imprime); text-decoration: none; }
.navigation { display: none; }
.navigation ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.navigation a { display: inline-flex; align-items: center; min-height: 3rem; text-decoration: none; }
.navigation a:hover { text-decoration: underline; }
.bouton-entete { margin-left: auto; min-height: 2.75rem; padding-inline: 1rem; font-size: var(--t14); }
@media (min-width: 64em) {
  .navigation { display: block; margin-left: auto; }
  .bouton-entete { margin-left: 1rem; padding-inline: 1.25rem; font-size: var(--t18); }
}

/* ---------- Le héros ---------- */
.heros { padding-top: 2.5rem; }
.heros-grille { display: grid; gap: 2rem; grid-template-areas: "titre" "semaine" "appui"; }
.heros h1 { grid-area: titre; max-width: 15em; font-size: var(--t36); }
.heros-appui { grid-area: appui; max-width: var(--mesure); }
.heros-appui .actions { margin-top: 1.5rem; }
.lien-email { margin-top: 1rem; }
@media (min-width: 48em) {
  .heros h1 { font-size: var(--t48); }
}
@media (min-width: 64em) {
  .heros { padding-top: 4rem; }
  .heros-grille {
    grid-template-columns: 7fr 5fr;
    grid-template-areas: "titre appui" "semaine semaine";
    column-gap: 4rem; row-gap: 3rem; align-items: end;
  }
}

/* La semaine : les jours en lignes, comme un semainier */
.semaine { grid-area: semaine; }
.semaine-tete { display: none; }
.semaine-jours { position: relative; list-style: none; padding: 0; border-bottom: 1px solid var(--filet); }
.jour {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr); column-gap: 1rem; align-items: start;
  padding: 0.75rem 1.5rem 0.75rem 0; border-top: 1px solid var(--filet);
}
.jour-nom { font: 800 var(--t36) / 0.9 var(--imprime); }
.creneau { grid-column: 2; }
.creneau:empty { display: none; }
/* Sur téléphone : l'heure et l'étape sur une ligne, l'entreprise dessous */
.entree { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; align-items: baseline; }
.heure { font: 700 var(--t18) / 1.35 var(--imprime); font-variant-numeric: tabular-nums; }
.quoi { justify-self: start; font-weight: 600; line-height: 1.35; }
.qui { grid-column: 1 / -1; color: var(--crayon); line-height: 1.35; }
.rdv, .rdv .qui { color: var(--rouge); }
.semaine figcaption { margin-top: 0.75rem; max-width: var(--mesure); font-size: var(--t14); color: var(--crayon); }

/* Le ruban marque-page, sur le bord droit de la semaine */
.semaine-jours::after {
  content: ""; position: absolute; top: -1px; right: 0;
  width: 0.5rem; height: 1.75rem; background: var(--rouge);
  transform-origin: top; transition: transform 450ms ease-out;
}
@media (min-width: 48em) {
  .semaine-tete {
    display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem;
    padding: 0 1.75rem 0.375rem 0;
    font: 700 var(--t18) / 1.2 var(--imprime); color: var(--crayon);
  }
  .jour { grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem; padding: 0.5rem 1.75rem 0.5rem 0; }
  .jour-nom { font-size: var(--t72); }
  /* Sur ordinateur : les heures en colonne, alignées à droite, comme une fiche horaire */
  .entree { grid-template-columns: 4.6em minmax(0, 1fr); column-gap: 0.75rem; align-items: start; }
  .heure { grid-row: span 2; text-align: right; font-size: var(--t24); line-height: 1.15; }
  .qui { grid-column: 2; }
  .creneau:empty { display: block; }
  .creneau-matin { grid-column: 2; }
  .creneau-apres-midi { grid-column: 3; }
  .semaine-jours::after { width: 0.625rem; height: calc(100% + 2px); }
}

/* L'écriture de la semaine, une seule fois au chargement (semaine.js).
   Un cache couleur papier recouvre chaque ligne, puis se retire vers la droite :
   on n'anime qu'une transformation, le plus léger pour le navigateur. */
.entree { position: relative; }
.semaine-a-ecrire .entree::after {
  content: ""; position: absolute; inset: -0.125rem -0.25rem; background: var(--papier);
  transform-origin: right; transition: transform var(--duree, 450ms) linear;
}
.semaine-a-ecrire .entree.ecrite::after { transform: scaleX(0); }
.semaine-a-ecrire .semaine-jours:not(.ecrite)::after { transform: scaleY(0); }

/* ---------- Les sections ---------- */
.bloc {
  padding-top: var(--entre-blocs);
  /* Un lien vers une section (#offres…) amène son titre à 1,5 rem du haut, sans le grand espace au-dessus */
  scroll-margin-top: calc(1.5rem - var(--entre-blocs));
}
.bloc h2 { max-width: 22em; font-size: var(--t24); }
.bloc h2 + .texte { margin-top: 1rem; }
@media (min-width: 48em) {
  .bloc h2 { font-size: var(--t36); }
}

/* Vous avez reçu un email ? */
.qr { display: grid; row-gap: 1.5rem; column-gap: 3rem; max-width: 62rem; margin-top: 2rem; }
.qr dt { font-weight: 600; }
.qr dd { max-width: var(--mesure); margin-top: 0.25rem; }
.suite { margin-top: 1.5rem; }
@media (min-width: 64em) {
  .qr { grid-template-columns: 15rem minmax(0, 1fr); }
  .qr dd { margin-top: 0; }
}

/* Comment ça marche : 4 lignes, comme une fiche horaire */
.etapes { margin-top: 2rem; padding: 0; list-style: none; border-bottom: 1px solid var(--filet); }
.etape {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1rem;
  padding-block: 1.25rem; border-top: 1px solid var(--filet);
}
.etape-numero { grid-row: span 2; font: 800 var(--t48) / 0.85 var(--imprime); }
.etape h3 { font-size: var(--t24); }
.etape p { max-width: var(--mesure); margin-top: 0.5rem; }
@media (min-width: 64em) {
  .etape { grid-template-columns: 4rem 15rem minmax(0, 1fr); column-gap: 2rem; align-items: baseline; }
  .etape-numero { grid-row: auto; }
  .etape p { margin-top: 0; }
}

/* Ce qui vous reste à faire, et la démo */
.duo { display: grid; gap: 2rem; }
.duo .actions { margin-top: 1.5rem; }
.capture img { border: 1px solid var(--filet); border-radius: 4px; }
@media (min-width: 64em) {
  .duo { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}

/* Les offres : un tableau, comme une fiche horaire */
.offres-tableau { width: 100%; max-width: 62rem; margin-top: 2rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.offres-tableau th, .offres-tableau td { padding: 0.75rem 1rem 0.75rem 0; border-top: 1px solid var(--filet); text-align: left; vertical-align: top; }
.offres-tableau thead > tr > * { padding-bottom: 0.5rem; border-top: 0; }
.offres-tableau thead th { width: 39%; font: 700 var(--t24) / 1.2 var(--imprime); }
.offres-tableau tbody th { width: 22%; font-weight: 600; }
.offres-tableau tbody tr:last-child > * { border-bottom: 1px solid var(--filet); }
.offres-notes { margin-top: 1.5rem; }
.offres-notes ul { padding-left: 1.25rem; }
.offres-notes li + li { margin-top: 0.25rem; }
.offres .actions { margin-top: 2rem; }
@media (max-width: 39.99em) {
  .offres-tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .offres-tableau tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; padding-block: 0.75rem; border-top: 1px solid var(--filet); }
  .offres-tableau tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 0.25rem; border: 0; }
  .offres-tableau td { padding: 0; border: 0; }
  .offres-tableau td::before { content: attr(data-offre); display: block; font: 700 var(--t18) / 1.3 var(--imprime); color: var(--crayon); }
  .offres-tableau td:empty { display: none; }
  .offres-tableau td:has(+ td:empty) { grid-column: 1 / -1; }
  .offres-tableau tbody tr:last-child > * { border-bottom: 0; }
  .offres-tableau tbody tr:last-child { border-bottom: 1px solid var(--filet); }
}

/* Qui est derrière */
.qui-grille { display: grid; gap: 2rem; margin-top: 2rem; }
.photo { width: 12rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
/* Deux colonnes seulement quand la photo est là */
@media (min-width: 48em) {
  .qui-grille:has(> .photo) { grid-template-columns: 12rem minmax(0, var(--mesure)); align-items: start; }
}

/* Questions fréquentes */
.faq { max-width: 52rem; margin-top: 2rem; border-bottom: 1px solid var(--filet); }
.faq details { border-top: 1px solid var(--filet); }
.faq summary {
  padding: 1rem 0.5rem; margin-inline: -0.5rem; /* le fond du survol déborde un peu, le texte reste aligné */
  font-weight: 600; cursor: pointer; transition: background-color 150ms ease;
}
.faq summary:hover { background: rgba(29, 43, 74, 0.05); }
.faq summary::marker { color: var(--crayon); }
.faq details p { max-width: var(--mesure); padding-bottom: 1.25rem; }

/* Dernier appel */
.appel .actions { margin-top: 1.5rem; }

/* ---------- Pied de page ---------- */
.pied { margin-top: var(--entre-blocs); padding-block: 2rem 3rem; border-top: 1px solid var(--filet); font-size: var(--t14); color: var(--crayon); }
.pied a { color: var(--encre); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.5rem; padding: 0; list-style: none; }
.pied-liens a { display: inline-block; padding-block: 0.75rem; }

/* ---------- Pages légales et page introuvable ---------- */
.page-simple { padding-top: 3rem; }
.page-simple h1 { font-size: var(--t36); }
.page-simple h1 + .texte { margin-top: 1.5rem; }
.page-simple .texte > h2 { margin-top: 2.5rem; font-size: var(--t24); }
.page-simple .texte > h3 { margin-top: 1.75rem; font-size: var(--t18); }
.page-simple ul { padding-left: 1.25rem; }
.page-simple li + li { margin-top: 0.25rem; }
@media (min-width: 48em) {
  .page-simple { padding-top: 4rem; }
  .page-simple h1 { font-size: var(--t48); }
}

@media (prefers-reduced-motion: reduce) {
  .bouton { transition: none; }
}
