/* Le Verger : « Pruine et genêt ». Le genêt et la pruine ne servent jamais de texte sur fond clair. */
:root {
  --c-encre: #2A2756;
  --c-pruine: #7F86C4;
  --c-pruine-fonce: #5A5F99; /* dérivé pour le petit texte : 5,6:1 sur le lait */
  --c-pruine-pale: #E3E4F1;
  --c-framboise: #B8325A;
  --c-genet: #E4B332;
  --c-lait: #FBF8F2;
  --c-granit: #E8E4DA;

  --f-titre: 'Gloock', Georgia, serif;
  --f-texte: 'Source Serif 4', Georgia, serif;
  --f-mono: 'DM Mono', ui-monospace, monospace;

  --t-xs: 0.8125rem;
  --t-s: 0.9375rem;
  --t-m: 1.125rem;
  --t-l: clamp(1.3rem, 1.1rem + 0.9vw, 1.65rem);
  --t-xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --t-xxl: clamp(2.5rem, 1.6rem + 4.2vw, 5rem);

  --measure-article: 820px;
  --largeur-max: 1280px;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --esp-section: clamp(3rem, 7vw, 5.5rem);
}

*,
*::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(--c-lait);
  color: var(--c-encre);
  font-family: var(--f-texte);
  font-size: var(--t-m);
  line-height: 1.7;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--f-titre);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 {
  font-size: var(--t-xxl);
}
h2 {
  font-size: var(--t-xl);
}
h3 {
  font-size: var(--t-l);
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--c-encre);
  text-decoration-color: var(--c-pruine);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--c-framboise);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 3px solid var(--c-framboise);
  outline-offset: 2px;
}
.saut-contenu {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--c-encre);
  color: var(--c-lait);
}
.saut-contenu:focus {
  left: 0.5rem;
}

/* --- Images : wrappers à ratio fixe --- */
.img-hero,
.img-card,
.img-body,
.img-portrait {
  overflow: hidden;
  background: var(--c-granit);
}
.img-hero {
  aspect-ratio: 16 / 9;
}
.img-card {
  aspect-ratio: 3 / 2;
}
.img-body {
  aspect-ratio: 3 / 2;
}
.img-portrait {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.img-hero img,
.img-card img,
.img-body img,
.img-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Figures de corps : l'image garde son 3:2, la légende reste visible sous elle */
figure.img-body {
  aspect-ratio: auto;
  overflow: visible;
  background: none;
}
figure.img-body img {
  aspect-ratio: 3 / 2;
  height: auto;
  background: var(--c-granit);
}

/* --- Hero en bandeau bord à bord --- */
.hero-plein {
  margin: 0;
  width: 100%;
}
.hero-plein .img-hero {
  width: 100%;
  max-height: min(75vh, 44vw);
}
.hero-plein figcaption {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0.5rem var(--gouttiere) 0;
  font-size: var(--t-xs);
  color: var(--c-pruine-fonce);
}
@media (max-width: 700px) {
  .hero-plein .img-hero {
    max-height: none;
  }
}

/* --- En-tête --- */
.entete {
  background: var(--c-lait);
  border-bottom: 1px solid var(--c-granit);
}
.entete__ligne {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0.7rem var(--gouttiere);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.calice {
  flex: none;
}
.marque__texte {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.marque__nom {
  font-family: var(--f-titre);
  font-size: 1.45rem;
}
.marque__sous {
  font-size: var(--t-xs);
  color: var(--c-pruine-fonce);
}
.entete__bouton {
  display: none;
  font: inherit;
  font-size: var(--t-s);
  color: var(--c-encre);
  background: none;
  border: 1px solid var(--c-encre);
  padding: 0.3rem 0.9rem;
  cursor: pointer;
}
.navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.navigation a {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: var(--t-s);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.navigation a:hover,
.navigation a[aria-current='page'] {
  border-bottom-color: var(--c-framboise);
}
@media (max-width: 1040px) {
  .entete__bouton {
    display: block;
  }
  .navigation {
    display: none;
    width: 100%;
  }
  .navigation--ouverte {
    display: block;
  }
  .navigation ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }
}

/* --- Sections --- */
.section {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: var(--esp-section) var(--gouttiere) 0;
}
.section--frise {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}
.section__suite {
  margin-top: 1.5rem;
  font-size: var(--t-m);
}
.une,
.page__entete,
.page-simple {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--gouttiere) 0;
}
.une h1 {
  max-width: 17ch;
}
.page__chapo {
  max-width: 62ch;
  font-size: var(--t-l);
  line-height: 1.45;
}
.page__entete h1 {
  max-width: 24ch;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.75rem);
}
.page-simple {
  padding-bottom: var(--esp-section);
}
.page__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.1rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-pruine-fonce);
}
.ariane {
  font-size: var(--t-xs);
  margin-bottom: 0.9rem;
}
.ariane ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ariane li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--c-pruine-fonce);
}

/* --- Pastille colorée par fruit --- */
.pastille {
  display: inline-block;
  flex: none;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.15em;
  border-radius: 50%;
  background: var(--c-genet);
}
.pastille--mixte {
  background: var(--c-genet);
}
.pastille--myrtille {
  background: var(--c-encre);
  box-shadow: inset 0 0 0 2px var(--c-pruine);
}
.pastille--framboise {
  background: var(--c-framboise);
}
.pastille--cassis {
  background: #15132F;
}
.pastille--groseille {
  background: #D9607F;
}
.pastille--taille {
  background: var(--c-pruine-fonce);
}
.pastille--gel {
  background: var(--c-genet);
}

/* --- Frise de l'année : le geste fort du site --- */
.frise {
  margin: 0;
}
.frise__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.frise__table caption {
  font-family: var(--f-titre);
  font-size: var(--t-xl);
  line-height: 1.12;
  text-align: left;
  padding-bottom: 1rem;
}
.frise__coin {
  width: 11rem;
}
.frise thead th {
  padding: 0 0 0.45rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  text-align: left;
  border-bottom: 2px solid var(--c-encre);
}
.frise abbr {
  text-decoration: none;
  display: none;
}
.frise__mois-courant {
  color: var(--c-framboise);
  box-shadow: inset 0 -4px 0 var(--c-framboise);
}
.frise tbody th {
  padding: 0.3rem 0.75rem 0.3rem 0;
  font-weight: 600;
  font-size: var(--t-s);
  line-height: 1.2;
  text-align: left;
}
.frise tbody th a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}
.frise tbody th a:hover {
  text-decoration: underline;
}
.frise tbody td {
  padding: 0;
  height: 2.5rem;
}
.frise tbody tr {
  border-bottom: 1px solid var(--c-granit);
}
.frise__periode {
  vertical-align: middle;
}
.frise__barre {
  display: flex;
  align-items: center;
  min-height: 1.9rem;
  background: var(--c-pruine);
}
.frise__barre--framboise {
  background: var(--c-framboise);
}
.frise__barre--cassis {
  background: #15132F;
}
.frise__barre--groseille {
  background: #D9607F;
}
.frise__barre--myrtille {
  background: var(--c-pruine);
}
.frise__barre--taille {
  background: var(--c-pruine-fonce);
}
.frise__barre--gel {
  background: var(--c-genet);
}
.frise__libelle {
  padding-left: 0.6rem !important;
  color: var(--c-pruine-fonce);
}
.frise__texte {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  line-height: 1.15;
  white-space: nowrap;
}
.frise figcaption {
  margin-top: 0.8rem;
  max-width: 70ch;
  font-size: var(--t-s);
  color: var(--c-pruine-fonce);
}
/* Sur petit écran, les dates restent lisibles par un lecteur d'écran, la barre suffit à l'œil */
@media (max-width: 1040px) {
  .frise__coin {
    width: 6.5rem;
  }
  .frise__mois-long {
    display: none;
  }
  .frise abbr {
    display: inline;
  }
  .frise tbody th {
    font-size: var(--t-xs);
  }
  .frise__texte {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* --- Trois portes --- */
.portes {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--c-encre);
}
.portes li {
  flex: 1 1 0;
  min-width: 0;
}
.portes li + li {
  border-left: 1px solid var(--c-granit);
}
.portes a {
  display: block;
  height: 100%;
  padding: 1.25rem 1.5rem 1.5rem;
  text-decoration: none;
}
.portes li:first-child a {
  padding-left: 0;
}
.portes__titre {
  display: block;
  font-family: var(--f-titre);
  font-size: var(--t-xl);
  line-height: 1.12;
  margin-bottom: 0.4rem;
}
.portes a:hover .portes__titre {
  color: var(--c-framboise);
}
.portes__desc {
  display: block;
  color: var(--c-encre);
}
@media (max-width: 760px) {
  .portes {
    flex-direction: column;
  }
  .portes li + li {
    border-left: 0;
    border-top: 1px solid var(--c-granit);
  }
  .portes a {
    padding-left: 0;
  }
}

/* --- Cartes d'articles --- */
.grille-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  align-items: start;
  gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
}
.article-card[hidden] {
  display: none;
}
.article-card__lien {
  display: block;
  text-decoration: none;
}
.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.8rem;
  margin: 0.7rem 0 0.35rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-pruine-fonce);
}
.card__date {
  white-space: nowrap;
}
.article-card__titre {
  font-size: var(--t-l);
  margin-bottom: 0.35rem;
}
.article-card__lien:hover .article-card__titre {
  color: var(--c-framboise);
}
.article-card__resume {
  margin: 0;
  font-size: var(--t-s);
  line-height: 1.55;
  color: var(--c-encre);
}

/* --- Bandeau du plateau --- */
.bandeau-plateau {
  margin-top: var(--esp-section);
  background: var(--c-pruine-pale);
}
.bandeau-plateau__texte {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: var(--esp-section) var(--gouttiere);
}
.bandeau-plateau__texte p {
  max-width: 60ch;
}

/* --- Corps d'article --- */
.article-content {
  min-width: 0;
}
.page__corps {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--gouttiere) var(--esp-section);
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  justify-content: start;
  align-items: start;
}
.page__corps:not(:has(.article-sommaire)) > .prose {
  grid-column: 1 / -1;
}
.article-sommaire {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  font-size: var(--t-s);
  line-height: 1.35;
  border-top: 2px solid var(--c-encre);
  padding-top: 0.8rem;
}
.article-sommaire__titre {
  font-family: var(--f-titre);
  font-size: var(--t-m);
  margin-bottom: 0.6rem;
}
.article-sommaire ol {
  margin: 0;
  padding-left: 1.7rem;
}
.article-sommaire li {
  margin-bottom: 0.45rem;
}
.article-sommaire a {
  text-decoration: none;
}
.article-sommaire a:hover {
  text-decoration: underline;
}
@media (max-width: 960px) {
  .page__corps {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-sommaire {
    position: static;
    max-height: none;
  }
}
.prose {
  min-width: 0;
  max-width: var(--measure-article);
}
.prose h2 {
  margin-top: 2em;
  scroll-margin-top: 1rem;
}
.prose h3 {
  margin-top: 1.6em;
}
.prose > :first-child {
  margin-top: 0;
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose li::marker {
  color: var(--c-framboise);
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 4px solid var(--c-genet);
  font-size: var(--t-l);
  line-height: 1.4;
}
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: var(--t-s);
  line-height: 1.45;
}
.prose th,
.prose td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-granit);
}
.prose th {
  border-bottom: 2px solid var(--c-encre);
  font-weight: 600;
}
.prose figure {
  margin: 2em 0;
}
.prose figcaption {
  margin-top: 0.5rem;
  font-size: var(--t-s);
  line-height: 1.45;
  color: var(--c-pruine-fonce);
}
.encadre {
  margin: 1.8em 0;
  padding: 1.1rem 1.3rem;
  background: var(--c-pruine-pale);
}
.encadre > :last-child {
  margin-bottom: 0;
}
blockquote.journalist-question,
blockquote.expert-answer {
  font-size: 1rem !important;
  font-style: normal !important;
  font-family: var(--f-texte) !important;
  line-height: 1.7 !important;
}
blockquote.journalist-question {
  font-weight: 600;
  border-left-color: var(--c-framboise);
}
.fiche-expert {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--c-granit);
}
.fiche-expert p {
  margin: 0;
}
.fiche-expert img {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
}
.fiche-expert__nom {
  font-family: var(--f-titre);
  font-size: var(--t-l);
}
.fiche-expert__metier {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  margin-bottom: 0.4rem !important;
}
.avertissement {
  margin: 2em 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--c-framboise);
  background: var(--c-granit);
  font-size: var(--t-s);
}
.avertissement p {
  margin: 0;
}
.faq {
  margin-top: 2.5em;
}
.faq__item {
  border-top: 1px solid var(--c-granit);
}
.faq__item:last-child {
  border-bottom: 1px solid var(--c-granit);
}
.faq__item summary {
  padding: 0.75rem 0;
  font-weight: 600;
  cursor: pointer;
}
.faq__item p {
  margin-bottom: 1rem;
}
.sources {
  margin-top: 2.5em;
  font-size: var(--t-s);
}
.a-lire {
  margin-top: 2.5em;
}

/* --- Filtres du carnet --- */
.filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.filtres button {
  font: inherit;
  font-size: var(--t-s);
  padding: 0.3rem 0.8rem;
  color: var(--c-encre);
  background: none;
  border: 1px solid var(--c-encre);
  cursor: pointer;
}
.filtres button:hover {
  background: var(--c-granit);
}
.filtres button[aria-pressed='true'] {
  background: var(--c-encre);
  color: var(--c-lait);
}
.filtres__compte {
  margin: 0.7rem 0 1.5rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-pruine-fonce);
}

/* --- Formulaire --- */
.formulaire {
  display: grid;
  gap: 1.1rem;
  max-width: 40rem;
}
.champ label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--c-encre);
  background: #fff;
  border: 1px solid var(--c-pruine-fonce);
}
.champ__aide {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--t-s);
  color: var(--c-pruine-fonce);
}
.champ--case {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.champ--case input {
  width: auto;
  margin-top: 0.35rem;
}
.champ--case label {
  font-weight: 400;
}
.pot-de-miel {
  position: absolute;
  left: -9999px;
}
.bouton {
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  color: var(--c-lait);
  background: var(--c-encre);
  border: 0;
  cursor: pointer;
}
.bouton:hover {
  background: var(--c-framboise);
}
.bouton:disabled {
  opacity: 0.6;
}
.formulaire__retour--succes {
  color: var(--c-encre);
}
.formulaire__retour--erreur {
  color: var(--c-framboise);
}

/* --- Pied de page --- */
.pied {
  margin-top: var(--esp-section);
  padding: clamp(2rem, 5vw, 3.5rem) var(--gouttiere) 2rem;
  background: var(--c-encre);
  color: var(--c-lait);
  font-size: var(--t-s);
}
.bandeau-plateau + .pied,
main:has(> :last-child.bandeau-plateau) + .pied {
  margin-top: 0;
}
.pied a {
  color: var(--c-lait);
  text-decoration-color: var(--c-pruine);
}
.pied a:hover {
  color: var(--c-genet);
}
.pied__grille {
  max-width: calc(var(--largeur-max) - 2 * var(--gouttiere));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}
.pied__marque {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.pied ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied li {
  margin-bottom: 0.3rem;
}
.pied__independance,
.pied__copyright {
  max-width: calc(var(--largeur-max) - 2 * var(--gouttiere));
  margin: 1.5rem auto 0;
}
.pied__independance {
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-pruine-fonce);
}
.pied__copyright {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
}
@media (max-width: 760px) {
  .pied__grille {
    grid-template-columns: minmax(0, 1fr);
  }
}
