/* Le Fournil des Abbesses — feuille de style */

:root {
  --farine: #f6f1e7;
  --farine-2: #efe6d6;
  --terre: #a4472c;
  --terre-fonce: #7d3320;
  --charbon: #2a2725;
  --gris: #5e5852;
  --filet: #d8ccb8;
  --debord: calc((min(100vw, 1180px) - 100vw) / 2 - 24px);
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Gill Sans", "Gill Sans MT", "Seravek", "Optima", "Segoe UI", "Trebuchet MS", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--charbon);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  background-color: var(--farine);
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 50, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(239, 230, 214, 0.4));
  background-size: 7px 7px, 13px 13px, 100% 100%;
  background-position: 0 0, 3px 5px, 0 0;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--terre-fonce); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terre); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--charbon);
}
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }
em { font-style: italic; }

.surtitre {
  font-family: var(--sans);
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: var(--terre);
  margin: 0 0 0.8em;
}

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  padding: 2rem 16px 0;
}
.masthead .logo {
  display: inline-block;
  text-decoration: none;
  color: var(--charbon);
}
.masthead .logo img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  margin: 0 auto 0.7rem;
  mix-blend-mode: multiply;
}
.masthead .nom {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.masthead .devise {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gris);
  font-size: 1rem;
  margin-top: 0.3rem;
}
.nav {
  margin: 1.4rem auto 0;
  max-width: 900px;
  border-top: 1px solid var(--charbon);
  border-bottom: 1px solid var(--filet);
  padding: 0.55rem 0 0.6rem;
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 2.4rem;
}
.nav a {
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--charbon);
}
.nav a:hover { color: var(--terre); }
.nav a[aria-current="page"] { color: var(--terre); border-bottom: 1px solid var(--terre); }

.date-edition {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gris);
  margin: 0.7rem 0 0;
}

/* ---------- Mise en page ---------- */
main { display: block; }

.contenu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero : photo qui déborde à droite, bloc texte qui la chevauche */
.une {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  margin: 3.5rem 0 4rem;
  position: relative;
}
.une-photo {
  grid-column: 2;
  grid-row: 1;
  margin-right: var(--debord);
}
.une-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--farine-2);
}
.une-texte {
  grid-column: 1 / span 1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  background: var(--farine);
  padding: 2.6rem 2.4rem 2.2rem 0;
  margin-right: -6rem;
  border-bottom: 3px solid var(--terre);
}
.une-texte .chapo {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--gris);
}

/* Variante inversée : photo qui déborde à gauche */
.une.gauche { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.une.gauche .une-photo { grid-column: 1; margin-right: 0; margin-left: var(--debord); }
.une.gauche .une-texte {
  grid-column: 2;
  margin-right: 0;
  margin-left: -6rem;
  padding: 2.6rem 0 2.2rem 2.4rem;
}

/* Photo portrait (atelier) */
.une.portrait { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; }
.une.portrait .une-photo img { aspect-ratio: 2 / 3; }
.une.portrait .une-photo { margin-right: 0; margin-left: var(--debord); grid-column: 1; }
.une.portrait .une-texte {
  grid-column: 2;
  margin: 0 0 4rem -5rem;
  padding: 2.4rem 0 2rem 2.4rem;
}

figcaption {
  font-size: 0.82rem;
  color: var(--gris);
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0 24px 0 0;
  text-align: right;
}
.une.gauche figcaption, .une.portrait figcaption { text-align: left; padding: 0 0 0 calc(-1 * var(--debord)); }

/* Article + carnet */
.colonnes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 4rem;
  margin: 0 0 4rem;
}
.article { max-width: 680px; }
.article > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.4rem;
  line-height: 0.85;
  padding: 0.35rem 0.6rem 0 0;
  color: var(--terre);
}
.article h2 { margin-top: 1.6em; }
.article h2::before {
  content: "";
  display: block;
  width: 48px;
  border-top: 1px solid var(--terre);
  margin-bottom: 0.8rem;
}

.citation {
  margin: 2.4rem 0 2.4rem -2rem;
  padding: 0.4rem 0 0.4rem 2rem;
  border-left: 3px solid var(--terre);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.35;
  color: var(--terre-fonce);
}
.citation p { margin: 0; }
.citation cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris);
}

.carnet {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  background: var(--farine-2);
  padding: 1.6rem 1.5rem 1.2rem;
  border-top: 3px solid var(--charbon);
}
.carnet h3 {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}
.carnet .sous {
  font-size: 0.85rem;
  color: var(--gris);
  font-style: italic;
  margin-bottom: 1.2rem;
}
.frise {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  border-left: 1px solid var(--terre);
}
.frise li {
  position: relative;
  padding: 0 0 1rem 0.6rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.frise li::before {
  content: "";
  position: absolute;
  left: -1.48rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  background: var(--farine-2);
  border: 1px solid var(--terre);
  transform: rotate(45deg);
}
.frise time {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--terre-fonce);
}

/* Bandeau tinté */
.bandeau {
  background: var(--charbon);
  color: var(--farine);
  margin: 0 calc(50% - 50vw) 4rem;
  padding: 3.5rem 24px;
}
.bandeau .interieur {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.bandeau h2, .bandeau h3 { color: var(--farine); }
.bandeau h3 { border-bottom: 1px solid rgba(246, 241, 231, 0.25); padding-bottom: 0.6rem; }
.bandeau p { color: #d9d1c3; font-size: 0.98rem; }
.bandeau .surtitre { color: #e39a7d; }
.bandeau a { color: #f0b49b; }

/* Liste des pains */
.pains {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3rem 2.5rem;
  margin: 0 0 4rem;
}
.pain { grid-column: span 6; border-top: 1px solid var(--charbon); padding-top: 1.2rem; }
.pain:nth-child(3n+1) { grid-column: 1 / span 7; }
.pain:nth-child(3n+2) { grid-column: 9 / span 4; margin-top: 4rem; }
.pain:nth-child(3n) { grid-column: 3 / span 8; background: var(--farine-2); padding: 1.6rem 2rem; border-top: 3px solid var(--terre); }
.pain .num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--terre);
  line-height: 1;
  float: left;
  margin: 0 1rem 0.2rem 0;
}
.pain h3 { margin-bottom: 0.2rem; }
.pain .details {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 0.9rem;
}

/* Étapes de l'atelier */
.etapes { list-style: none; margin: 0 0 4rem; padding: 0; counter-reset: etape; }
.etapes > li {
  counter-increment: etape;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--filet);
}
.etapes > li::before {
  content: counter(etape, upper-roman);
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--terre);
}
.etapes h3 { margin-bottom: 0.4rem; }
.etapes .heure {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris);
  display: block;
  margin-bottom: 0.6rem;
}
.etapes aside {
  font-family: var(--serif);
  font-style: italic;
  color: var(--terre-fonce);
  border-left: 1px solid var(--terre);
  padding-left: 1rem;
  align-self: start;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Horaires */
.semaine {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
}
.semaine th, .semaine td {
  text-align: left;
  padding: 0.75rem 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--filet);
  vertical-align: top;
}
.semaine th {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  width: 32%;
}
.semaine tr.ferme td, .semaine tr.ferme th { color: var(--gris); font-style: italic; }

.chemin { counter-reset: pas; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.chemin li {
  counter-increment: pas;
  position: relative;
  padding: 0 0 1.1rem 3rem;
}
.chemin li::before {
  content: counter(pas);
  position: absolute;
  left: 0;
  top: -0.1rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--terre);
  width: 2rem;
  text-align: right;
}

/* ---------- Pied de page ---------- */
.pied {
  border-top: 1px solid var(--charbon);
  margin: 2rem auto 0;
  max-width: 1180px;
  padding: 2rem 24px 3rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  font-size: 0.92rem;
  color: var(--gris);
}
.pied .nom-pied { font-family: var(--serif); font-size: 1.4rem; color: var(--charbon); display: block; margin-bottom: 0.4rem; }
.pied h4 {
  font-family: var(--sans);
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--terre);
  margin-bottom: 0.5rem;
}
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 0.25rem; }
.pied a { color: var(--charbon); text-decoration: none; }
.pied a:hover { color: var(--terre); text-decoration: underline; }
.pied .mention { grid-column: 1 / -1; border-top: 1px solid var(--filet); padding-top: 1rem; font-size: 0.82rem; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .colonnes { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .carnet { position: static; }
  .bandeau .interieur { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .etapes > li { grid-template-columns: 90px minmax(0, 1fr); }
  .etapes aside { grid-column: 2; }
  .pain:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 760px) {
  .contenu { padding: 0 16px; }
  .une, .une.gauche, .une.portrait { grid-template-columns: minmax(0, 1fr); margin: 2rem 0 3rem; }
  .une .une-photo, .une.gauche .une-photo, .une.portrait .une-photo {
    grid-column: 1; grid-row: 1;
    margin: 0 -16px;
  }
  .une.portrait .une-photo img { aspect-ratio: 4 / 5; }
  .une .une-texte, .une.gauche .une-texte, .une.portrait .une-texte {
    grid-column: 1; grid-row: 2;
    margin: -3rem 12px 0;
    padding: 1.6rem 1.2rem 1.4rem;
  }
  figcaption, .une.gauche figcaption, .une.portrait figcaption { padding: 0 16px; text-align: left; }
  .citation { margin-left: 0; padding-left: 1.2rem; }
  .bandeau { padding: 2.5rem 16px; }
  .pain:nth-child(3n) { padding: 1.4rem 1.2rem; }
  .etapes > li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .etapes > li::before { font-size: 2.2rem; }
  .etapes aside { grid-column: 1; }
  .pied { grid-template-columns: minmax(0, 1fr); padding: 2rem 16px 2.5rem; }
  .nav ul { gap: 0.3rem 1.3rem; }
  .nav a { letter-spacing: 0.12em; }
  .semaine th { width: 38%; }
}
