/* Huile d'Olive Extra Vierge — feuille de style commune (FR / EN / ES) */
:root {
  --olive-nuit: #23301a;   /* vert profond (texte, en-tête) */
  --olive: #55682e;        /* vert feuille (liens, titres secondaires) */
  --argent: #b9c2a6;       /* revers argenté des feuilles */
  --pierre: #f2f3ec;       /* fond calcaire */
  --blanc: #fdfdf9;
  --or: #c59b21;           /* or de l'huile */
  --terre: #9a4a2c;        /* terre rouge andalouse, usage ponctuel */
  --texte: #26291f;
  --texte-doux: #5a5f4e;
  --rayon: 6px;
  --mesure: 70ch;
  --entete: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--entete) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pierre);
  color: var(--texte);
  font: 1.0625rem/1.65 "Alegreya Sans", "Segoe UI", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive); text-underline-offset: .18em; }
a:hover { color: var(--terre); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: "Alegreya", Georgia, serif; color: var(--olive-nuit); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.35rem; margin: 1.6em 0 .4em; }
h4 { font-size: 1.12rem; margin: 1.3em 0 .3em; }
p { margin: 0 0 1em; }
.saut { position: absolute; left: -9999px; }
.saut:focus { left: 1rem; top: .5rem; z-index: 100; background: var(--blanc); padding: .5rem 1rem; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--olive-nuit); color: var(--blanc);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.entete-int {
  max-width: 1200px; margin: 0 auto; height: var(--entete);
  display: flex; align-items: center; gap: 1rem; padding: 0 16px;
}
.marque { display: flex; align-items: center; gap: .6rem; color: var(--blanc); text-decoration: none; margin-right: auto; }
.marque svg { width: 34px; height: 34px; flex: none; }
.marque span { font-family: "Alegreya", Georgia, serif; font-size: 1.15rem; line-height: 1.1; }
.marque small { display: block; font-family: "Alegreya Sans", sans-serif; font-size: .78rem; color: var(--argent); }
.marque:hover { color: var(--blanc); }

.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.nav li { position: relative; }
.nav a, .nav button {
  display: block; color: var(--blanc); text-decoration: none; font: inherit; font-size: .98rem;
  background: none; border: 0; padding: .55rem .75rem; border-radius: var(--rayon); cursor: pointer;
}
.nav a:hover, .nav button:hover, .nav [aria-current="page"] { background: rgba(185,194,166,.18); color: var(--blanc); }
.nav button::after { content: ""; display: inline-block; margin-left: .35rem; border: 4px solid transparent; border-top-color: currentColor; vertical-align: middle; transform: translateY(2px); }
.sous {
  list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; left: 0; min-width: 15rem;
  background: var(--blanc); border-radius: var(--rayon); box-shadow: 0 10px 30px rgba(35,48,26,.25);
  display: none;
}
.sous a { color: var(--texte); }
.sous a:hover, .sous [aria-current="page"] { background: var(--pierre); color: var(--olive-nuit); }
.nav li.ouvert > .sous { display: block; }
@media (hover: hover) and (min-width: 961px) { .nav li:hover > .sous, .nav li:focus-within > .sous { display: block; } }

.langues { display: flex; gap: .25rem; }
.langues a {
  color: var(--argent); text-decoration: none; font-size: .85rem; letter-spacing: .02em;
  padding: .3rem .45rem; border: 1px solid rgba(185,194,166,.35); border-radius: var(--rayon);
}
.langues a[aria-current="true"] { color: var(--olive-nuit); background: var(--argent); border-color: var(--argent); }
.langues a:hover { color: var(--blanc); border-color: var(--blanc); }

.menu-bouton { display: none; background: none; border: 1px solid rgba(185,194,166,.4); color: var(--blanc); border-radius: var(--rayon); padding: .45rem .6rem; font: inherit; cursor: pointer; }

@media (max-width: 960px) {
  .menu-bouton { display: block; }
  .nav { position: fixed; inset: var(--entete) 0 auto 0; background: var(--olive-nuit); max-height: calc(100vh - var(--entete)); overflow: auto; display: none; padding: .5rem 16px 1.2rem; }
  .nav.ouvert { display: block; }
  .nav > ul { flex-direction: column; }
  .sous { position: static; display: block; background: none; box-shadow: none; padding: 0 0 .4rem 1rem; }
  .sous a { color: var(--argent); }
  .sous a:hover, .sous [aria-current="page"] { background: rgba(185,194,166,.18); color: var(--blanc); }
  .nav button::after { display: none; }
  .nav button { padding-bottom: .2rem; color: var(--or); cursor: default; }
}

/* ---------- Bandeau de page ---------- */
.bandeau {
  position: relative; color: var(--blanc);
  min-height: clamp(170px, 22vw, 280px); display: flex; align-items: flex-end;
  background: var(--olive-nuit) center / cover no-repeat;
}
.bandeau::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,48,26,0) 25%, rgba(35,48,26,.78) 100%); }
.bandeau-int { position: relative; max-width: 1200px; width: 100%; margin: 0 auto; padding: 1.5rem 16px 1.4rem; }
.bandeau h1 { color: var(--blanc); margin: 0; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.bandeau p { margin: .3rem 0 0; color: #eef0e6; font-size: 1.1rem; max-width: 60ch; }
.page-accueil .bandeau { min-height: clamp(300px, 46vw, 520px); }
.page-accueil .bandeau h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.4rem); }

/* ---------- Corps ---------- */
.corps {
  max-width: 1200px; margin: 0 auto; padding: 2.2rem 16px 3rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.5rem; align-items: start;
}
.contenu { min-width: 0; }
.contenu > section { background: var(--blanc); border-radius: var(--rayon); padding: clamp(1.2rem, 1rem + 1.5vw, 2.2rem); }
.contenu > section > * { max-width: var(--mesure); }
.contenu > section > table, .contenu > section > .tableau, .contenu > section > .galerie, .contenu > section > .graphique, .contenu > section > figure.large { max-width: none; }
.contenu ul, .contenu ol { padding-left: 1.3rem; margin: 0 0 1em; }
.contenu li { margin-bottom: .35em; }
.contenu ol > li::marker { font-family: "Alegreya", serif; font-weight: 700; color: var(--olive); }

/* languette panoramique entre deux sections */
.languette {
  height: clamp(90px, 12vw, 150px); margin: 1.6rem 0; border-radius: var(--rayon);
  background: center / cover no-repeat;
}

.encadre { border-left: 4px solid var(--or); background: #faf6e6; padding: 1rem 1.2rem; border-radius: 0 var(--rayon) var(--rayon) 0; margin: 1.2rem 0; }
.encadre h4 { margin-top: 0; }

.fig-texte { margin: .3rem 0 1rem; }
.fig-droite { float: right; margin: .3rem 0 1rem 1.4rem; max-width: 42%; }
.fig-gauche { float: left; margin: .3rem 1.4rem 1rem 0; max-width: 42%; }
.fig-texte img, .fig-droite img, .fig-gauche img { border-radius: var(--rayon); }
figcaption { font-size: .9rem; color: var(--texte-doux); margin-top: .35rem; }
.nettoyer { clear: both; }
@media (max-width: 640px) { .fig-droite, .fig-gauche { float: none; max-width: 100%; margin: .5rem 0 1rem; } }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.galerie figure { margin: 0; }
.galerie img { border-radius: var(--rayon); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.galerie.contenir img { object-fit: contain; background: var(--pierre); }

/* tableaux */
.tableau { overflow-x: auto; margin: 1rem 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--blanc); }
caption { text-align: left; font-family: "Alegreya", serif; font-size: 1.05rem; color: var(--olive-nuit); padding-bottom: .5rem; }
th, td { padding: .5rem .6rem; border-bottom: 1px solid #dfe2d4; text-align: left; vertical-align: top; }
thead th { background: var(--olive-nuit); color: var(--blanc); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody th { font-weight: 700; color: var(--olive-nuit); }
.source { font-size: .85rem; color: var(--texte-doux); }

/* graphique à barres en HTML */
.graphique { margin: 1rem 0 1.4rem; }
.barre { display: grid; grid-template-columns: 9rem 1fr 4.5rem; gap: .6rem; align-items: center; margin: .35rem 0; font-size: .95rem; }
.barre .jauge { height: 1.1rem; background: var(--pierre); border-radius: 3px; overflow: hidden; }
.barre .jauge span { display: block; height: 100%; background: var(--olive); }
.barre.mise-en-avant .jauge span { background: var(--or); }
.barre .val { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .barre { grid-template-columns: 6.5rem 1fr 3.8rem; } }

/* pictogrammes de saveur */
.saveurs { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; padding: 0; list-style: none; }
.saveurs li { display: flex; align-items: center; gap: .5rem; }
.picto { width: 28px; height: 28px; flex: none; }
.picto.intense { color: #b3261e; } .picto.aromatique { color: #1f8a85; } .picto.douce { color: #d9a400; }

/* vignettes variétés */
.varietes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; list-style: none; padding: 0 !important; }
.varietes li { position: relative; margin: 0; }
.varietes img { border-radius: var(--rayon); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.varietes .picto { position: absolute; top: 6px; left: 6px; background: var(--blanc); border-radius: 50%; padding: 3px; width: 30px; height: 30px; }
.varietes .drapeau { position: absolute; top: 8px; right: 8px; width: 26px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.varietes strong { display: block; margin-top: .35rem; font-family: "Alegreya", serif; color: var(--olive-nuit); }

/* questions de l'accueil */
.questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem 2rem; }
.questions h3 { margin-top: .4rem; font-size: 1.2rem; }
.questions ul { list-style: none; padding: 0; }
.questions li { padding: .35rem 0; border-bottom: 1px solid #e3e6d8; }
.questions a { text-decoration: none; color: var(--texte); }
.questions a:hover { color: var(--olive); text-decoration: underline; }

/* ---------- Colonne latérale ---------- */
.rail { position: sticky; top: calc(var(--entete) + 1rem); display: grid; gap: 1rem; }
.a-retenir {
  font-family: "Alegreya", Georgia, serif; font-size: 1.2rem; line-height: 1.35; color: var(--olive-nuit);
  border-top: 3px solid var(--or); padding-top: .8rem; margin: 0;
}
.rail figure { margin: 0; }
.rail img { border-radius: var(--rayon); width: 100%; }
.rail figcaption a { text-decoration: none; }
.rail .liens-rail { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.rail .liens-rail a { display: grid; grid-template-columns: 64px 1fr; gap: .7rem; align-items: center; text-decoration: none; color: var(--olive-nuit); font-weight: 600; }
.rail .liens-rail img { width: 64px; height: 48px; object-fit: cover; }
@media (max-width: 960px) {
  .corps { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .a-retenir, .rail .liens-rail { grid-column: 1 / -1; }
}

/* ---------- Pied de page ---------- */
.pied { background: var(--olive-nuit) bottom center / cover no-repeat; color: var(--argent); position: relative; }
.pied::before { content: ""; position: absolute; inset: 0; background: rgba(35,48,26,.88); }
.pied-int { position: relative; max-width: 1200px; margin: 0 auto; padding: 2.4rem 16px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.pied h2 { color: var(--blanc); font-size: 1.1rem; margin-bottom: .6rem; }
.pied a { color: var(--blanc); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .3rem; }
.pied .partenaire img { width: 150px; border-radius: var(--rayon); }
.pied .mention { grid-column: 1 / -1; border-top: 1px solid rgba(185,194,166,.25); padding-top: 1rem; font-size: .88rem; }
@media (max-width: 760px) { .pied-int { grid-template-columns: 1fr; } }

/* ---------- Impression ---------- */
@media print {
  .entete, .rail, .pied, .languette { display: none; }
  .bandeau { min-height: 0; color: #000; background: none !important; }
  .bandeau::before { display: none; }
  .bandeau h1 { color: #000; text-shadow: none; }
  .corps { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.picto { object-fit: contain; }
.note { display: inline-flex; gap: 2px; vertical-align: middle; }
.note img { width: 18px; height: 16px; }
.tableau th a { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.tableau th img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--rayon); flex: none; }
h3 .picto { display: inline-block; vertical-align: -6px; margin-right: .3rem; }
td .picto { display: inline-block; }
.graphique-titre { font-family: "Alegreya", serif; color: var(--olive-nuit); margin-bottom: .4rem; }

@media (max-width: 600px) {
  .marque small { display: none; }
  .marque span { font-size: 1rem; }
  .langues a { padding: .25rem .35rem; }
  .entete-int { gap: .6rem; }
}
