:root {
  --c-primary: #3D5A6C;
  --c-secondary: #8B8680;
  --c-accent: #D4A5A5;
  --c-bg: #F5F1EB;
  --c-text: #2A2624;
  --c-olympe-blue: #B8D4E3;
  --c-olympe-snow: #F5F1EB;
  --c-olympe-deep: #3D5A6C;
  --c-yumi-grey: #8B8680;
  --c-yumi-blush: #E8DED4;
  --c-yumi-shadow: #4A4643;
  --c-yumi-pink: #D4A5A5;
  --f-heading: 'Fraunces', Georgia, serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-script: 'Caveat', cursive;
  --radius: 12px;
  --shadow-soft: 0 4px 20px rgba(42,38,36,0.06);
  --shadow-md: 0 8px 32px rgba(42,38,36,0.09);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--f-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--c-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

.signature { font-family: var(--f-script); font-size: 1.4rem; color: var(--c-primary); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--f-body); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); background: #2f4756; }
.btn-ghost { background: transparent; color: var(--c-primary); border: 1.5px solid var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; }

.card-product {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-product:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.section { padding: 72px 0; }

/* Header dual-mascotte */
.header-dual {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  background: rgba(245,241,235,0.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(42,38,36,0.06);
}
.header-mascots { display: flex; gap: 12px; align-items: center; }
.header-mascots img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.header-mascots .brand { font-family: var(--f-heading); font-weight: 600; font-size: 1.3rem; }

/* Hero */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--c-bg) 0%, #fff 100%);
  text-align: center;
}
.hero-img { max-width: 720px; margin: 0 auto 32px; }
.hero h1 span.em { font-style: italic; color: var(--c-primary); }

/* Section univers */
.univers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
@media (max-width: 780px) { .univers-grid { grid-template-columns: 1fr; } }
.univers-card { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-soft); }
.univers-card.olympe { border-top: 4px solid var(--c-olympe-blue); }
.univers-card.yumi { border-top: 4px solid var(--c-yumi-pink); }

/* Chatbot bulle */
.chatbot-bubble {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  background: #fff; border-radius: 999px; padding: 14px 20px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font-family: var(--f-body); font-weight: 500; font-size: 0.9rem;
}
.chatbot-bubble .avatars { display: flex; margin-right: 4px; }
.chatbot-bubble .avatars img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; }
.chatbot-bubble .avatars img:nth-child(2) { margin-left: -12px; }

/* 404 & panier vide */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state .mascot { max-width: 220px; margin: 0 auto 20px; }
.empty-state .signature { display: block; margin-top: 16px; }

/* Footer */
.footer { padding: 60px 0 40px; background: #fff; border-top: 1px solid rgba(42,38,36,0.06); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-trust { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; font-size: 0.85rem; color: var(--c-secondary); }

/* ============================================
   RESPONSIVE — mobile & tablette
   ============================================ */

/* Container : padding réduit + max-width */
@media (max-width: 900px) {
  .container { padding: 0 16px; }
}

/* Header : nav → hamburger en dessous de 900px */
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--c-text);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 24px; height: 2px; background: var(--c-text);
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Overlay derrière le drawer (dimme le body pour focaliser sur le menu) */
.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(42,38,36,0.72);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 150;
}
.nav-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  /* Drawer plein écran depuis la droite, au-dessus de tout (bandeau inclus) */
  .header-dual nav {
    position: fixed; top: 0; right: 0; bottom: 0; height: 100dvh; height: 100vh;
    width: min(300px, 80vw);
    background: #F5F1EB;
    padding: 72px 24px 32px;
    transform: translateX(102%); transition: transform .28s ease;
    box-shadow: -12px 0 28px rgba(42,38,36,0.25);
    z-index: 210;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .header-dual nav[aria-hidden="false"] { transform: translateX(0); }
  /* Petit label "Menu" en haut du drawer */
  .header-dual nav::before {
    content: "Menu";
    font-family: var(--f-heading); font-weight: 600; font-size: 0.85rem;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--c-secondary);
    position: absolute; top: 30px; left: 24px;
  }
  .header-dual nav ul {
    flex-direction: column !important;
    gap: 4px !important;
    font-size: 1.05rem;
  }
  .header-dual nav ul li a {
    display: block; padding: 14px 4px;
    border-bottom: 1px solid rgba(42,38,36,0.08);
    color: var(--c-text);
  }
  .header-dual nav ul li:last-child a { border-bottom: 0; }
  .header-mascots .brand { font-size: 1.05rem !important; }
  .header-mascots img { width: 34px !important; height: 34px !important; }
  .header-dual > .container { flex-wrap: nowrap; gap: 8px; }
  .header-dual .header-actions a { font-size: 1.1rem; }
  /* Le hamburger reste cliquable au-dessus du drawer (pour fermer) */
  .nav-toggle { position: relative; z-index: 220; }
}
@media (min-width: 901px) {
  /* En desktop, le scrim ne doit jamais apparaître */
  .nav-scrim { display: none; }
}

/* Hero : image ne déborde pas, texte plus lisible */
@media (max-width: 780px) {
  .hero { padding: 40px 0 30px; }
  .hero-img { max-width: 100% !important; height: auto; }
  .hero h1 { font-size: clamp(1.6rem, 6vw, 2rem); }
  .hero p { font-size: 1rem !important; }
}

/* Sections : padding réduit */
@media (max-width: 780px) {
  .section { padding: 48px 0; }
  .section h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
  /* Header row du bloc univers : chapo + CTA en colonne */
  .section > .container > div:first-child { flex-direction: column; align-items: flex-start !important; }
  .section > .container > div:first-child > a { align-self: stretch; text-align: center; justify-content: center; }
}

/* Grilles produits : ajustement pour tenir en 2 colonnes minimum sur mobile large,
   1 colonne pleine largeur ne pas dépasser */
@media (max-width: 780px) {
  .section .container > div[style*="grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  .card-product { padding: 12px !important; }
  .card-product h3 { font-size: 0.85rem !important; line-height: 1.3; }
  .card-product img { border-radius: 6px !important; }
}
@media (max-width: 420px) {
  .section .container > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Portrait IA : titres et bulles à réduire */
@media (max-width: 780px) {
  #portrait-ia h2 { font-size: 1.55rem; }
  #portrait-ia p { font-size: 0.95rem !important; }
  #portrait-ia ul { font-size: 0.9rem; }
}

/* Journal (blog cards) : forcer 1 colonne en mobile pour lisibilité */
@media (max-width: 780px) {
  #journal .container > div[style*="grid"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Footer : 2 colonnes sur mobile large, 1 sur petit */
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
.footer-trust { gap: 12px; }
@media (max-width: 780px) {
  .footer { padding: 40px 0 30px; }
  .footer-trust { font-size: 0.75rem; }
}

/* Chatbot bubble : plus compact en mobile, ne cache pas le CTA panier */
@media (max-width: 780px) {
  .chatbot-bubble {
    bottom: 16px; right: 16px;
    padding: 10px 14px 10px 10px;
    font-size: 0.8rem;
  }
  .chatbot-bubble .avatars img { width: 26px; height: 26px; }
}

/* Empty states (404, panier) : mascotte plus petite */
@media (max-width: 780px) {
  .empty-state { padding: 50px 16px; }
  .empty-state .mascot { max-width: 180px !important; }
  .empty-state h1 { font-size: 1.5rem; }
}

/* Bandeau preview : tronquer proprement le texte long */
.preview-banner { line-height: 1.35; }
@media (max-width: 780px) {
  .preview-banner {
    font-size: 0.7rem !important;
    padding: 6px 12px !important;
    white-space: normal !important;
  }
  .preview-banner strong { display: inline-block; }
  body { padding-top: 44px !important; }
}

/* --- polish mobile v2 --- */
@media (max-width: 500px) {
  .header-mascots img { width: 30px !important; height: 30px !important; }
  .header-mascots .brand { font-size: 0.9rem !important; letter-spacing: -0.01em; }
  .header-dual > .container { padding: 12px 12px; }
  .header-actions a { font-size: 0.95rem; }
  .header-actions { gap: 10px !important; }
}
@media (max-width: 780px) {
  .hero { padding: 30px 0 40px; }
  .hero-img { max-width: 88% !important; margin: 0 auto 24px !important; display: block; }
  .hero h1 {
    font-size: clamp(1.3rem, 5.5vw, 1.7rem) !important;
    word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;
    line-height: 1.2;
    padding: 0 4px;
  }
  .hero p { padding: 0 4px; font-size: 0.95rem !important; }
  .hero .btn { padding: 12px 20px !important; font-size: 0.9rem !important; }
}

/* Chatbot bulle : moins invasive en mobile */
@media (max-width: 780px) {
  .chatbot-bubble {
    bottom: 12px; right: 12px;
    padding: 8px 12px 8px 8px;
    font-size: 0.74rem;
    max-width: calc(100vw - 24px);
  }
  .chatbot-bubble .avatars img { width: 22px; height: 22px; }
  .chatbot-bubble .avatars img:nth-child(2) { margin-left: -8px; }
}

/* Bandeau preview : mieux tenir sur 1 ligne quand possible, sinon wrap propre */
.preview-banner strong { font-weight: 700; }
@media (max-width: 500px) {
  .preview-banner { font-size: 0.65rem !important; padding: 5px 10px !important; }
  body { padding-top: 42px !important; }
}

/* About page : titre h1 aussi à contrôler */
.about-hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); word-wrap: break-word; hyphens: auto; padding: 0 8px; }
@media (max-width: 500px) {
  .about-hero { padding: 32px 0 24px !important; }
  .about-body { padding: 0 20px 60px !important; font-size: 0.98rem !important; }
  .mascot-duo img { max-width: 130px; margin: 0 auto; }
}
