/* Le Fournil — habillage du squelette.
   Aucune police ni ressource distante : le serveur ne sert que ses propres
   fichiers, une dépendance à un CDN casserait la page hors ligne et ferait
   fuiter le visiteur chez un tiers. On s'en tient aux piles système. */

:root {
  --papier: #faf5ee;
  --papier-creux: #f3ebdf;
  --encre: #2a1d14;
  --encre-douce: #6f5a49;
  --croute: #a75f2b;
  --trait: #e4d6c3;

  --ouvert: #3f6b3f;
  --ouvert-fond: #eaf1e4;
  --ouvert-trait: #cadcc0;
  --ferme: #8a5344;
  --ferme-fond: #f4e8e3;
  --ferme-trait: #e3cec5;

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #17110d;
    --papier-creux: #1f1712;
    --encre: #f3e8db;
    --encre-douce: #b39d89;
    --croute: #d68f52;
    --trait: #362a21;

    --ouvert: #9cc48f;
    --ouvert-fond: #1d2a1b;
    --ouvert-trait: #2f4429;
    --ferme: #d7a294;
    --ferme-fond: #2a1a16;
    --ferme-trait: #442b24;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--papier);
  /* Une lumière douce en haut de page, façon four : dégradé pur, pas d'image. */
  background-image: radial-gradient(120% 80% at 50% -10%, var(--papier-creux), transparent 60%);
  color: var(--encre);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Le header ---------------------------------------------------------- */

.entete {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  /* Plein écran : tant que les sections produits/devis n'existent pas, un
     header à mi-hauteur laisse un grand vide sous le filet qui se lit comme
     une page cassée. Le filet devient la couture avec la suite, sous la ligne
     de flottaison. */
  min-height: 100svh;
  padding: clamp(3rem, 10vw, 6rem) 1.5rem clamp(2.5rem, 7vw, 4rem);
  border-bottom: 1px solid var(--trait);
  text-align: center;
}

/* Un filet court au-dessus du nom, pour poser le bloc sans meubler. */
.entete::before {
  content: '';
  width: 3rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--croute), transparent);
}

.logo {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.05;
  margin: 0;
}

.baseline {
  max-width: 46ch; /* tient sur une ligne en desktop, se replie proprement en mobile */
  margin: 0;
  color: var(--encre-douce);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  text-wrap: balance;
}

/* --- Le bandeau d'ouverture --------------------------------------------- */

.bandeau-info {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: clamp(0.5rem, 2vw, 1rem);
  padding: 0.55em 1.1em;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background-color: var(--papier);
  color: var(--encre-douce);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* La pastille reprend la couleur du texte : jamais le seul porteur de
   l'information, l'état est déjà écrit en toutes lettres à côté. */
.bandeau-info::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

/* L'état vient du serveur (data-etat), pas d'une relecture de la phrase. */
.bandeau-info[data-etat='ouvert'] {
  border-color: var(--ouvert-trait);
  background-color: var(--ouvert-fond);
  color: var(--ouvert);
}

.bandeau-info[data-etat='ferme'] {
  border-color: var(--ferme-trait);
  background-color: var(--ferme-fond);
  color: var(--ferme);
}

/* --- Le corps de page ---------------------------------------------------- */

main {
  max-width: 68ch;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
}
