@import url("variables.css");

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--farine);
  color: var(--encre);
  font-family: var(--police-corps);
  line-height: 1.6;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a { color: inherit; }

/* ---------- En-tête / navigation ---------- */

.bandeau-ecocert {
  background: var(--encre);
  color: var(--farine);
  font-family: var(--police-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.bandeau-ecocert-logo { width: 16px; height: 16px; flex-shrink: 0; }

.site-entete {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.6rem;
  background: var(--farine);
  border-bottom: 3px dotted var(--or-ble);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.site-logo-image {
  height: 42px;
  width: auto;
  display: block;
}
.site-logo-texte {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--encre);
}

.menu-bouton {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-bouton span {
  display: block;
  height: 2px;
  background: var(--encre);
  border-radius: 1px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-family: var(--police-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--encre);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.actif {
  border-color: var(--oxblood);
}

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--police-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--encre);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.actif,
.nav-dropdown.ouvert .nav-dropdown-toggle {
  border-bottom-color: var(--oxblood);
}
.nav-dropdown-fleche {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}
.nav-dropdown.ouvert .nav-dropdown-fleche { transform: rotate(180deg); }

.site-nav .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 0;
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  min-width: 190px;
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 8px;
  box-shadow: var(--ombre);
}
.nav-dropdown.ouvert .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li { width: 100%; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 5px;
  border-bottom: none !important;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.actif {
  background: var(--panneau);
}

.nav-cta {
  background: var(--oxblood);
  color: white !important;
  border-radius: 999px;
  padding: 0.5em 1.1em !important;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--oxblood-clair); }

/* ---------- Contenu générique ---------- */

.site-main { flex: 1; }

.page-entete {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.6rem 1.5rem;
  text-align: center;
}

.page-eyebrow {
  display: block;
  font-family: var(--police-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--vert-sauge);
  margin-bottom: 0.5rem;
}

.page-entete h1 {
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin: 0 0 0.7rem;
}

.page-entete p {
  font-size: 1.05rem;
  color: #6B5F52;
  margin: 0;
}

.contenu-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.6rem 5rem;
}

.contenu-page h2 {
  font-family: var(--police-titre);
  font-size: 1.5rem;
  margin: 2.2rem 0 0.8rem;
}
.contenu-page p { margin: 0 0 1rem; }

.route-pointillee {
  border: none;
  border-top: 3px dotted var(--or-ble);
  margin: 2.5rem 0;
}

.encart {
  background: var(--panneau);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}
.encart-note {
  font-size: 0.85rem;
  color: var(--vert-sauge);
  font-style: italic;
}

.bouton {
  display: inline-block;
  background: var(--oxblood);
  color: white;
  text-decoration: none;
  font-family: var(--police-corps);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease;
}
.bouton:hover { background: var(--oxblood-clair); }
.bouton:active { transform: scale(0.98); }
.bouton:disabled {
  background: #D8CFC0;
  color: #8A7D6B;
  cursor: not-allowed;
  transform: none;
}

.bouton-secondaire {
  background: transparent;
  color: var(--encre);
  border: 2px solid var(--encre);
}
.bouton-secondaire:hover { background: var(--encre); color: var(--farine); }

/* ---------- Accueil : mosaïque + panneau central ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr;
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
}

.mosaique {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: minmax(220px, 1fr);
  gap: 0;
  height: 100%;
  overflow: hidden;
}

.mosaique-tuile { position: relative; overflow: hidden; background: var(--panneau); }

.fit-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fit-picture-fondu {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
}
.fit-picture-fondu.visible { opacity: 1; }

.hero-panneau {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--farine);
}

.hero-eyebrow {
  font-family: var(--police-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--vert-sauge);
  margin-bottom: 0.8rem;
}

.hero-panneau h1 {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 1.2rem;
}

.hero-panneau .intro {
  font-size: 1.02rem;
  color: #6B5F52;
  max-width: 42ch;
  margin: 0 0 1.6rem;
}

.valeurs {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}
.valeurs li {
  font-size: 0.92rem;
  padding-left: 1.4rem;
  position: relative;
}
.valeurs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--oxblood);
}
.valeurs strong { color: var(--encre); }

.hero-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

/* ---------- Formulaire de contact ---------- */

.formulaire-contact {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.champ { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 500; }

.champ input,
.champ textarea {
  font-family: var(--police-corps);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ligne);
  border-radius: 6px;
  background: var(--panneau);
  resize: vertical;
}
.champ input:focus,
.champ textarea:focus {
  outline: none;
  border-color: var(--oxblood);
  background: white;
}

.formulaire-note {
  font-size: 0.78rem;
  color: var(--vert-sauge);
  text-align: center;
}

/* ---------- Cartes (fournisseurs / points de retrait) ---------- */

.grille-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.carte {
  background: var(--panneau);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}
.carte-produit-photo {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.carte-produit-image {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.carte-produit-texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.carte-titre { font-weight: 600; display: block; margin-bottom: 0.3rem; }
.carte-detail { font-size: 0.85rem; color: #6B5F52; }
.carte-detail + .carte-detail { margin-top: 0.15rem; }
.carte-horaires {
  font-family: var(--police-mono);
  font-size: 0.78rem;
  color: var(--vert-sauge);
  margin-top: 0.4rem;
  display: block;
}

.lien-maps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.4em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--oxblood);
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease;
}
.lien-maps:hover { background: var(--or-clair); color: var(--encre); }

.carte-lien {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--oxblood);
  text-decoration: none;
}
.carte-lien:hover { text-decoration: underline; }

.point-dates-detail {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0 0;
  border-top: 1px dashed var(--ligne);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.point-dates-detail li {
  font-family: var(--police-mono);
  font-size: 0.75rem;
  color: #6B5F52;
}
.point-dates-plus { font-style: italic; color: var(--vert-sauge) !important; }

.alerte {
  background: var(--panneau);
  border: 1px solid var(--ligne);
  color: var(--encre);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  max-width: 760px;
  margin: 1rem auto;
}
.alerte-centree { text-align: center; }

/* ---------- Pied de page ---------- */

.site-pied {
  background: var(--encre);
  color: var(--farine);
  padding: 2.5rem 1.6rem 1.5rem;
}
.pied-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(254, 247, 234, 0.2);
}
.pied-titre {
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 1.15rem;
  display: block;
}
.pied-baseline { color: var(--panneau); font-size: 0.85rem; margin: 0.3rem 0 0; }
.pied-badge-ecocert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-family: var(--police-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--panneau);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.3em 0.8em;
}
.pied-badge-ecocert-logo { width: 14px; height: 14px; flex-shrink: 0; }

.badge-ecocert {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--panneau);
  border: 1px solid var(--or-ble);
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  margin: 0.4rem 0 1.2rem;
}
.badge-ecocert-titre { font-weight: 700; color: var(--encre); }
.badge-ecocert-numero { font-family: var(--police-mono); font-size: 0.78rem; color: var(--vert-sauge); }


.pied-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; }
.pied-nav a {
  text-decoration: none;
  font-family: var(--police-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--panneau);
}
.pied-nav a:hover { color: white; }

.pied-legal {
  max-width: 980px;
  margin: 0.8rem auto 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.pied-legal a {
  font-size: 0.72rem;
  color: var(--panneau);
  opacity: 0.7;
  text-decoration: none;
}
.pied-legal a:hover { opacity: 1; text-decoration: underline; }

.pied-copyright {
  max-width: 980px;
  margin: 1.2rem auto 0;
  font-size: 0.72rem;
  color: var(--panneau);
  opacity: 0.7;
}

.table-rgpd {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}
.table-rgpd th, .table-rgpd td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--ligne);
  vertical-align: top;
}
.table-rgpd th {
  font-family: var(--police-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--vert-sauge);
}

/* ---------- Responsive ---------- */

/* Page d'accueil uniquement : header + héro + footer tiennent exactement
   dans la hauteur de la fenêtre, sans défilement. Les autres pages
   défilent normalement (ce n'est pas souhaitable pour du contenu long). */
body.page-accueil {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.page-accueil .site-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.page-accueil .hero {
  flex: 1;
  min-height: 0;
  height: auto;
}
body.page-accueil .hero-panneau {
  overflow-y: auto;
}
body.page-accueil .site-pied {
  flex-shrink: 0;
  padding: 1rem 1.6rem;
}
body.page-accueil .pied-inner {
  padding-bottom: 0.8rem;
}
body.page-accueil .pied-copyright {
  margin-top: 0.6rem;
}

@media (max-width: 900px) {
  body.page-accueil { height: auto; overflow: visible; }
  body.page-accueil .site-main { display: block; overflow: visible; }

  .hero { grid-template-columns: 1fr; height: auto; }
  .mosaique { display: none; }
  .hero-panneau { padding: 3rem 1.5rem; min-height: calc(100vh - 68px); }

  .menu-bouton { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--farine);
    border-bottom: 3px dotted var(--or-ble);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.ouvert { max-height: 420px; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.6rem 1.2rem;
  }
  .site-nav li { width: 100%; padding: 0.5rem 0; }
  .nav-cta { display: inline-block; margin-top: 0.5rem; }

  .nav-dropdown-toggle { padding: 0.5rem 0; width: 100%; justify-content: space-between; }
  .site-nav .nav-dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--ligne);
    border-radius: 0;
    margin-left: 0.6rem;
    padding: 0.2rem 0 0.2rem 0.8rem;
    min-width: 0;
  }
  .nav-dropdown.ouvert .nav-dropdown-menu { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fit-picture-fondu { transition: none; }
}

/* ---------- Page Actu ---------- */

.contenu-actu {
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

.colonne-posts { display: flex; flex-direction: column; gap: 1.6rem; }

.post-actu {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--ombre);
}

.post-actu-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.post-actu-corps { padding: 1.2rem 1.4rem 1.4rem; }

.post-actu-date {
  font-family: var(--police-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vert-sauge);
}

.post-actu-titre {
  font-family: var(--police-titre);
  font-size: 1.3rem;
  margin: 0.3rem 0 0.6rem;
}

.post-actu-contenu {
  font-size: 0.95rem;
  color: #4A3F33;
  line-height: 1.65;
}

.colonne-facebook {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.facebook-titre {
  font-family: var(--police-titre);
  font-size: 1.2rem;
  align-self: flex-start;
  margin: 0;
}

.facebook-embed {
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--ligne);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--ombre);
}
.facebook-consentement {
  padding: 1.4rem 1.2rem;
  text-align: center;
  background: var(--panneau);
}
.facebook-consentement p {
  font-size: 0.82rem;
  color: var(--vert-sauge);
  margin: 0 0 0.9rem;
}

.lien-facebook { width: 100%; text-align: center; }

@media (max-width: 900px) {
  .contenu-actu { grid-template-columns: 1fr; }
  .colonne-facebook { position: static; }
}

/* ---------- Calendrier public (page Actu) ---------- */

.contenu-calendrier {
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 1rem;
}

.calendrier-public {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: var(--ombre);
}

.calendrier-nav-mois {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
}
.calendrier-nav-btn { padding: 0.4rem 0.9rem; }
.calendrier-mois-titre {
  font-family: var(--police-titre);
  font-size: 1.15rem;
  text-transform: capitalize;
  min-width: 12ch;
  text-align: center;
}

.calendrier-jours-semaine {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--police-mono);
  font-size: 0.7rem;
  color: var(--vert-sauge);
  margin-bottom: 0.4rem;
}

.calendrier-grille-public {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.calendrier-case-publique {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.85rem;
  position: relative;
}
.calendrier-case-vide { visibility: hidden; }
.calendrier-case-aujourdhui { border: 2px solid var(--oxblood); }

.calendrier-case-passee {
  opacity: 0.4;
  background: var(--panneau);
}
.calendrier-case-passee .calendrier-jour-numero-public { color: #8A7D6B; }
.calendrier-case-publique.a-un-evenement { background: var(--panneau); cursor: default; }
.calendrier-case-publique.a-un-evenement-annule { background: #F1EAE0; cursor: default; }

.calendrier-pastille-evenement {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oxblood);
  display: inline-block;
}
.calendrier-pastille-evenement.pastille-annulee {
  background: transparent;
  border: 1.5px solid #B3432B;
  opacity: 0.6;
}

.calendrier-jour-numero-public { color: var(--encre); }

/* ---------- Bulle d'information au survol d'un jour ---------- */

.calendrier-info-bulle {
  display: none;
  position: absolute;
  bottom: 100%;
  padding-bottom: 12px; /* comble l'espace mort : la zone de survol touche la case */
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  text-align: left;
  cursor: default;
}
.calendrier-info-bulle-contenu {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 8px;
  box-shadow: var(--ombre);
  padding: 0.7rem 0.8rem;
  min-width: 190px;
  max-width: 240px;
  position: relative;
}
.calendrier-info-bulle-contenu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: white;
}

.calendrier-case-publique:hover .calendrier-info-bulle,
.calendrier-case-publique:focus-within .calendrier-info-bulle,
.calendrier-case-publique:focus .calendrier-info-bulle,
.calendrier-info-bulle.bulle-visible {
  display: block;
}

.bulle-evenement + .bulle-evenement {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--ligne);
}
.bulle-evenement strong {
  display: block;
  font-family: var(--police-titre);
  font-size: 0.85rem;
  color: var(--encre);
}
.bulle-evenement span {
  display: block;
  font-size: 0.76rem;
  color: #6B5F52;
  margin-top: 0.1rem;
}
.bulle-horaire { font-family: var(--police-mono); color: var(--vert-sauge) !important; }
.bulle-annule-tag {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #B3432B !important;
}
.bulle-evenement-annule strong { text-decoration: line-through; color: #8A7D6B; }

.bulle-liens-action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.bulle-liens-action a {
  font-family: var(--police-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--oxblood) !important;
  text-decoration: underline;
}
.bulle-liens-action a:hover { color: var(--oxblood-clair) !important; }

.bulle-liens-action a.lien-commander-fort,
.agenda-bulle-actions a.lien-commander-fort {
  background: var(--oxblood) !important;
  color: white !important;
  padding: 0.25em 0.6em !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}
.bulle-liens-action a.lien-commander-fort:hover,
.agenda-bulle-actions a.lien-commander-fort:hover { background: var(--oxblood-clair) !important; }

@media (max-width: 500px) {
  .calendrier-info-bulle { min-width: 160px; max-width: 200px; font-size: 0.9em; }
}

.agenda-public {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.agenda-public h2 {
  font-family: var(--police-titre);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  flex: 0 0 auto;
}

.agenda-liste {
  list-style: none;
  margin: 0;
  padding: 0 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.agenda-item {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}

.agenda-date {
  font-family: var(--police-mono);
  font-size: 0.8rem;
  color: var(--oxblood);
  font-weight: 700;
  min-width: 3.2em;
}

.agenda-details { display: flex; flex-direction: column; font-size: 0.85rem; position: relative; cursor: default; }

.agenda-bulle-actions {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  position: absolute;
  top: 0;
  right: 100%;
  margin-right: 8px;
  z-index: 30;
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 8px;
  box-shadow: var(--ombre);
  padding: 0.5rem 0.6rem;
  min-width: 180px;
  white-space: nowrap;
}
/* Une fois déplacée dans <body> (voir bulles.js) : sort du calcul de mise en
   page normal, positionnée en pixels absolus par rapport à la fenêtre, pour
   échapper au défilement interne de .agenda-liste qui la coupait sinon. */
.agenda-bulle-actions.bulle-echappee {
  position: fixed;
  z-index: 200;
  right: auto;
  margin-right: 0;
}
.agenda-details:hover .agenda-bulle-actions,
.agenda-details:focus-within .agenda-bulle-actions,
.agenda-details:focus .agenda-bulle-actions,
.agenda-bulle-actions.bulle-visible {
  display: flex;
}
.agenda-bulle-actions a {
  font-family: var(--police-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--oxblood) !important;
  text-decoration: none;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
}
.agenda-bulle-actions a:hover { background: var(--panneau); }
.agenda-details strong { color: var(--encre); }
.agenda-details span { color: #6B5F52; font-size: 0.8rem; }
.agenda-horaire { font-family: var(--police-mono); color: var(--vert-sauge) !important; }

@media (max-width: 900px) {
  .contenu-calendrier { grid-template-columns: 1fr; }
  .agenda-bulle-actions {
    top: 100%;
    right: auto;
    left: 0;
    margin-right: 0;
    margin-top: 6px;
    white-space: normal;
  }
}

/* ---------- Aperçu photo au survol d'un produit ---------- */

/* Vignette visible en permanence sur les appareils tactiles (pas de survol
   possible) — masquée par défaut, le survol suffit sur ordinateur. */
.produit-miniature-tactile {
  display: none;
}
@media (hover: none) {
  .produit-miniature-tactile {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.6rem;
  }
}

.apercu-produit {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  width: 220px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--ombre);
  border: 3px solid white;
  background: white;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.apercu-produit.visible { opacity: 1; transform: scale(1); }
.apercu-produit img { display: block; width: 100%; height: 220px; object-fit: cover; }

/* ---------- Compte client (connexion/inscription) ---------- */

.onglets-compte {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.onglet-compte-bouton {
  font-family: var(--police-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: 0.55em 1.2em;
  cursor: pointer;
  color: var(--encre);
}
.onglet-compte-bouton.actif { background: var(--encre); color: var(--farine); border-color: var(--encre); }

.formulaire-compte {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

/* ---------- Historique de commandes (espace client) ---------- */

.liste-commandes-client {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1rem;
}

.carte-commande-client {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  box-shadow: var(--ombre);
}

.carte-commande-client-entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.carte-commande-client-numero {
  display: block;
  font-family: var(--police-mono);
  font-weight: 700;
  font-size: 0.9rem;
}
.carte-commande-client-date {
  display: block;
  font-size: 0.8rem;
  color: var(--vert-sauge);
}

.badge-statut-client {
  font-family: var(--police-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  background: var(--panneau);
  color: var(--encre);
  white-space: nowrap;
}
.badge-statut-en_attente { background: var(--or-clair); }
.badge-statut-acceptee { background: #C9E4B8; }
.badge-statut-prete { background: #A8D8C0; }
.badge-statut-retiree { background: #D8CFC0; color: #6B5F52; }
.badge-statut-refusee,
.badge-statut-annulee { background: #F5C6C6; }
.badge-statut-info_demandee { background: #F5D9A8; }

.carte-commande-client-point {
  font-size: 0.85rem;
  color: #6B5F52;
  margin: 0 0 0.6rem;
}
.carte-commande-client-message {
  background: var(--panneau);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin: 0 0 0.8rem;
}

.carte-commande-client-lignes {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
}
.carte-commande-client-lignes li { display: flex; justify-content: space-between; }

.carte-commande-client-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ligne);
}
.carte-commande-client-total-reel {
  color: #4C7A3D;
  border-top: none;
  padding-top: 0.2rem;
}
.carte-commande-client-tva {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.76rem;
  color: var(--vert-sauge);
  margin-top: 0.3rem;
}

.carte-commande-client-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ligne);
}

.bouton-mini {
  display: inline-block;
  font-family: var(--police-corps);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--oxblood);
  color: white;
}
.bouton-mini:hover { background: var(--oxblood-clair); }
.bouton-mini-secondaire { background: white; color: var(--encre); border: 1px solid var(--ligne); }
.bouton-mini-secondaire:hover { border-color: var(--oxblood); background: white; }
.bouton-mini-danger { background: white; color: #B4453A; border: 1px solid #E8B8B0; }
.bouton-mini-danger:hover { background: #FBEAE3; }

.suppression-compte {
  border: 1px solid #E8B8B0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: #FBEAE3;
}
.suppression-compte summary {
  cursor: pointer;
  font-weight: 600;
  color: #B4453A;
}
.suppression-compte-contenu {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 420px;
}

/* ---------- Mes préférences (comptes clients) ---------- */

.preferences-compte {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 480px;
}

.carte-preference {
  background: white;
  border: 1px solid var(--ligne);
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  box-shadow: var(--ombre);
}
.carte-preference h2 {
  font-family: var(--police-titre);
  font-size: 1.05rem;
  margin: 0 0 0.7rem;
}
.carte-preference h3 {
  font-family: var(--police-corps);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.2rem;
}
.carte-preference .champ:last-child { margin-bottom: 0; }

.preference-sous-groupe {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.preference-sous-groupe-separee {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--ligne);
}

.carte-preference-rgpd {
  max-width: 480px;
  margin-top: 1.5rem;
}
