/*
Theme Name: Z Derma
Theme URI: https://zderma.tn
Author: Z Derma
Description: Custom WooCommerce theme for Z DERMA, built from the Z-DERMA design mockup. Palette orange / vert / blanc / noir, typographies Jost + Barlow + Barlow Condensed (auto-hébergées, SIL OFL).
Version: 0.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zderma
Tags: e-commerce, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   1. DESIGN TOKENS  (charte graphique Z DERMA)
   ============================================================ */
:root{
  /* Orange */
  --zd-orange:        #FF6B1A;
  --zd-orange-light:  #FF8A3D;
  --zd-orange-text:   #E4540B;
  --zd-orange-dark:   #B8430F;
  --zd-peach:         #FFF1E6;

  /* Vert */
  --zd-green:         #357A2B;
  --zd-green-deep:    #1E5B2B;
  --zd-green-light:   #9FD08A;
  --zd-green-pale:    #EAF4E4;

  /* Neutres */
  --zd-white:         #FFFFFF;
  --zd-black:         #111111;
  --zd-grey:          #4D4D4D;
  --zd-line:          #E6E6E6;
  --zd-grey-soft:     #F7F7F5;

  /* Typographie */
  --zd-font-display:  'Jost', system-ui, -apple-system, sans-serif;
  --zd-font-body:     'Barlow', system-ui, -apple-system, sans-serif;
  --zd-font-cond:     'Barlow Condensed', 'Barlow', system-ui, sans-serif;

  /* Layout */
  --zd-max:           1440px;
  --zd-gutter:        clamp(18px, 4vw, 90px);
  --zd-radius:        14px;
  --zd-radius-lg:     26px;

  --zd-transition:    .22s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--zd-white);
  color:var(--zd-black);
  font-family:var(--zd-font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img,svg,video{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; cursor:pointer; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,h5,h6{
  font-family:var(--zd-font-display);
  font-weight:700;
  line-height:1.03;
  letter-spacing:-.02em;
  margin:0;
}
p{ margin:0 0 1em; }
p:last-child{ margin-bottom:0; }

/* Accessibilité */
.screen-reader-text{
  position:absolute!important; width:1px; height:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); clip-path:inset(50%); white-space:nowrap;
}
.skip-link:focus{
  position:fixed; top:8px; left:8px; z-index:9999;
  background:var(--zd-black); color:#fff; padding:10px 16px; border-radius:6px;
  width:auto; height:auto; clip:auto; clip-path:none;
}
:focus-visible{ outline:3px solid var(--zd-orange); outline-offset:2px; }

/* ============================================================
   3. LAYOUT PRIMITIVES
   ============================================================ */
.zd-wrap{
  width:100%;
  max-width:var(--zd-max);
  margin-inline:auto;
  padding-inline:var(--zd-gutter);
}
.zd-section{ padding-block:clamp(56px,7vw,110px); }
.zd-section--tight{ padding-block:clamp(38px,4vw,64px); }

/* Eyebrow : petite étiquette orange en majuscules */
.zd-eyebrow{
  font-family:var(--zd-font-cond);
  font-weight:700;
  font-size:13px;
  letter-spacing:.20em;
  text-transform:uppercase;
  color:var(--zd-orange-text);
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-bottom:14px;
}
.zd-eyebrow::before{
  content:"";
  width:9px; height:9px; border-radius:50%;
  background:var(--zd-orange);
  flex:none;
}

/* Titre de section : partie grasse + partie italique légère orange */
.zd-title{
  font-size:clamp(34px,4.6vw,62px);
  line-height:1.02;
}
.zd-title em{
  font-style:italic;
  font-weight:300;
  color:var(--zd-orange);
}
.zd-lead{
  color:var(--zd-grey);
  font-size:clamp(15px,1.15vw,17px);
  max-width:62ch;
}
.zd-center{ text-align:center; }
.zd-center .zd-lead{ margin-inline:auto; }

/* ============================================================
   4. BOUTONS
   ============================================================ */
.zd-btn{
  --_bg:var(--zd-orange);
  --_fg:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:14px 26px;
  border:2px solid transparent;
  border-radius:999px;
  background:var(--_bg);
  color:var(--_fg);
  font-family:var(--zd-font-body);
  font-weight:600;
  font-size:15px;
  line-height:1;
  text-align:center;
  transition:transform var(--zd-transition), background var(--zd-transition), color var(--zd-transition), border-color var(--zd-transition);
}
.zd-btn:hover{ transform:translateY(-2px); background:var(--zd-orange-dark); }
.zd-btn--dark{ --_bg:var(--zd-black); }
.zd-btn--dark:hover{ background:#000; }
.zd-btn--outline{
  --_bg:transparent; --_fg:var(--zd-black);
  border-color:var(--zd-black);
}
.zd-btn--outline:hover{ --_bg:var(--zd-black); --_fg:#fff; }
.zd-btn--green{ --_bg:var(--zd-green); }
.zd-btn--green:hover{ background:var(--zd-green-deep); }
.zd-btn--block{ width:100%; }
.zd-btn--sm{ padding:11px 20px; font-size:14px; }

/* ============================================================
   5. EN-TÊTE
   ============================================================ */
.zd-announce{
  background:var(--zd-black);
  color:#fff;
  font-size:13px;
  letter-spacing:.03em;
}
.zd-announce__in{
  display:flex; align-items:center; justify-content:center;
  gap:14px; min-height:40px; padding-block:8px;
  text-align:center; flex-wrap:wrap;
}
.zd-announce svg{ flex:none; }
.zd-announce a{
  color:var(--zd-orange-light);
  text-decoration:underline;
  text-underline-offset:3px;
  font-weight:600;
}

.zd-header{
  position:sticky; top:0; z-index:200;
  background:#fff;
  border-bottom:1px solid var(--zd-line);
}
.zd-header__in{
  display:flex; align-items:center; gap:clamp(16px,2.4vw,42px);
  min-height:84px;
}
.zd-brand{ flex:none; display:flex; align-items:center; }
.zd-brand img{ width:auto; height:38px; }

.zd-nav{ flex:1 1 auto; }
.zd-nav ul{ display:flex; align-items:center; gap:clamp(14px,1.9vw,34px); }
.zd-nav a{
  font-weight:500; font-size:15px; white-space:nowrap;
  position:relative; padding-block:6px;
  transition:color var(--zd-transition);
}
.zd-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0;
  height:2px; background:var(--zd-orange);
  transition:right var(--zd-transition);
}
.zd-nav a:hover{ color:var(--zd-orange-text); }
.zd-nav a:hover::after{ right:0; }
.zd-nav .current-menu-item > a{ color:var(--zd-orange-text); }
.zd-nav .current-menu-item > a::after{ right:0; }

/* Badge "+ CADEAU" du menu */
.zd-tag{
  display:inline-block; margin-left:8px;
  background:var(--zd-green-light); color:var(--zd-black);
  font-family:var(--zd-font-cond); font-weight:700;
  font-size:10px; letter-spacing:.12em;
  padding:3px 8px; border-radius:999px;
  vertical-align:middle;
}

.zd-actions{ flex:none; display:flex; align-items:center; gap:clamp(12px,1.5vw,26px); }
.zd-actions a,.zd-actions button{
  background:none; border:0; padding:6px;
  display:inline-flex; align-items:center; gap:8px;
  font-size:15px; font-weight:500; color:var(--zd-black);
  transition:color var(--zd-transition);
}
.zd-actions a:hover,.zd-actions button:hover{ color:var(--zd-orange-text); }
/* Maquette : icônes seules pour Recherche / Mon compte ; seul « Panier 0 » est libellé. */
.zd-actions .zd-label{ display:none; }
.zd-actions .zd-label--cart{ display:inline; }
.zd-cart-count{
  font-family:var(--zd-font-cond); font-weight:700; font-size:15px;
}
.zd-burger{ display:none; }

/* Recherche dépliable */
.zd-search{ display:none; border-top:1px solid var(--zd-line); background:#fff; }
.zd-search.is-open{ display:block; }
.zd-search__in{ padding-block:16px; }
.zd-search input[type=search]{
  width:100%; padding:13px 18px;
  border:2px solid var(--zd-black); border-radius:999px;
  font-family:var(--zd-font-body); font-size:15px;
}

/* Menu mobile */
.zd-mobile{
  display:none;
  position:fixed; inset:0; z-index:300;
  background:#fff; padding:22px var(--zd-gutter) 40px;
  overflow-y:auto;
}
.zd-mobile.is-open{ display:block; }
.zd-mobile__top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:26px; }
.zd-mobile ul{ display:grid; gap:4px; }
.zd-mobile a{
  display:block; padding:15px 0;
  font-family:var(--zd-font-display); font-weight:600;
  font-size:23px; border-bottom:1px solid var(--zd-line);
}

/* ============================================================
   6. BANDEAU DÉFILANT (marquee)
   ============================================================ */
/* Le bandeau est incliné et déborde volontairement : le conteneur
   .zd-marquee-shell le rogne pour ne jamais créer de scroll horizontal. */
.zd-marquee-shell{
	overflow:hidden;
	padding-block:clamp(10px,1.6vw,26px);
	margin-block:clamp(28px,3.4vw,52px);
}
.zd-marquee{
	background:var(--zd-orange);
	color:var(--zd-black);
	overflow:hidden;
	padding-block:16px;
	transform:rotate(-1.6deg) scale(1.03);
}
.zd-marquee--flat{ transform:none; }
.zd-marquee__track{
	display:flex; width:max-content; gap:0;
	animation:zd-scroll 32s linear infinite;
}
.zd-marquee__group{
  display:flex; align-items:center; flex:none;
}
.zd-marquee span{
  font-family:var(--zd-font-cond);
  font-weight:700;
  font-size:clamp(17px,1.7vw,25px);
  letter-spacing:.06em;
  text-transform:uppercase;
  padding-inline:20px;
  white-space:nowrap;
}
.zd-marquee i{
  font-style:normal; color:#fff; font-size:12px; flex:none;
}
@keyframes zd-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce){
  .zd-marquee__track{ animation:none; }
}

/* ============================================================
   7. CARTES PRODUIT / ROUTINE
   ============================================================ */
.zd-card{
  border:1.5px solid var(--zd-line);
  border-radius:var(--zd-radius-lg);
  padding:20px;
  display:flex; flex-direction:column;
  background:#fff;
  transition:border-color var(--zd-transition), transform var(--zd-transition);
}
.zd-card:hover{ border-color:var(--zd-black); transform:translateY(-4px); }
.zd-card__step{
  font-family:var(--zd-font-cond); font-weight:700;
  font-size:12px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--zd-orange-text); margin-bottom:10px;
}
.zd-card__media{
  background:var(--zd-peach);
  border-radius:var(--zd-radius);
  aspect-ratio:1/1;
  display:grid; place-items:center;
  overflow:hidden; margin-bottom:16px;
}
.zd-card__media img{ width:78%; height:78%; object-fit:contain; }
.zd-card h3{
  font-size:19px; font-weight:600; letter-spacing:0;
  margin-bottom:8px;
}
.zd-card p{ font-size:14px; color:var(--zd-grey); flex:1 1 auto; margin-bottom:14px; }
.zd-price{
  font-family:var(--zd-font-cond); font-weight:700;
  font-size:26px; letter-spacing:.01em;
}
.zd-price small{ font-size:14px; font-weight:600; }

/* ============================================================
   8. PIED DE PAGE
   ============================================================ */
.zd-footer{ background:var(--zd-black); color:#fff; padding-top:clamp(46px,5vw,80px); }
.zd-footer a{ color:#fff; }
.zd-footer a:hover{ color:var(--zd-orange-light); }
.zd-footer__grid{
  display:grid;
  grid-template-columns:1.6fr repeat(3,1fr);
  gap:clamp(24px,3vw,54px);
  padding-bottom:clamp(34px,4vw,64px);
}
.zd-footer__brand img{ height:40px; width:auto; margin-bottom:18px; }
.zd-footer__brand p{ color:#cfcfcf; font-size:14px; max-width:34ch; }
.zd-footer h4{
  font-family:var(--zd-font-cond); font-weight:700;
  font-size:13px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--zd-orange-light); margin-bottom:16px;
}
.zd-footer li{ margin-bottom:9px; }
.zd-footer li a,.zd-footer address a{ font-size:14.5px; color:#e8e8e8; }
.zd-footer address{ font-style:normal; display:grid; gap:9px; }
.zd-footer__social{
  display:inline-flex; align-items:center; gap:9px;
  margin-top:16px; font-weight:600;
}
.zd-footer__bottom{
  border-top:1px solid rgba(255,255,255,.16);
  padding-block:22px;
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; flex-wrap:wrap;
  font-size:13px; color:#b9b9b9;
}
.zd-footer__bottom ul{ display:flex; gap:26px; flex-wrap:wrap; }
.zd-footer__bottom a{ color:#b9b9b9; }

/* Grand lettrage orange en bas de page */
.zd-wordmark{
  font-family:var(--zd-font-display);
  font-style:italic; font-weight:300;
  color:var(--zd-orange);
  font-size:clamp(58px,15vw,215px);
  line-height:.86;
  letter-spacing:-.03em;
  text-align:center;
  padding-bottom:.06em;
  overflow:hidden;
  white-space:nowrap;
}

/* ============================================================
   8b. PAGES / BLOG / 404
   ============================================================ */
.zd-header.is-scrolled{ box-shadow:0 6px 24px rgba(17,17,17,.09); }

.zd-page__head{ padding-block:clamp(34px,4vw,64px) clamp(12px,1.4vw,20px); }
.zd-page__body{ padding-bottom:clamp(46px,6vw,96px); max-width:78ch; }
.zd-page__body h2{ margin:1.6em 0 .5em; font-size:clamp(24px,2.4vw,34px); }
.zd-page__body h3{ margin:1.4em 0 .4em; font-size:clamp(19px,1.8vw,25px); }
.zd-page__body a{ color:var(--zd-orange-text); text-decoration:underline; text-underline-offset:3px; }
.zd-page__body img{ border-radius:var(--zd-radius); }

.zd-loop{
	display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
	gap:clamp(16px,2vw,26px);
	margin-block:clamp(20px,3vw,40px);
}
.zd-card--post .zd-card__media{ background:var(--zd-grey-soft); }
.zd-card--post .zd-card__title{ font-size:20px; font-weight:600; letter-spacing:0; margin-bottom:8px; }
.zd-page-head{ margin-bottom:clamp(18px,2.4vw,34px); }

.zd-404{ text-align:center; padding-block:clamp(60px,9vw,140px); }
.zd-404 .zd-title{ margin-bottom:18px; }

/* Message newsletter */
.zd-news__msg{
	margin-top:10px; font-size:14px; font-weight:600; color:var(--zd-green);
}

/* Formulaire de contact */
.zd-contact{ max-width:640px; margin-block:clamp(20px,3vw,38px); }
.zd-field{ margin-bottom:16px; }
.zd-field label{ display:block; font-weight:600; font-size:14.5px; margin-bottom:6px; }
.zd-field input,.zd-field select,.zd-field textarea{
	width:100%;
	padding:13px 16px;
	border:1.5px solid var(--zd-line);
	border-radius:var(--zd-radius);
	font-family:var(--zd-font-body); font-size:15px;
	background:#fff; color:var(--zd-black);
}
.zd-field textarea{ border-radius:var(--zd-radius); resize:vertical; }
.zd-field input:focus,.zd-field select:focus,.zd-field textarea:focus{ border-color:var(--zd-orange); }
.zd-contact__msg{
	padding:14px 18px; margin-bottom:20px;
	border-radius:var(--zd-radius); border-left:4px solid var(--zd-orange);
	background:var(--zd-peach); font-weight:600;
}
.zd-contact__msg.is-ok{ border-left-color:var(--zd-green); background:var(--zd-green-pale); color:var(--zd-green-deep); }

/* ============================================================
   9. RESPONSIVE
   ============================================================ */
@media (max-width:1100px){
  .zd-footer__grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:1040px){
  .zd-nav{ display:none; }
  .zd-burger{ display:inline-flex; }
  .zd-header__in{ min-height:70px; justify-content:space-between; }
}
@media (max-width:640px){
  .zd-footer__grid{ grid-template-columns:1fr; }
  .zd-footer__bottom{ flex-direction:column; align-items:flex-start; }
  .zd-brand img{ height:30px; }
}
