/*
Theme Name: ML Events
Theme URI: https://mlevents-location.fr
Description: Theme sur-mesure ML Events - location de materiel evenementiel. Esprit de la landing page (vert/creme, Montserrat, logo anime), compatible WooCommerce.
Author: ML Events
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: mlevents
*/

/* ===================== TOKENS ===================== */
:root{
  --green:#1B5C3D; --green-deep:#154A30; --green-soft:#2A6E4E;
  --overlay:rgba(20,50,36,.92);
  --cream:#faf9f5; --cream-deep:#F4F1EC; --white:#fff;
  --ink:#1A1F1A; --ink-soft:#4A524A;
  --line:rgba(27,92,61,.16);
  --radius:16px; --radius-lg:24px; --pill:999px;
  --shadow:0 4px 16px rgba(20,50,36,.07);
  --shadow-lg:0 12px 30px rgba(20,50,36,.14);
  --container:2160px;
  --font:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* ===================== BASE ===================== */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; font-family:var(--font); color:var(--ink);
  background:var(--cream); line-height:1.6; font-size:16px; font-weight:500;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; }
a{ color:var(--green-soft); text-decoration:none; transition:color .2s ease; }
a:hover{ color:var(--green-deep); }
h1,h2,h3,h4{ font-family:var(--font); font-weight:800; color:var(--green); line-height:1.12; letter-spacing:.2px; }
.mlev-container{ width:95%; max-width:var(--container); margin:0 auto; padding:0 24px; }

/* boutons generiques */
.mlev-btn{
  display:inline-flex; align-items:center; gap:9px; cursor:pointer;
  font-family:var(--font); font-weight:600; font-size:15px; letter-spacing:.4px;
  background:var(--green); color:#fff !important; border:2px solid var(--green);
  border-radius:var(--pill); padding:12px 26px; transition:all .22s ease;
}
.mlev-btn:hover{ background:var(--green-deep); border-color:var(--green-deep); color:#fff !important; }
.mlev-btn--ghost{ background:transparent; color:var(--green) !important; }
.mlev-btn--ghost:hover{ background:var(--green); color:#fff !important; }

/* ===================== HEADER ===================== */
.site-header{
  position:sticky; top:0; z-index:999; background:rgba(250,249,245,.92);
  backdrop-filter:saturate(140%) blur(8px); border-bottom:1px solid var(--line);
  transition:box-shadow .25s ease;
}
.site-header.is-stuck{ box-shadow:0 6px 20px rgba(20,50,36,.08); }
.site-header__inner{ display:flex; align-items:center; gap:24px; min-height:78px; }
.site-brand{ display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.site-brand img{ height:56px; width:auto; display:block; }
.site-brand .brand-txt{ font-weight:800; color:var(--green); font-size:20px; letter-spacing:.5px; line-height:1; }
.site-brand .brand-txt small{ display:block; font-size:10px; font-weight:600; letter-spacing:.18em; color:var(--green-soft); text-transform:uppercase; margin-top:3px; }

/* nav */
.main-nav{ margin-left:auto; }
.main-nav ul{ list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:6px; }
.main-nav li{ position:relative; }
.main-nav a{
  display:block; padding:10px 14px; color:var(--ink); font-weight:600;
  font-size:14px; letter-spacing:.3px; border-radius:8px;
}
.main-nav>ul>li>a{ text-transform:uppercase; font-size:13px; }
.main-nav a:hover{ color:var(--green); background:var(--cream-deep); }
.main-nav .current-menu-item>a,.main-nav .current-product_cat-ancestor>a{ color:var(--green); }
/* sous-menus */
.main-nav ul ul{
  position:absolute; top:calc(100% + 6px); left:0; min-width:236px; flex-direction:column;
  align-items:stretch; gap:0; background:#fff; border:1px solid var(--line);
  border-radius:12px; box-shadow:var(--shadow-lg); padding:8px; opacity:0; visibility:hidden;
  transform:translateY(8px); transition:all .2s ease;
}
.main-nav li:hover>ul{ opacity:1; visibility:visible; transform:translateY(0); }
.main-nav ul ul a{ text-transform:none; font-size:13.5px; padding:9px 12px; }
.main-nav ul ul a:hover{ background:var(--cream); }

/* actions header */
.header-actions{ display:flex; align-items:center; gap:14px; flex:0 0 auto; }
.header-phone{ display:inline-flex; align-items:center; gap:7px; font-weight:700; color:var(--green); white-space:nowrap; }
.header-phone .ico{ font-size:17px; }
.header-cart{ position:relative; display:inline-flex; align-items:center; color:var(--green); font-weight:700; }
.header-cart .cart-count{
  position:absolute; top:-8px; right:-10px; background:var(--green); color:#fff;
  font-size:11px; font-weight:700; min-width:18px; height:18px; line-height:18px;
  text-align:center; border-radius:999px; padding:0 5px;
}
.nav-toggle{ display:none; background:none; border:0; cursor:pointer; padding:8px; }
.nav-toggle span{ display:block; width:24px; height:2px; background:var(--green); margin:5px 0; transition:.25s; border-radius:2px; }

/* ===================== HERO (logo anime) ===================== */
.mlev-hero{
  background:
    radial-gradient(120% 120% at 85% 0%, rgba(42,110,78,.08) 0%, rgba(42,110,78,0) 55%),
    linear-gradient(180deg,#fff 0%,var(--cream) 100%);
  border:1px solid var(--cream-deep); border-radius:32px;
  padding:130px clamp(34px,7vw,120px); margin:40px 0 16px; box-shadow:var(--shadow);
}
.mlev-hero-grid{ display:flex; align-items:center; gap:80px; flex-wrap:wrap; }
.mlev-hero-copy{ flex:1 1 400px; }
.mlev-eyebrow{ color:var(--green-soft); font-weight:700; letter-spacing:.22em; text-transform:uppercase; font-size:14px; margin:0 0 22px; }
.mlev-hero-title{ font-size:clamp(46px,6.8vw,86px); line-height:1.0; color:var(--green); font-weight:800; margin:0 0 30px; }
.mlev-hero-title span{ color:var(--green-soft); }
.mlev-hero-sub{ color:var(--ink-soft); font-size:20px; line-height:1.6; max-width:580px; margin:0 0 40px; }
.mlev-hero-actions{ display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.mlev-hero-phone{ display:inline-flex; align-items:center; gap:8px; font-weight:700; color:var(--green); font-size:22px; }

.mlev-hero-visual{ flex:0 0 480px; max-width:480px; margin:0 auto; }

/* titre de section "Nos categories" */
.mlev-section-head{ text-align:center; margin:48px 0 34px; }
.mlev-section-title{ font-size:clamp(28px,3.4vw,40px); color:var(--green); margin:0 0 10px; }
.mlev-section-title::after{ content:""; display:block; width:64px; height:4px; border-radius:4px; background:var(--green-soft); margin:16px auto 0; }
.mlev-section-sub{ color:var(--ink-soft); font-size:16px; max-width:560px; margin:0 auto; }
.hero-visual{ position:relative; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; }
.hero-visual .ring{ position:absolute; inset:0; border:1px solid var(--line); border-radius:50%; }
.hero-visual .ring.r2{ inset:8%; }
.hero-visual .ring.r3{ inset:16%; border-color:rgba(27,92,61,.10); }
.hero-visual .rotating-text{ position:absolute; inset:0; animation:mlev-rotate 28s linear infinite; transform-origin:50% 50%; }
.hero-visual .rotating-text svg{ width:100%; height:100%; display:block; }
.hero-visual .rotating-text text{ fill:var(--green); font-family:var(--font); font-size:4.4px; letter-spacing:.4em; text-transform:uppercase; font-weight:600; }
.hero-visual .logo{ position:relative; width:66%; aspect-ratio:1; display:flex; align-items:center; justify-content:center; filter:drop-shadow(0 24px 48px rgba(27,92,61,.32)); }
.hero-visual .logo img{ width:100%; height:100%; object-fit:contain; }
@keyframes mlev-rotate{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .hero-visual .rotating-text{ animation:none; } }

/* bandeau categories defilant */
.mlev-marquee{ background:var(--green); color:#fff; overflow:hidden; padding:14px 0; margin:0 0 40px; border-radius:var(--radius); }
.mlev-marquee-track{ display:flex; gap:0; white-space:nowrap; width:max-content; animation:mlev-scroll 28s linear infinite; }
.mlev-marquee span{ font-weight:600; letter-spacing:.5px; font-size:14px; padding:0 10px; }
.mlev-marquee .sep{ opacity:.5; }
@keyframes mlev-scroll{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }

/* ===================== WOOCOMMERCE ===================== */
.mlev-shop{ padding:24px 0 60px; }
.woocommerce .woocommerce-result-count{ color:var(--ink-soft); font-weight:500; }
.woocommerce .woocommerce-ordering select{ font-family:var(--font); border:1px solid var(--line); border-radius:var(--pill); padding:8px 16px; background:#fff; }
.woocommerce-products-header__title.page-title,.woocommerce .woocommerce-products-header__title{ font-size:40px; text-align:center; margin:6px 0 22px; }
.term-description,.woocommerce-archive-description{ text-align:center; max-width:760px; margin:0 auto 26px; color:var(--ink-soft); }

/* grille */
.woocommerce ul.products{ display:grid; grid-template-columns:repeat(4,1fr); gap:26px; margin:0; padding:0; }
.woocommerce ul.products::before,.woocommerce ul.products::after{ display:none; }
.woocommerce ul.products li.product{ width:auto !important; margin:0 !important; float:none !important; }

/* cartes categorie (image plein cadre + degrade vert, nom CENTRE sur la photo) */
.woocommerce ul.products li.product-category{ background:transparent; border:none; box-shadow:none; padding:0; }
.woocommerce ul.products li.product-category a{ position:relative; display:block; border-radius:var(--radius); overflow:hidden; box-shadow:0 6px 20px rgba(20,50,36,.16); }
.woocommerce ul.products li.product-category a img{ width:100%; height:300px; object-fit:cover; object-position:center; background:#fff; margin:0; display:block; transition:transform .5s ease; }
.woocommerce ul.products li.product-category a:hover img{ transform:scale(1.06); }
.woocommerce ul.products li.product-category h2{
  position:absolute; left:0; right:0; bottom:0; margin:0; padding:60px 18px 22px; color:#fff;
  background:linear-gradient(to top,var(--overlay) 0%,rgba(20,50,36,.55) 55%,rgba(20,50,36,0) 100%);
  font-size:21px; font-weight:800; text-transform:uppercase; letter-spacing:.7px; text-align:center;
}
.woocommerce ul.products li.product-category h2 .count{ display:block; background:transparent; color:rgba(255,255,255,.85); font-size:12px; font-weight:500; text-transform:none; margin-top:5px; }

/* cartes produit (photo dezoomee + nom CENTRE sur la photo, prix VISIBLE dessous) */
.woocommerce ul.products li.product:not(.product-category){
  background:#fff; border:1px solid var(--cream-deep); border-radius:16px; padding:0 0 22px; overflow:hidden;
  box-shadow:var(--shadow); transition:transform .2s ease,box-shadow .2s ease; text-align:center;
}
.woocommerce ul.products li.product:not(.product-category):hover{ transform:translateY(-5px); box-shadow:var(--shadow-lg); }
.woocommerce ul.products li.product:not(.product-category) a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product:not(.product-category)>a.woocommerce-loop-product__link{ position:relative; display:block; }
.woocommerce ul.products li.product:not(.product-category) a img{
  width:100%; height:240px; object-fit:contain; background:#fff; margin:0; padding:18px; border-radius:0; box-sizing:border-box;
}
/* suffixe prix HT/24h */
.woocommerce .price .woocommerce-price-suffix{ font-size:12px; font-weight:600; color:var(--ink-soft); letter-spacing:.2px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  position:absolute; left:0; right:0; bottom:0; margin:0; padding:38px 12px 14px; color:#fff;
  background:linear-gradient(to top,var(--overlay) 0%,rgba(20,50,36,.5) 60%,rgba(20,50,36,0) 100%);
  font-size:15.5px; font-weight:700; text-align:center; letter-spacing:.2px; line-height:1.25;
}
.woocommerce ul.products li.product .price{ color:var(--green-soft) !important; font-weight:800; display:block; margin:18px 0 14px; font-size:20px; }
.woocommerce ul.products li.product .price .amount,.woocommerce ul.products li.product .price .woocommerce-Price-amount{ color:var(--green-soft) !important; }
.woocommerce ul.products li.product .button{ margin-top:2px; }

/* fiche produit */
.woocommerce div.product .product_title{ font-size:34px; }
.woocommerce div.product p.price,.woocommerce div.product span.price{ color:var(--green-soft); font-weight:800; font-size:26px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active{ background:#fff; border-bottom-color:#fff; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{ color:var(--green); }
.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce .single_add_to_cart_button{
  background:var(--green) !important; color:#fff !important; border:2px solid var(--green) !important;
  border-radius:var(--pill) !important; font-family:var(--font) !important; font-weight:600 !important;
  letter-spacing:.4px; text-transform:none; padding:13px 30px !important; box-shadow:none !important; transition:all .22s ease !important;
}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce .single_add_to_cart_button:hover,.woocommerce #respond input#submit:hover{
  background:var(--green-deep) !important; border-color:var(--green-deep) !important; color:#fff !important;
}
.woocommerce span.onsale{ background:var(--green-soft); border-radius:var(--pill); }
.woocommerce .woocommerce-message,.woocommerce .woocommerce-info,.woocommerce .woocommerce-error{ border-top-color:var(--green); }
.woocommerce .woocommerce-message::before,.woocommerce .woocommerce-info::before{ color:var(--green); }

/* fiche technique */
.mlevents-fiche-tech{ margin-top:18px; }
.mlevents-fiche-btn{ display:inline-flex; align-items:center; gap:10px; font-family:var(--font); font-weight:600; font-size:15px; color:var(--green) !important; background:var(--cream); border:2px solid var(--green); border-radius:var(--pill); padding:11px 24px; }
.mlevents-fiche-btn:hover{ background:var(--green); color:#fff !important; }
.mlevents-fiche-ico{ font-size:18px; }

/* pages standard */
.mlev-page{ padding:46px 0 60px; }
.mlev-page .entry-title{ font-size:38px; margin:0 0 24px; }
.mlev-page .entry-content{ max-width:820px; }
.mlev-page .entry-content a{ text-decoration:underline; }

/* ===================== FOOTER ===================== */
.site-footer{ background:var(--green); color:#e9efe9; margin-top:60px; }
.site-footer a{ color:#e9efe9; }
.site-footer a:hover{ color:#fff; }
.footer-top{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px; padding:54px 0 40px; }
.footer-brand h3{ color:#fff; font-size:24px; margin:0 0 10px; }
.footer-brand small{ display:block; letter-spacing:.16em; text-transform:uppercase; font-size:11px; color:#b9cfc1; margin-bottom:14px; }
.footer-brand p{ color:#cdddd2; font-size:14px; max-width:320px; }
.footer-col h4{ color:#fff; font-size:14px; text-transform:uppercase; letter-spacing:.12em; margin:0 0 16px; }
.footer-col ul{ list-style:none; margin:0; padding:0; }
.footer-col li{ margin-bottom:9px; font-size:14px; }
.footer-contact p{ margin:0 0 10px; font-size:14px; color:#cdddd2; }
.footer-contact strong{ color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.14); padding:18px 0; font-size:13px; color:#b9cfc1; display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; }

/* ===================== DATES DE LOCATION ===================== */
.mlev-dates{ background:var(--cream); border:1px solid var(--cream-deep); border-radius:14px; padding:16px 16px 12px; margin-bottom:18px; }
.mlev-dates-title{ font-weight:800; color:var(--green); margin:0 0 12px; font-size:15px; }
.mlev-dates-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.mlev-dates-grid label{ display:flex; flex-direction:column; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-soft); gap:4px; }
.mlev-dates-grid input{ font-family:var(--font); font-size:14px; padding:9px 10px; border:1px solid var(--cream-deep); border-radius:9px; background:#fff; color:var(--ink); }
.mlev-dates-grid input:focus{ outline:none; border-color:var(--green-soft); }
.mlev-dates-note{ font-size:12px; color:var(--ink-soft); margin:10px 0 0; }
.mlev-cart-dates{ max-width:520px; margin:0 0 24px; }

/* grille livraison indicative */
.mlev-grid{ margin-top:16px; border-top:1px solid var(--cream-deep); padding-top:14px; }
.mlev-grid summary{ cursor:pointer; font-weight:700; color:var(--green); font-size:13px; list-style:none; }
.mlev-grid summary::-webkit-details-marker{ display:none; }
.mlev-grid summary::before{ content:"▸ "; color:var(--green-soft); }
.mlev-grid[open] summary::before{ content:"▾ "; }
.mlev-grid table{ width:100%; border-collapse:collapse; margin:10px 0 0; font-size:12.5px; }
.mlev-grid td{ padding:5px 4px; border-bottom:1px solid var(--cream-deep); color:var(--ink-soft); }
.mlev-grid td:last-child{ text-align:right; font-weight:700; color:var(--green); }
.mlev-grid-note{ font-size:11.5px; color:var(--ink-soft); margin:8px 0 0; font-style:italic; }

/* ===================== DRAWER (panier coulissant) ===================== */
.mlev-drawer-overlay{ position:fixed; inset:0; background:rgba(20,30,22,.42); opacity:0; visibility:hidden; transition:opacity .3s ease,visibility .3s ease; z-index:1000; }
.mlev-drawer{ position:fixed; top:0; right:0; height:100vh; width:420px; max-width:92vw; background:#fff; box-shadow:-12px 0 40px rgba(20,50,36,.18); transform:translateX(100%); transition:transform .32s cubic-bezier(.4,0,.2,1); z-index:1001; display:flex; flex-direction:column; }
body.mlev-drawer-open .mlev-drawer-overlay{ opacity:1; visibility:visible; }
body.mlev-drawer-open .mlev-drawer{ transform:translateX(0); }
.mlev-drawer-head{ display:flex; align-items:center; justify-content:space-between; padding:20px 22px; border-bottom:1px solid var(--cream-deep); }
.mlev-drawer-head span{ font-family:var(--font); font-weight:800; font-size:18px; color:var(--green); }
.mlev-drawer-close{ background:none; border:0; font-size:30px; line-height:1; color:var(--ink-soft); cursor:pointer; padding:0 4px; }
.mlev-drawer-close:hover{ color:var(--green); }
.mlev-drawer-body{ flex:1; overflow-y:auto; padding:20px 22px 28px; }
/* mini panier WooCommerce dans le drawer */
.mlev-drawer .woocommerce-mini-cart{ list-style:none; margin:0 0 6px; padding:0; }
.mlev-drawer .woocommerce-mini-cart li{ display:flex; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid var(--cream-deep); position:relative; }
.mlev-drawer .woocommerce-mini-cart li img{ width:60px !important; height:60px; object-fit:contain; background:#fff; border:1px solid var(--cream-deep); border-radius:8px; margin:0 !important; float:none !important; }
.mlev-drawer .woocommerce-mini-cart li a:not(.remove){ color:var(--ink); font-weight:600; font-size:14px; text-decoration:none; }
.mlev-drawer .woocommerce-mini-cart li .quantity{ color:var(--green-soft); font-weight:700; font-size:13px; }
.mlev-drawer .woocommerce-mini-cart li a.remove{ position:absolute; top:14px; right:0; color:var(--ink-soft) !important; }
.mlev-drawer .woocommerce-mini-cart__total{ display:flex; justify-content:space-between; font-weight:800; color:var(--green); font-size:17px; padding:16px 0; border-top:2px solid var(--cream-deep); margin-top:6px; }
.mlev-drawer .woocommerce-mini-cart__buttons{ display:flex; flex-direction:column; gap:10px; margin:6px 0 0; }
.mlev-drawer .woocommerce-mini-cart__buttons a{ width:100%; text-align:center; }
.mlev-drawer .woocommerce-mini-cart__buttons a.checkout{ order:-1; } /* "Demander un devis" en premier */
.mlev-drawer .woocommerce-mini-cart__empty-message{ color:var(--ink-soft); text-align:center; padding:30px 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width:1300px){
  .woocommerce ul.products{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:1000px){
  .woocommerce ul.products{ grid-template-columns:repeat(2,1fr); gap:20px; }
  .footer-top{ grid-template-columns:1fr 1fr; }
}
@media (max-width:860px){
  .nav-toggle{ display:block; margin-left:auto; }
  .header-actions .header-phone span{ display:none; }
  .main-nav{ position:fixed; inset:78px 0 auto 0; background:var(--cream); border-bottom:1px solid var(--line);
    max-height:0; overflow:hidden; transition:max-height .3s ease; margin:0; box-shadow:var(--shadow-lg); }
  .main-nav.open{ max-height:80vh; overflow:auto; }
  .main-nav ul{ flex-direction:column; align-items:stretch; gap:0; padding:10px 16px; }
  .main-nav ul ul{ position:static; opacity:1; visibility:visible; transform:none; box-shadow:none; border:none; padding:0 0 6px 14px; }
  .main-nav li:hover>ul{ transform:none; }
  .mlev-hero-visual{ flex-basis:230px; max-width:230px; }
  .woocommerce ul.products li.product-category a img{ height:200px; }
}
@media (max-width:560px){
  .woocommerce ul.products{ grid-template-columns:1fr 1fr; gap:14px; }
  .footer-top{ grid-template-columns:1fr; gap:28px; }
  .site-brand .brand-txt{ display:none; }
}
