/* ==========================================================================
   L'Olive du Verger — page « Ouverture prochaine »
   Couleurs du site (template Agron) en clair et en sombre, mobile d'abord.
   ========================================================================== */

:root {
  --vert: #5b8c51;
  --vert-a11y: #496f41;        /* vert assombri : contraste AA sur blanc */
  --jaune: #eddd5e;
  --encre: #0a2803;
  --blanc: #ffffff;            /* texte sur photo ou vidéo, en clair comme en sombre */
  --surface: #ffffff;
  --surface-2: #edf2ec;
  --texte-fort: #0a2803;
  --texte-doux: #5c6672;
  --bordure: #cad2d2;
  --bordure-champ: #8c939b;
  --sur-vert: #ffffff;
  --danger: #b42318;
  --ombre-forte: 0 16px 40px rgb(0 0 0 / 0.16);
  --focus: #0a2803;
  --rayon: 8px;
  --rayon-lg: 16px;
  color-scheme: light;
}

/* Sombre : réglage du système, sauf choix contraire mémorisé */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --vert-a11y: #9ccb8d;
    --surface: #161f14;
    --surface-2: #1d2719;
    --texte-fort: #eef3ea;
    --texte-doux: #bfcab9;
    --bordure: #34402f;
    --bordure-champ: #7d8f76;
    --sur-vert: #0a2803;
    --danger: #ff8a80;
    --ombre-forte: 0 16px 40px rgb(0 0 0 / 0.6);
    --focus: #eddd5e;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --vert-a11y: #9ccb8d;
  --surface: #161f14;
  --surface-2: #1d2719;
  --texte-fort: #eef3ea;
  --texte-doux: #bfcab9;
  --bordure: #34402f;
  --bordure-champ: #7d8f76;
  --sur-vert: #0a2803;
  --danger: #ff8a80;
  --ombre-forte: 0 16px 40px rgb(0 0 0 / 0.6);
  --focus: #eddd5e;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--surface);
  color: var(--texte-fort);
  transition: background-color 0.2s ease, color 0.2s ease;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.masque {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Lien d'évitement */
.evitement {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 10;
  padding: 8px 16px;
  border-radius: var(--rayon);
  background-color: var(--encre);
  color: #ffffff;
  font-weight: 600;
  transition: top 0.15s ease;
}
.evitement:focus {
  top: 16px;
}

/* ---------- Mise en page : photo puis texte sur mobile, côte à côte dès 992 px ---------- */
.attente {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.attente:focus {
  outline: none;
}
@media (min-width: 992px) {
  .attente {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  }
}

.colonne-photo {
  position: relative;
  order: -1;
  height: 42vh;
  min-height: 280px;
  margin: 0;
}
@media (min-width: 992px) {
  .colonne-photo {
    order: 0;
    height: auto;
  }
}
.cadre-photo {
  position: relative;
  height: 100%;
  overflow: hidden;
  background-color: var(--encre);
}
.colonne-photo picture {
  display: block;
  height: 100%;
}
.colonne-photo img,
.colonne-photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.colonne-photo img {
  object-position: center 30%;
}
.colonne-photo video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.colonne-photo video.visible {
  opacity: 1;
}
.bouton-video {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--blanc);
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--encre) 72%, transparent);
  color: var(--blanc);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.bouton-video[hidden] {
  display: none;
}
.bouton-video:hover {
  background-color: var(--jaune);
  color: var(--encre);
}
.bouton-video:focus-visible {
  outline-color: var(--jaune);
  box-shadow: 0 0 0 8px var(--encre);
}
.bouton-video svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.bouton-video .icone-pause,
.bouton-video.lecture .icone-lecture {
  display: none;
}
.bouton-video.lecture .icone-pause {
  display: block;
}
@media (min-width: 992px) {
  .cadre-photo {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
}
.colonne-photo figcaption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  max-width: calc(100% - 92px);
  padding: 8px 16px;
  border-radius: 999px;
  background-color: rgb(10 40 3 / 0.72);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.colonne-texte {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px 16px 32px;
}
@media (min-width: 576px) {
  .colonne-texte {
    padding: 32px 32px 40px;
  }
}
@media (min-width: 992px) {
  .colonne-texte {
    padding: 48px clamp(32px, 6vw, 96px);
  }
}
.corps {
  max-width: 560px;
}

/* ---------- En-tête ---------- */
.haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.logo-texte {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nom {
  font-size: 19px;
  font-weight: 700;
}
.signature {
  font-size: 12px;
  color: var(--texte-doux);
}
.bascule-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--bordure-champ);
  border-radius: 50%;
  background: none;
  color: var(--texte-fort);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.bascule-theme:hover {
  border-color: var(--vert-a11y);
  background-color: var(--surface-2);
}
.bascule-theme svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.icone-soleil,
[data-sombre='true'] .icone-lune {
  display: none;
}
[data-sombre='true'] .icone-soleil {
  display: block;
}

/* ---------- Titre et accroche ---------- */
.surtitre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--vert-a11y);
}
.surtitre svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.chapo {
  margin: 0 0 24px;
  font-size: 18px;
  color: var(--texte-doux);
}

/* ---------- Compte à rebours (facultatif) ---------- */
.compte {
  margin: 0 0 24px;
}
.compte-titre {
  margin: 0 0 8px;
  font-weight: 600;
}
.compte-valeurs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 400px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compte-valeurs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px;
  border-radius: var(--rayon);
  background-color: var(--surface-2);
}
.compte-valeurs span {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.compte-valeurs small {
  font-size: 12px;
  color: var(--texte-doux);
}

/* ---------- Appel : l'action principale ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.appel {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 12px 12px;
  border-radius: 999px;
  background-color: var(--vert-a11y);
  color: var(--sur-vert);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appel:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-forte);
}
.icone-appel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--jaune);
  color: var(--encre);
}
.icone-appel svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.appel small {
  display: block;
  font-size: 14px;
}
.appel strong {
  display: block;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.copier {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--bordure-champ);
  border-radius: 999px;
  background: none;
  color: var(--texte-fort);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.copier:hover {
  border-color: var(--vert-a11y);
  background-color: var(--surface-2);
}
.copier svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.email {
  margin: 12px 0 0;
  color: var(--texte-doux);
}
.email a {
  font-weight: 600;
  color: var(--texte-fort);
  text-underline-offset: 3px;
}
.ouverture {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}
.ouverture:empty {
  display: none;
}
.ouverture::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bordure-champ);
}
.ouverture.ouvert::before {
  background-color: var(--vert-a11y);
}

/* ---------- Marchés ---------- */
.bloc {
  margin-top: 32px;
}
h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}
.marches {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marches li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--bordure);
}
.marches .jour {
  min-width: 88px;
  font-weight: 600;
}
.lieu {
  color: var(--texte-doux);
}
.marches .prochain {
  border-bottom-color: var(--vert-a11y);
}
.etiquette {
  padding: 0 8px;
  border-radius: 999px;
  background-color: var(--jaune);
  color: var(--encre);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
}

/* ---------- Formulaire ---------- */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
input[type='email'] {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--bordure-champ);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--texte-fort);
  font: inherit;
}
input[type='email']::placeholder {
  color: var(--texte-doux);
}
input[aria-invalid='true'] {
  border-color: var(--danger);
}
.bouton {
  min-height: 48px;
  padding: 8px 24px;
  border: 0;
  border-radius: 999px;
  background-color: var(--vert-a11y);
  color: var(--sur-vert);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.bouton:hover {
  background-color: var(--encre);
  color: #ffffff;
}
.bouton:disabled {
  opacity: 0.6;
  cursor: progress;
}
.retour {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
}
.retour.succes {
  color: var(--vert-a11y);
}
.retour:empty {
  display: none;
}

/* ---------- Citation ---------- */
.citation {
  margin: 32px 0 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--jaune);
}
.citation p {
  margin: 0;
  font-style: italic;
}
.citation footer {
  margin-top: 4px;
  font-size: 14px;
  color: var(--texte-doux);
}

/* ---------- Pied ---------- */
.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--bordure);
  font-size: 14px;
  color: var(--texte-doux);
}
.pied p {
  margin: 0;
}
.reseaux {
  display: flex;
  gap: 8px;
}
.reseau {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--bordure-champ);
  border-radius: 50%;
  color: var(--texte-fort);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.reseau:hover {
  border-color: var(--vert-a11y);
  background-color: var(--vert-a11y);
  color: var(--sur-vert);
}
.reseau svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.reseau:first-child svg {
  fill: currentColor;
  stroke: none;
}

/* ---------- Apparition douce ---------- */
.corps > * {
  animation: apparition 0.2s ease-out both;
}
@keyframes apparition {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
