/* ===== Épicerie DAIRE — feuille de style du site ===== */
:root{
  --green-900:#1b3a28; --green-800:#234A33; --green-700:#2f5e41; --green-600:#3d7350;
  --olive-orb:#7a8b3c;               /* vert olive des orbes de profondeur du header */
  --gold:#f0ad0e; --gold-hi:#ffce46; --gold-lo:#c4890a; --gold-bright:#FF9E1B;
  --olive-pale:#eceedd;
  --cream:#fdf6e9; --cream-2:#FBF4E6; --ink:#2a2a22; --muted:#6f6a5c;
  --font-sans:'Nunito',system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-display:'Fraunces',Georgia,'Times New Roman',serif;
  --header-h:88px;                  /* hauteur du header */
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);background:#fff;font-family:var(--font-sans);font-size:16px;line-height:1.6}
a{color:inherit}
img,svg{display:block}

.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:-9999px;top:0;z-index:200;background:var(--green-800);color:var(--cream);padding:10px 16px;border-radius:0 0 8px 0;text-decoration:none;font-weight:700}
.skip-link:focus{left:0}
:focus-visible{outline:3px solid var(--gold-bright);outline-offset:2px;border-radius:4px}

.wrap{max-width:1240px;margin:0 auto;padding:0 22px}

/* ===== HEADER (fixe en haut, fond blanc, orbes olive pour la profondeur) ===== */
.dheader{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; gap:16px;
  height:var(--header-h); padding:0 18px; margin:0;
  background:#fff; border:0;
  overflow:hidden;
}

/* orbes décoratives vert olive, floutées, fixes derrière le contenu du header */
.dh-orb{
  position:absolute; z-index:0; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle at 35% 35%, var(--olive-orb), transparent 72%);
  filter:blur(38px); opacity:.28;
}
.dh-orb-1{width:260px;height:260px;left:-70px;top:-140px}
.dh-orb-2{width:220px;height:220px;right:8%;top:-120px}
.dh-orb-3{width:180px;height:180px;left:46%;bottom:-140px}

/* boutons / icônes (burger, compte, panier) */
.dh-icon{
  position:relative; z-index:1;
  flex:none; width:46px; height:46px;
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; border:none; cursor:pointer;
  color:var(--green-800); text-decoration:none; border-radius:10px;
}
.dh-icon:hover{background:rgba(35,74,51,.08)}
.dh-icon svg{width:27px;height:27px}
.dh-cart{position:relative}
.cart-count{
  position:absolute; top:4px; right:2px;
  background:var(--gold-bright); color:#26331c; font-weight:700; font-size:11px;
  min-width:18px; height:18px; border-radius:9px;
  display:inline-flex; align-items:center; justify-content:center; padding:0 5px;
}

/* logo : intégré au header, sans fond ni bordure */
.dh-logo{
  position:relative; z-index:1;
  flex:none;
  height:100%;
  display:flex; align-items:center; justify-content:center;
  padding:0 6px;
}
.dh-logo img{height:56px;width:auto}

/* barre de chat IA : fixe (sticky avec le header), largeur maxi, sans icône ni bouton */
.dh-chat{position:relative; z-index:1; flex:1 1 auto; min-width:0; margin:0}
.dh-chat input{
  width:100%; border:1px solid #d8dcc9; background:#fff;
  border-radius:11px; padding:13px 18px;
  font-size:16px; font-family:inherit; color:var(--ink);
}
.dh-chat input::placeholder{color:#9a9384}
.dh-chat input:focus{outline:none;border-color:var(--green-600);box-shadow:0 0 0 3px rgba(61,115,80,.16)}

/* ===== Tiroirs (catégories à gauche, panier à droite) ===== */
.drawer-overlay{
  position:fixed; inset:0; background:rgba(20,30,18,.45);
  opacity:0; visibility:hidden; transition:opacity .3s ease; z-index:60;
}
.drawer-overlay.open{opacity:1;visibility:visible}
.drawer{
  position:fixed; top:0; bottom:0; width:min(380px,86vw);
  background:var(--cream); z-index:70;
  display:flex; flex-direction:column;
  transition:transform .32s ease; box-shadow:0 0 44px rgba(0,0,0,.28);
}
.drawer-left{left:0;transform:translateX(-100%)}
.drawer-right{right:0;transform:translateX(100%)}
.drawer.open{transform:translateX(0)}
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid #e7e0cf;
}
.drawer-title{font-family:var(--font-display);font-weight:600;font-size:21px;color:var(--green-800)}
.drawer-close{
  width:40px;height:40px;flex:none;display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:none;cursor:pointer;color:var(--green-800);border-radius:8px;
}
.drawer-close:hover{background:rgba(35,74,51,.08)}
.drawer-close svg{width:24px;height:24px}
.drawer-body{flex:1;overflow-y:auto;padding:8px 0}

.cat-list{display:flex;flex-direction:column}
.cat-item{
  padding:13px 22px; text-decoration:none; color:var(--ink); font-weight:600;
  border-bottom:1px solid #efe8d8;
}
.cat-item:hover{background:var(--cream-2);color:var(--green-700)}
.cat-values{color:var(--green-700)}
.cart-empty{padding:26px 22px;text-align:center}
.cart-empty .muted{color:var(--muted);font-size:14px}

/* ===== Panneau de conversation (assistant IA) ===== */
.chat-overlay{position:fixed;inset:0;background:rgba(20,30,18,.35);z-index:80}
.chat-panel{
  position:fixed; left:50%; top:calc(var(--header-h) + 14px); transform:translateX(-50%);
  width:min(760px,92vw); max-height:min(70vh,640px);
  background:#fff; border:1px solid #e2ddcc; border-radius:14px;
  box-shadow:0 22px 60px rgba(0,0,0,.28); z-index:90;
  display:flex; flex-direction:column; overflow:hidden;
}
.chat-panel-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:13px 18px;background:var(--olive-pale);border-bottom:1px solid #e2ddcc;
}
.chat-panel-title{font-weight:700;color:var(--green-800)}
.chat-thread{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px}
.chat-msg{max-width:82%;padding:11px 15px;border-radius:14px;font-size:15px;line-height:1.5;white-space:pre-wrap}
.chat-msg.user{align-self:flex-end;background:var(--green-700);color:var(--cream);border-bottom-right-radius:5px}
.chat-msg.bot{align-self:flex-start;background:var(--cream-2);color:var(--ink);border-bottom-left-radius:5px}
.chat-msg.bot.pending{color:var(--muted);font-style:italic}

/* ===== contenu ===== */
.site-main{min-height:60vh;background:#fff}
.muted{color:var(--muted)}

/* ===== Galerie : grille unique de tous les produits (façon Midjourney) ===== */
.pgrid{
  column-count:5; column-gap:1.5px;
  background:#fff; width:100%;
}
.pcard{
  position:relative; display:block; overflow:hidden;
  break-inside:avoid; margin-bottom:1.5px; background:#fff;
}
.pcard > img{width:100%;height:auto;display:block}
.pcard-placeholder{
  width:100%; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(160deg,#eceedd,#dde1c4);
}
.pcard-mono{font-family:var(--font-display);font-weight:600;font-size:28px;color:var(--green-700);letter-spacing:.5px}
.pcard-flag{
  position:absolute; top:8px; left:8px; z-index:2;
  background:rgba(20,30,18,.72); color:#fff; font-size:10px; font-weight:700;
  padding:2px 7px; border-radius:12px;
}

/* étiquette "liquid glass" au survol : flou fort, double bordure (2px puis 1px),
   blanche sur fond sombre/coloré, noire sur fond clair (déterminé en JS par
   luminance moyenne de l'image -> data-tone sur .pcard) */
.pcard-glass{
  position:absolute; left:10px; right:10px; bottom:10px; z-index:3;
  padding:3px; border-radius:16px;
  border:2px solid rgba(255,255,255,.92);
  opacity:0; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease;
  pointer-events:none;
}
.pcard-glass-inner{
  border:1px solid rgba(255,255,255,.7);
  border-radius:13px; padding:12px 16px;
  background:rgba(255,255,255,.14);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  display:flex; flex-direction:column; gap:2px;
  color:#fff;
}
.pcard-name{font-size:13px;font-weight:700;line-height:1.25}
.pcard-price{font-size:13px;font-weight:700;color:#ffe08a}

.pcard:hover .pcard-glass,.pcard:focus-visible .pcard-glass{opacity:1;transform:translateY(0)}

.pcard[data-tone="light"] .pcard-glass{border-color:rgba(20,20,15,.85)}
.pcard[data-tone="light"] .pcard-glass-inner{
  border-color:rgba(20,20,15,.55); background:rgba(255,255,255,.4); color:#171712;
}
.pcard[data-tone="light"] .pcard-price{color:var(--green-700)}

/* ===== Accueil : étal en image plein cadre, grille de survol par-dessus ===== */
.hero-wrap{position:relative;width:100%;line-height:0}
.hero-img{width:100%;height:auto;display:block}
.hero-hotspots{position:absolute;inset:0}
.hero-spot{position:absolute;display:flex;align-items:center;justify-content:center}
.hero-card{
  width:min(210px,88%);
  padding:14px 16px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 14px 34px rgba(20,30,18,.28);
  display:flex; flex-direction:column; gap:5px;
  opacity:0; transform:scale(.9);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}
.hero-spot:hover .hero-card,.hero-spot:focus-visible .hero-card{opacity:1;transform:scale(1)}
.hero-card-badge{
  align-self:flex-start;
  color:#fff; font-size:11px; font-weight:700;
  padding:3px 9px; border-radius:10px;
}
.hero-card-name{font-family:var(--font-display);font-weight:600;font-size:16px;color:var(--ink);line-height:1.25}
.hero-card-price{font-size:14px;font-weight:700;color:var(--green-700)}

/* ===== footer ===== */
.site-footer{background:var(--green-900);color:var(--cream);margin-top:0}
.site-footer .wrap{padding:24px 22px;display:flex;flex-wrap:wrap;gap:14px;justify-content:space-between;align-items:center;font-size:14px}
.site-footer a{color:#ffd66a;text-decoration:none}
.site-footer a:hover{text-decoration:underline}

/* ===== responsive ===== */
@media (max-width:1100px){ .pgrid{column-count:4} }
@media (max-width:820px){ .pgrid{column-count:3} }
@media (max-width:560px){ .pgrid{column-count:2} }

@media (max-width:760px){
  :root{--header-h:72px}
  .dheader{gap:8px;padding:0 10px}
  .dh-icon{width:42px;height:42px}
  .dh-logo{padding:0 4px}
  .dh-logo img{height:46px}
  .dh-chat input{padding:11px 14px;font-size:15px}
  .dh-chat input::placeholder{font-size:13px}
  .pcard-glass{opacity:1;transform:translateY(0)} /* tactile : étiquette visible sans survol */
  .hero-hotspots{display:none} /* pas de vrai survol tactile : image seule sur mobile */
}
