/* ============================================================
   L'Oustaù de Greù — Éditorial Luxe · Terroir raffiné
   Lin · Olive profond · Or vieilli
   ============================================================ */

:root {
  --linen: #efe9da;
  --linen-2: #e6ddc9;
  --paper: #fbf8f1;
  --ink: #2a2820;
  --muted: #7d7466;
  --olive: #3b4a31;
  --olive-2: #4c6040;
  --olive-deep: #2a3524;
  --gold: #b08d4c;
  --gold-deep: #937135;
  --line: rgba(59, 74, 49, 0.16);
  --line-soft: rgba(59, 74, 49, 0.09);
  --shell: rgba(59, 74, 49, 0.045);
  --ok: #3f7d46; --ok-bg: #e8f1e2;
  --err: #a5432a; --err-bg: #f5e6de;

  --r-lg: 26px; --r-md: 16px; --r-sm: 11px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --shadow-soft: 0 1px 2px rgba(42, 40, 32, .04), 0 22px 48px -30px rgba(42, 40, 32, .45);
  --shadow-lift: 0 2px 4px rgba(42, 40, 32, .05), 0 34px 60px -34px rgba(42, 40, 32, .5);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--linen);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grain de papier (fixe, non interactif) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 2.5rem 1.25rem 8rem; }

/* ============ HERO ============ */
header.site {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem clamp(2.4rem, 5vw, 3.4rem);
  background:
    radial-gradient(90% 120% at 20% -10%, rgba(176, 141, 76, .16), transparent 55%),
    radial-gradient(80% 120% at 100% 0%, rgba(59, 74, 49, .12), transparent 52%),
    linear-gradient(180deg, var(--paper), var(--linen));
  border-bottom: 1px solid var(--line-soft);
}
header.site .eyebrow {
  display: inline-block; font-size: .68rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 700;
  padding: .4rem .95rem; border: 1px solid rgba(176, 141, 76, .4); border-radius: 999px;
  margin-bottom: 1.3rem; background: rgba(251, 248, 241, .5);
}
header.site h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(2.3rem, 6.5vw, 4rem); line-height: 1.02; margin: 0;
  color: var(--olive-deep);
}
header.site h1 em { font-style: italic; color: var(--gold-deep); font-weight: 400; }
header.site p {
  margin: 1rem auto 0; max-width: 32rem; color: var(--muted);
  font-size: clamp(.98rem, 2.4vw, 1.1rem);
}
header.site .ornement {
  width: 54px; height: 1px; margin: 1.5rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
}
header.site .ornement::after {
  content: "❦"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--gold); font-size: .95rem; background: var(--linen); padding: 0 .5rem;
}

/* Animation « tchin » — deux verres qui s'entrechoquent */
.tchin { margin: 0 auto .6rem; }
.tchin svg { width: clamp(120px, 30vw, 158px); height: auto; display: block; margin: 0 auto; overflow: visible; }
.verre-g, .verre-d, .etincelle { transform-box: view-box; }
.verre-g { transform-origin: 72px 120px; }
.verre-d { transform-origin: 128px 120px; }
.etincelle { transform-origin: 100px 46px; opacity: 0; }
.tchin.anim .verre-g { animation: tchinG 1.6s var(--ease) both; }
.tchin.anim .verre-d { animation: tchinD 1.6s var(--ease) both; }
.tchin.anim .etincelle { animation: tchinEtincelle 1.6s ease both; }

@keyframes tchinG {
  0% { transform: rotate(0deg); }
  32% { transform: rotate(12deg); }
  42% { transform: rotate(14deg); }
  52% { transform: rotate(10deg); }
  66% { transform: rotate(13deg); }
  100% { transform: rotate(0deg); }
}
@keyframes tchinD {
  0% { transform: rotate(0deg); }
  32% { transform: rotate(-12deg); }
  42% { transform: rotate(-14deg); }
  52% { transform: rotate(-10deg); }
  66% { transform: rotate(-13deg); }
  100% { transform: rotate(0deg); }
}
@keyframes tchinEtincelle {
  0%, 36% { opacity: 0; transform: scale(.2); }
  44% { opacity: 1; transform: scale(1.1); }
  60% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ============ INTRO CINÉMATIQUE (page d'accès) ============ */
.intro { position: relative; height: 165vh; z-index: 5; }
.intro-sticky {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(176, 141, 76, .16), transparent 72%),
    radial-gradient(90% 70% at 50% 120%, rgba(59, 74, 49, .1), transparent 60%),
    linear-gradient(180deg, var(--paper), var(--linen));
}
.intro-verres {
  position: relative; width: 100%; height: 100%; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: clamp(1vmin, 3vw, 6vmin);
  will-change: opacity;
}
.verre-geant { position: relative; height: 62vmin; max-height: 560px; transform-origin: 50% 88%; will-change: transform; }
.verre-anim { height: 100%; transform-origin: 50% 88%; }
.verre-svg { height: 100%; width: auto; display: block; overflow: visible; filter: drop-shadow(0 20px 34px rgba(42, 40, 32, .3)); }

/* Le verre s'incline autour de son pied ; le vin contre-pivote (même pivot)
   pour rester à niveau, avec un léger ballant → vraie sensation de liquide. */
.verre-tilt, .liquide { transform-box: view-box; transform-origin: 60px 190px; }
.js .verre-geant.gauche .verre-tilt { animation: clinkTiltG 1.6s var(--ease) both; }
.js .verre-geant.droite .verre-tilt { animation: clinkTiltD 1.6s var(--ease) both; }
.js .verre-geant.gauche .liquide { animation: sloshG 1.6s var(--ease) both; }
.js .verre-geant.droite .liquide { animation: sloshD 1.6s var(--ease) both; }
@keyframes clinkTiltG {
  0% { transform: rotate(-3deg); }
  32% { transform: rotate(7deg); }
  46% { transform: rotate(9deg); }
  58% { transform: rotate(6deg); }
  74% { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}
@keyframes clinkTiltD {
  0% { transform: rotate(3deg); }
  32% { transform: rotate(-7deg); }
  46% { transform: rotate(-9deg); }
  58% { transform: rotate(-6deg); }
  74% { transform: rotate(-8deg); }
  100% { transform: rotate(0deg); }
}
/* Le vin contre ~85 % de l'inclinaison : il reste quasi à niveau, avec un
   léger résidu qui suit le verre → naturel (ni figé rigide, ni parfaitement plat). */
@keyframes sloshG {
  0% { transform: rotate(2.5deg); }
  32% { transform: rotate(-5deg); }
  46% { transform: rotate(-8deg); }
  58% { transform: rotate(-6deg); }
  74% { transform: rotate(-7deg); }
  90% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}
@keyframes sloshD {
  0% { transform: rotate(-2.5deg); }
  32% { transform: rotate(5deg); }
  46% { transform: rotate(8deg); }
  58% { transform: rotate(6deg); }
  74% { transform: rotate(7deg); }
  90% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

/* Goutte de vin au moment du choc */
.goutte { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
.goutte-in {
  display: block; width: 2vmin; height: 2.7vmin; opacity: 0;
  background: radial-gradient(120% 90% at 40% 30%, #b0566a, #7d2b3a 72%);
  border-radius: 52% 52% 50% 50% / 66% 66% 40% 40%;
  box-shadow: 0 2px 6px rgba(74, 20, 32, .45);
}
.js .goutte-in { animation: gouttePop 1.6s var(--ease) both; }
@keyframes gouttePop {
  0%, 42% { opacity: 0; transform: translateY(-6px) scale(.3); }
  50% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(7px) scaleY(1.15); }
  100% { opacity: 1; transform: translateY(10px) scaleY(1.1); }
}

/* Fond vin qui s'étend au scroll (cercle de clip piloté par --r et --cy) */
.vin-fond {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 35%, #8a2d3d, #4a1420 75%);
  clip-path: circle(var(--r, 0px) at 50% var(--cy, 40%));
  -webkit-clip-path: circle(var(--r, 0px) at 50% var(--cy, 40%));
}

.intro-flash {
  position: absolute; top: 43%; left: 50%; width: 16vmin; height: 16vmin; border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%) scale(0); opacity: 0;
  background: radial-gradient(circle, rgba(201, 162, 75, .95), rgba(201, 162, 75, 0) 68%);
}
.js .intro-flash { animation: introFlash 1.5s ease both; }
@keyframes introFlash {
  0%, 40% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  47% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  64% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
  100% { opacity: 0; }
}

.intro-hint {
  position: absolute; bottom: 6vh; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  color: var(--muted); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600;
}
.intro-hint .chev { font-size: 1.3rem; animation: hintBob 1.6s ease-in-out infinite; }
@keyframes hintBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}

/* ============ TITRES DE SECTION ============ */
.wrap h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.01em;
  font-size: clamp(1.5rem, 4vw, 2rem); color: var(--olive-deep);
  margin: clamp(3rem, 7vw, 4.5rem) 0 1.4rem;
}
.wrap h2 .num {
  font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .2em;
  color: var(--gold-deep); text-transform: uppercase; display: block; margin-bottom: .5rem;
}

/* ============ CARTES (ciselées) ============ */
.card {
  background: linear-gradient(180deg, var(--paper), #fdfbf6);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: clamp(1.3rem, 4vw, 2rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), var(--shadow-soft);
  margin-bottom: 1.1rem;
}

/* ============ FORMULAIRE ============ */
.field { margin-bottom: 1.2rem; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; margin-bottom: .45rem; font-size: .85rem; letter-spacing: .01em; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 1rem; font-family: inherit; background: #fffefb; color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--olive-2); box-shadow: 0 0 0 4px rgba(59, 74, 49, .12);
}
.field input::placeholder, .field textarea::placeholder { color: #b6ac98; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 210px; }

.check { display: flex; align-items: center; gap: .65rem; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--olive); cursor: pointer; flex: none; }

/* ============ CATALOGUE ============ */
/* Accordéon par rayon */
.rayon { border-bottom: 1px solid var(--line-soft); }
.rayon-tete {
  width: 100%; display: flex; align-items: center; gap: .9rem; justify-content: flex-start;
  background: transparent; color: var(--olive-deep); border: none; border-radius: 0; box-shadow: none;
  cursor: pointer; text-align: left; letter-spacing: -.01em;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  padding: 1.15rem .25rem; transition: color .3s var(--ease);
}
.rayon-tete:hover { background: transparent; color: var(--gold-deep); }
.rayon-tete:active { transform: none; }
.rayon-nom { flex: 1; }
.rayon-compte {
  font-family: var(--sans); font-size: .7rem; font-weight: 700; color: var(--gold-deep);
  background: rgba(176, 141, 76, .15); border-radius: 999px; padding: .18rem .6rem; letter-spacing: .02em;
}
.rayon-chevron { font-family: var(--sans); font-size: 1.35rem; line-height: 1; color: var(--muted); transition: transform .45s var(--ease), color .3s var(--ease); }
.rayon.ouvert .rayon-chevron { transform: rotate(180deg); color: var(--olive); }
.rayon-corps { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.rayon.ouvert .rayon-corps { grid-template-rows: 1fr; }
.rayon-inner { overflow: hidden; min-height: 0; }
.rayon.ouvert .rayon-inner { padding-bottom: 1.3rem; }

/* Recherche */
.recherche { margin-bottom: 1.2rem; }
.recherche input {
  width: 100%; padding: .85rem 1rem .85rem 2.7rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 1rem; font-family: inherit; color: var(--ink);
  background: #fffefb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7466' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 1rem center;
  background-size: 1.05rem;
}
.recherche input:focus { outline: none; border-color: var(--olive-2); box-shadow: 0 0 0 4px rgba(59, 74, 49, .12); }

/* Disposition sidebar + contenu */
.catalogue-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.catalogue-layout > #catalogue { flex: 1; min-width: 0; }
.rayons-nav {
  flex: 0 0 212px; position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .15rem;
  background: linear-gradient(180deg, var(--paper), #fdfbf6); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: .55rem; box-shadow: var(--shadow-soft);
}
.rayon-lien {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; letter-spacing: 0;
  background: transparent; border: none; border-radius: var(--r-sm); padding: .55rem .65rem; cursor: pointer;
  color: var(--ink); font-size: .87rem; font-weight: 500; box-shadow: none;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.rayon-lien:hover { background: var(--linen-2); color: var(--olive-deep); }
.rayon-lien .rl-ic { font-size: 1.05rem; flex: none; }
.rayon-lien .rl-nom { flex: 1; }
.rayon-lien .rl-n { font-size: .7rem; font-weight: 700; color: var(--gold-deep); background: rgba(176, 141, 76, .15); border-radius: 999px; padding: .1rem .45rem; }

/* Grille de cartes produit (style boutique) */
.produits-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 1rem; }
.produit {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--paper), #fdfbf6); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease);
}
.produit:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--shadow-lift); }
.produit.actif { border-color: rgba(176, 141, 76, .6); box-shadow: 0 0 0 1px rgba(176, 141, 76, .5), var(--shadow-lift); }
.produit.indispo { opacity: .72; }

.p-photo {
  position: relative; height: 172px; display: flex; align-items: center; justify-content: center; padding: .9rem;
  background: #ffffff; border-bottom: 1px solid var(--line-soft);
}
.p-photo img { max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 7px 11px rgba(42, 40, 32, .2)); }
.p-ph-icone { font-size: 2.7rem; opacity: .45; }
.p-nom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.1rem .8rem .5rem;
  font-family: var(--serif); font-size: .96rem; line-height: 1.15; color: #fff; font-weight: 500;
  background: linear-gradient(180deg, transparent, rgba(42, 53, 36, .88));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.p-body { display: flex; flex-direction: column; gap: .5rem; padding: .75rem .8rem .85rem; flex: 1; }
.p-body .sous-titre { font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; min-height: .75rem; }
.p-body .selecteurs { display: flex; gap: .4rem; flex-wrap: wrap; }
.p-body select {
  flex: 1; min-width: 0; padding: .42rem .45rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fffefb; font-size: .82rem; font-family: inherit; color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.p-body select:focus { outline: none; border-color: var(--olive-2); box-shadow: 0 0 0 3px rgba(59, 74, 49, .12); }
.p-bas { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.prix-ligne { display: flex; align-items: baseline; gap: .25rem; }
.produit .prix { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--gold-deep); white-space: nowrap; }
.produit .prix-venir { font-size: .78rem; font-style: italic; color: var(--muted); }
.produit .format-fixe { font-size: .72rem; color: var(--muted); }

/* Sélecteur de quantité − / + */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fffefb; overflow: hidden; }
.stepper .pas {
  width: 32px; height: 32px; border: none; border-radius: 0; padding: 0; box-shadow: none;
  background: var(--olive); color: #f6f2e7; font-size: 1.25rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .25s var(--ease);
}
.stepper .pas:hover { background: var(--olive-deep); }
.stepper .pas:active { transform: scale(.88); }
.stepper input {
  width: 40px; height: 32px; text-align: center; border: none; background: transparent;
  font-size: .95rem; font-family: inherit; color: var(--ink); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.produit.indispo .stepper { opacity: .5; }
.produit.indispo .stepper .pas { background: #c8c0ad; cursor: not-allowed; }

/* ============ BARRE DE TOTAL ============ */
.totalbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(251, 248, 241, .82); backdrop-filter: saturate(1.5) blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 40px -14px rgba(42, 40, 32, .3);
  padding: .8rem 1.25rem; padding-bottom: max(.8rem, env(safe-area-inset-bottom));
}
.totalbar .inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.totalbar .infos { font-size: .84rem; color: var(--muted); display: flex; gap: 1.6rem; flex-wrap: wrap; }
.totalbar .infos strong { font-family: var(--serif); font-size: 1.55rem; color: var(--olive-deep); font-weight: 600; margin-left: .25rem; }
.badge {
  display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .65rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; margin-left: .4rem; white-space: nowrap;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.err { background: var(--err-bg); color: var(--err); }

/* ============ BOUTONS ============ */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: var(--olive); color: #f6f2e7; border: none; padding: .82rem 1.3rem .82rem 1.5rem;
  border-radius: 999px; font-size: 1rem; font-weight: 600; font-family: inherit; letter-spacing: .01em;
  cursor: pointer; text-decoration: none; box-shadow: 0 12px 24px -14px rgba(42, 40, 32, .55);
  transition: transform .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
button:hover, .btn:hover { background: var(--olive-deep); }
button:active, .btn:active { transform: scale(.975); }
button:disabled { background: #c8c0ad; color: #f6f2e7; box-shadow: none; cursor: not-allowed; }
.btn-terra, .btn-gold { background: var(--gold); box-shadow: 0 12px 24px -14px rgba(147, 113, 53, .6); }
.btn-terra:hover, .btn-gold:hover { background: var(--gold-deep); }
/* pastille d'icône (button-in-button) */
.ic {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: rgba(246, 242, 231, .18);
  display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; flex: none;
  transition: transform .4s var(--ease), background .4s var(--ease);
}
button:hover .ic, .btn:hover .ic { transform: translateX(3px) translateY(-1px); background: rgba(246, 242, 231, .28); }

/* ============ ALERTES ============ */
.alert { padding: .95rem 1.15rem; border-radius: var(--r-md); margin: 1.1rem 0; font-size: .92rem; }
.alert ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.alert.err { background: var(--err-bg); color: #7f331e; border: 1px solid #e2bfae; }
.alert.ok { background: var(--ok-bg); color: #2f5f34; border: 1px solid #bfd9b3; }

/* ============ LOGIN ============ */
.login-box {
  max-width: 440px; margin: clamp(2rem, 8vh, 4rem) auto; text-align: center; padding: clamp(2rem, 6vw, 3rem) 2rem;
}
.login-box .seal {
  width: 66px; height: 66px; margin: 0 auto 1.3rem; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, var(--olive-2), var(--olive-deep));
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--gold);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.15), 0 14px 28px -14px rgba(42,40,32,.6);
}
.login-box h2 { margin: 0 0 .5rem; font-family: var(--serif); font-weight: 500; font-size: 1.6rem; color: var(--olive-deep); }
.login-box p { color: var(--muted); font-size: .93rem; margin: 0 0 1.5rem; }
.login-box button { width: 100%; }

/* ============ RIB ============ */
.rib {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .95rem; line-height: 2;
  background: linear-gradient(160deg, var(--linen-2), var(--paper));
  padding: 1.3rem 1.4rem; border-radius: var(--r-md); border: 1px solid var(--line);
}
.rib strong { font-family: var(--sans); color: var(--olive-deep); }

/* ============ TABLEAUX ============ */
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .9rem; }
th, td { text-align: left; padding: .75rem .85rem; border-bottom: 1px solid var(--line-soft); }
th { background: var(--linen-2); font-weight: 700; color: var(--olive-deep); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr { transition: background .3s var(--ease); }
tbody tr:hover { background: #fbf7ee; }
tfoot th { background: transparent; text-transform: none; font-size: 1.05rem; font-family: var(--serif); }

/* ============ ADMIN ============ */
.admin-onglets { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); padding-bottom: .1rem; }
.onglet {
  background: transparent; color: var(--muted); border: none; box-shadow: none; border-radius: 0;
  padding: .7rem 1rem; font-size: .95rem; font-weight: 600; cursor: pointer; letter-spacing: 0;
  border-bottom: 2.5px solid transparent; transition: color .25s var(--ease), border-color .25s var(--ease);
}
.onglet:hover { background: transparent; color: var(--olive-deep); }
.onglet.actif { color: var(--olive-deep); border-bottom-color: var(--gold); }
.badge-n { font-size: .7rem; font-weight: 700; color: var(--gold-deep); background: rgba(176, 141, 76, .15); border-radius: 999px; padding: .05rem .4rem; margin-left: .1rem; }

.admin-note { color: var(--muted); font-size: .88rem; margin: 0 0 1rem; }
.admin-sous { color: var(--muted); font-size: .8rem; }
.admin-vide { padding: 1.2rem; color: var(--muted); text-align: center; }
.admin-filtres { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.admin-filtres input[type=search] { flex: 1; min-width: 220px; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: 1rem; font-family: inherit; background: #fffefb; }
.admin-filtres select { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .95rem; font-family: inherit; background: #fffefb; }
.admin-filtres input:focus, .admin-filtres select:focus { outline: none; border-color: var(--olive-2); box-shadow: 0 0 0 4px rgba(59, 74, 49, .12); }
button.mini { width: auto; padding: .3rem .6rem; font-size: .8rem; background: var(--linen-2); color: var(--olive-deep); box-shadow: none; }
button.mini:hover { background: var(--line); }
/* Données complétées via le formulaire du site */
td.maj-web { color: #2e7d32; font-weight: 600; background: rgba(63, 125, 70, .09); }
.badge-web { font-size: .66rem; font-weight: 700; color: #2e7d32; background: rgba(63, 125, 70, .15); border-radius: 999px; padding: .08rem .45rem; text-transform: uppercase; letter-spacing: .04em; }

/* Carte */
.carte-wrap { position: relative; }
#map { height: 62vh; min-height: 420px; border-radius: var(--r-md); border: 1px solid var(--line); background: #eef0ea; }
.leaflet-container { font: inherit; background: var(--linen); }
.carte-legende { position: absolute; right: 12px; bottom: 12px; z-index: 500; background: rgba(251, 248, 241, .92); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--muted); box-shadow: var(--shadow-soft); }
.carte-legende .barre { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #f3eee2, #e8cf95, #3b4a31); }
#detailDept { margin-top: 1rem; }
.liste-simple { columns: 2; column-gap: 1.5rem; margin: .6rem 0 1rem; padding-left: 1.1rem; font-size: .88rem; }
.liste-simple li { margin-bottom: .2rem; }

/* Itinéraires */
.tournee { list-style: none; counter-reset: etape; padding: 0; margin: 0; }
.tournee li {
  counter-increment: etape; display: flex; align-items: center; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: .7rem .9rem; margin-bottom: .5rem; box-shadow: var(--shadow-sm);
}
.tournee li::before { content: counter(etape); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--olive); color: #f6f2e7; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.tournee .etape-info { flex: 1; display: flex; flex-direction: column; }
.tournee .etape-actions { display: flex; gap: .3rem; }

@media print {
  header.site, .admin-onglets, .admin-filtres, .totalbar { display: none !important; }
  .vue { display: block !important; }
  .tournee li { break-inside: avoid; }
}

/* Lien liseuse */
.feuilleter-lien {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem;
  padding: .8rem 1.3rem; background: linear-gradient(180deg, var(--paper), #fdfbf6);
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--olive-deep); font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feuilleter-lien:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* ============ LISEUSE ============ */
.liseuse { max-width: 900px; margin: 0 auto; padding: .5rem 1rem 3rem; }
.liseuse:fullscreen { background: var(--linen); max-width: none; padding: 1rem 1.5rem; display: flex; flex-direction: column; }

.liseuse-haut { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lis-titre { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lis-commander {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600;
  color: var(--olive-deep); text-decoration: none; padding: .3rem 0; background: none; box-shadow: none; border: none;
  border-bottom: 1.5px solid transparent; border-radius: 0; transition: color .25s var(--ease), border-color .25s var(--ease);
}
.lis-commander:hover { color: var(--gold-deep); border-bottom-color: var(--gold); background: none; }

.liseuse-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 64vh; overflow: auto; padding: .5rem;
}
.liseuse-stage img {
  max-width: 100%; max-height: 82vh; border-radius: 2px; background: #fff;
  box-shadow: 0 12px 44px -14px rgba(42, 40, 32, .38), 0 2px 8px rgba(42, 40, 32, .07);
  transition: opacity .35s var(--ease); cursor: zoom-in;
}
.liseuse-stage.zoom { align-items: flex-start; }
.liseuse-stage.zoom img { max-width: none; max-height: none; width: 175%; cursor: zoom-out; }
.liseuse:fullscreen .liseuse-stage { flex: 1; min-height: 0; }
.liseuse:fullscreen .liseuse-stage img { max-height: 90vh; }

.nav-fleche {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  background: rgba(251, 248, 241, .82); backdrop-filter: blur(8px);
  border: 1px solid var(--line); color: var(--olive-deep); box-shadow: var(--shadow-soft);
  font-size: 1.7rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.liseuse-stage:hover .nav-fleche { opacity: 1; }
.nav-fleche:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.nav-fleche:active { transform: translateY(-50%) scale(.95); }
.nav-fleche.gauche { left: .5rem; }
.nav-fleche.droite { right: .5rem; }
.nav-fleche:disabled { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .nav-fleche { opacity: .82; } }

.lis-chargement {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: .85rem;
  background: rgba(251, 248, 241, .9); padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line);
}

.liseuse-pied { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: 1.2rem; }
.lis-ico {
  width: 34px; height: 34px; border-radius: 50%; padding: 0; background: transparent; box-shadow: none;
  border: 1px solid var(--line); color: var(--muted); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.lis-ico:hover { color: var(--olive-deep); border-color: var(--olive-2); background: var(--paper); }
.lis-ico.actif { background: var(--olive); color: #f6f2e7; border-color: var(--olive); }
.lis-pages { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; gap: .35rem; white-space: nowrap; }
.lis-pages #numPageAff { color: var(--olive-deep); font-weight: 700; }
.lis-pages .sep { opacity: .5; }
.lis-progress { flex: 0 1 340px; height: 5px; background: var(--line); border-radius: 999px; cursor: pointer; touch-action: none; }
.lis-progress:focus-visible { outline: 2px solid var(--olive-2); outline-offset: 3px; }
.lis-progress-barre { height: 100%; width: 2%; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 999px; transition: width .3s var(--ease); }

/* ============ ANIMATIONS D'APPARITION ============ */
.js .wrap h2,
.js .card,
.js .rayon-tete,
.js .login-box,
.js .feuilleter-lien {
  opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
  will-change: transform, opacity;
}
.js .is-visible { opacity: 1 !important; transform: none !important; filter: none !important; }

/* Entrée du hero au chargement */
@keyframes heroUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.js header.site .tchin { animation: heroUp .8s var(--ease) both; }
.js header.site .eyebrow { animation: heroUp .8s var(--ease) .06s both; }
.js header.site h1 { animation: heroUp .9s var(--ease) .08s both; }
.js header.site p { animation: heroUp .9s var(--ease) .16s both; }
.js header.site .ornement { animation: heroUp .9s var(--ease) .24s both; }

/* ============ RESPONSIVE (mobile-first) ============ */
@media (max-width: 880px) {
  .catalogue-layout { display: block; }
  .rayons-nav { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 1.5rem 1rem 8.5rem; }
  .produits-grille { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .p-photo { height: 142px; }
  .p-body { padding: .65rem .65rem .8rem; }
  .totalbar .inner { flex-direction: column; align-items: stretch; gap: .6rem; }
  .totalbar .infos { justify-content: space-between; gap: .5rem; font-size: .8rem; }
  .totalbar button { width: 100%; }
  .lis-actions { margin-left: 0; width: 100%; justify-content: center; }
  .liseuse-stage.zoom img { width: 100%; }
}
@media (max-width: 400px) {
  .produits-grille { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .wrap h2, .js .card, .js .rayon-tete, .js .login-box, .js .feuilleter-lien { opacity: 1; transform: none; filter: none; }
  .rayon-corps { transition: none; }
}
