/* ==========================================================================
   Direction « v3 » — commerce moderne
   Opt-in : <html data-design="v3"> (paramètre d'URL ?design=v3)

   Principes :
   - typographie Inter, titres serrés, hiérarchie nette ;
   - surfaces blanches sans bordure, ombres douces, rayons généreux ;
   - un seul accent indigo + un vert sourd pour les économies ;
   - photos sur fond dégradé, prix très lisible, boutique en pastille ;
   - boutons et étiquettes en pilule.
   ========================================================================== */

html[data-design="v3"][data-theme="classique"] {
  --fond: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-3: #ebebef;

  --bordure: #ececf1;
  --bordure-forte: #dcdce3;

  --texte: #0b0b0f;
  --texte-2: #52525b;
  --muet: #8b8b95;

  --accent: #4f46e5;
  --accent-fonce: #4338ca;
  --accent-doux: #eef0ff;
  --accent-bordure: #d6d9ff;

  --vert: #0f766e;
  --vert-doux: #effcf8;
  --vert-bordure: #b7e4d8;

  --rayon: 20px;
  --rayon-petit: 12px;
  --ombre: 0 1px 2px rgba(11, 11, 15, 0.04), 0 10px 30px -18px rgba(11, 11, 15, 0.22);
  --ombre-haute: 0 2px 4px rgba(11, 11, 15, 0.04), 0 24px 54px -26px rgba(11, 11, 15, 0.3);

  --police: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --police-titre: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

html[data-design="v3"][data-theme="classique"] body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.01em;
}

/* En-tête : filet discret plutôt qu'une bordure franche */
html[data-design="v3"][data-theme="classique"] .entete {
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--bordure);
}

html[data-design="v3"][data-theme="classique"] .recherche {
  background: var(--surface-2);
  border-color: transparent;
}

html[data-design="v3"][data-theme="classique"] .recherche:focus-within {
  background: var(--surface);
  border-color: var(--accent-bordure);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Accroche : titre plus grand, plus serré */
html[data-design="v3"][data-theme="classique"] .hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}

html[data-design="v3"][data-theme="classique"] .hero__surtitre {
  color: var(--accent);
  letter-spacing: 0.12em;
}

/* Boutons et étiquettes en pilule */
html[data-design="v3"][data-theme="classique"] .bouton,
html[data-design="v3"][data-theme="classique"] .bouton-liste,
html[data-design="v3"][data-theme="classique"] .menu-boutiques__bouton,
html[data-design="v3"][data-theme="classique"] .bouton-filtres {
  border-radius: 999px;
}

html[data-design="v3"][data-theme="classique"] .etiquette-eco,
html[data-design="v3"][data-theme="classique"] .etiquette-promo {
  border-radius: 999px;
  border: 0;
  padding: 3px 9px;
  letter-spacing: 0;
  backdrop-filter: blur(6px);
}

/* Barre de filtres : carte sans bordure */
html[data-design="v3"][data-theme="classique"] .filtres {
  border: 0;
  box-shadow: var(--ombre);
  padding: 18px 16px 20px;
}

html[data-design="v3"][data-theme="classique"] .filtres__bloc h3 {
  border-bottom: 0;
  padding-bottom: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

html[data-design="v3"][data-theme="classique"] .liste-filtres button {
  border-radius: 10px;
  padding: 7px 9px;
}

html[data-design="v3"][data-theme="classique"] .liste-filtres button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

html[data-design="v3"][data-theme="classique"] .liste-filtres button[aria-pressed="true"] .compte {
  color: rgba(255, 255, 255, 0.72);
}

/* Résultats : compteur plus affirmé */
html[data-design="v3"][data-theme="classique"] .resume {
  font-size: 0.95rem;
}

html[data-design="v3"][data-theme="classique"] .resume strong {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Cartes : sans bordure, photo sur dégradé, survol vivant */
html[data-design="v3"][data-theme="classique"] .grille {
  gap: 22px;
}

html[data-design="v3"][data-theme="classique"] .carte {
  border: 0;
  box-shadow: var(--ombre);
  border-radius: 20px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

html[data-design="v3"][data-theme="classique"] .carte:hover {
  transform: translateY(-4px);
  box-shadow: var(--ombre-haute);
}

html[data-design="v3"][data-theme="classique"] .carte__visuel {
  border-bottom: 0;
  background: linear-gradient(180deg, #f6f6f8 0%, #ffffff 82%);
  padding: 18px;
}

html[data-design="v3"][data-theme="classique"] .carte__visuel img {
  transition: transform 0.3s ease;
}

html[data-design="v3"][data-theme="classique"] .carte:hover .carte__visuel img {
  transform: scale(1.04);
}

html[data-design="v3"][data-theme="classique"] .carte__corps {
  padding: 13px 15px 16px;
  gap: 6px;
}

html[data-design="v3"][data-theme="classique"] .carte__marque {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--muet);
}

html[data-design="v3"][data-theme="classique"] .carte__titre {
  font-size: 0.925rem;
  font-weight: 550;
  line-height: 1.38;
  letter-spacing: -0.012em;
}

html[data-design="v3"][data-theme="classique"] .carte__prix .prix {
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

html[data-design="v3"][data-theme="classique"] .carte__boutique {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--texte-2);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0;
}

html[data-design="v3"][data-theme="classique"] .carte__autres {
  font-size: 0.75rem;
}

html[data-design="v3"][data-theme="classique"] .favori {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 8px -2px rgba(11, 11, 15, 0.25);
}

/* Fiche produit */
html[data-design="v3"][data-theme="classique"] .modale__carte {
  border-radius: 22px;
  padding: 28px;
}

html[data-design="v3"][data-theme="classique"] .produit__titre {
  font-size: 1.32rem;
  letter-spacing: -0.03em;
}

html[data-design="v3"][data-theme="classique"] .produit__meilleur .prix {
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

html[data-design="v3"][data-theme="classique"] .etiquette {
  border-radius: 999px;
  background: var(--surface-2);
}

html[data-design="v3"][data-theme="classique"] .offres tr.est-meilleure td {
  background: var(--vert-doux);
}

html[data-design="v3"][data-theme="classique"] .offre__lien {
  border-radius: 999px;
}

/* Pied de page */
html[data-design="v3"][data-theme="classique"] .pied {
  border-top: 0;
  box-shadow: 0 -1px 0 var(--bordure);
}

/* --------------------------------------------------------------------------
   Accroche : panneau encadré, commun aux trois thèmes
   Structure identique, couleurs propres à chaque direction.
   -------------------------------------------------------------------------- */

html[data-design="v3"] .hero {
  position: relative;
  margin: 20px 0 30px;
  padding: 56px 52px 50px;
  border-radius: 30px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 44px;
  overflow: hidden;
  isolation: isolate;
}

html[data-design="v3"] .hero__contenu {
  position: relative;
  z-index: 2;
}

/* Halo coloré derrière les fiches */
html[data-design="v3"] .hero::before {
  inset: -30% -18% auto 42%;
  height: 620px;
  z-index: 0;
  background:
    radial-gradient(42% 52% at 62% 34%, rgba(99, 102, 241, 0.42), transparent 68%),
    radial-gradient(36% 46% at 84% 16%, rgba(34, 211, 238, 0.26), transparent 70%),
    radial-gradient(34% 44% at 30% 88%, rgba(168, 85, 247, 0.22), transparent 72%);
  filter: blur(48px);
  animation: deriver 22s ease-in-out infinite alternate;
}

/* Trame technique */
html[data-design="v3"] .hero::after {
  z-index: 0;
  opacity: 1;
  -webkit-mask-image: radial-gradient(80% 90% at 30% 30%, #000 5%, transparent 72%);
  mask-image: radial-gradient(80% 90% at 30% 30%, #000 5%, transparent 72%);
}

html[data-design="v3"] .hero__surtitre {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

html[data-design="v3"] .hero__surtitre::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

html[data-design="v3"] .hero h1 {
  margin-top: 20px;
  font-size: clamp(2.5rem, 4.6vw, 4rem);
  line-height: 0.99;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

html[data-design="v3"] .hero__texte {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.6;
}

html[data-design="v3"] .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

html[data-design="v3"] .hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

html[data-design="v3"] .hero__cta:hover {
  transform: translateY(-1px);
}

html[data-design="v3"] .hero__vitrine {
  z-index: 1;
}

/* ------------------------------------------------------------------ clair -- */

html[data-design="v3"][data-theme="classique"] .hero {
  --grille: rgba(255, 255, 255, 0.055);
  color: #fff;
  background: radial-gradient(130% 150% at 8% -10%, #2a3260 0%, #161a35 38%, #0b0e1d 72%, #070912 100%);
  box-shadow:
    0 60px 100px -70px rgba(7, 9, 18, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-design="v3"][data-theme="classique"] .hero__surtitre {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
}

html[data-design="v3"][data-theme="classique"] .hero h1 {
  color: #fff;
}

html[data-design="v3"][data-theme="classique"] .hero h1 .mot:last-child {
  background: linear-gradient(100deg, #a5b4fc 0%, #7dd3fc 55%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-design="v3"][data-theme="classique"] .hero__texte {
  color: rgba(255, 255, 255, 0.72);
}

html[data-design="v3"][data-theme="classique"] .hero__cta {
  background: #fff;
  color: #0b0e1d;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.8);
}

html[data-design="v3"][data-theme="classique"] .hero__cta--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

html[data-design="v3"][data-theme="classique"] .hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

html[data-design="v3"][data-theme="classique"] .hero__vitrine .vitrine__carte {
  background: #fff;
  box-shadow:
    0 34px 60px -28px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ------------------------------------------------------------------ verre -- */

html[data-design="v3"][data-theme="verre"] .hero {
  --grille: rgba(255, 255, 255, 0.05);
  color: #eef2ff;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(120, 140, 255, 0.08) 100%
  );
  box-shadow:
    0 50px 100px -70px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

html[data-design="v3"][data-theme="verre"] .hero__surtitre {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: rgba(238, 242, 255, 0.82);
}

/* Le titre garde son dégradé, mais mot par mot (sinon il devient invisible
   quand les mots sont découpés pour l'animation). */
html[data-design="v3"][data-theme="verre"] .hero h1 .mot {
  background: linear-gradient(180deg, #ffffff 25%, #a9bcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-design="v3"][data-theme="verre"] .hero__texte {
  color: rgba(238, 242, 255, 0.7);
}

html[data-design="v3"][data-theme="verre"] .hero__cta {
  background: #fff;
  color: #0b1020;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.9);
}

html[data-design="v3"][data-theme="verre"] .hero__cta--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #eef2ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

html[data-design="v3"][data-theme="verre"] .hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

html[data-design="v3"][data-theme="verre"] .hero__vitrine .vitrine__carte {
  box-shadow:
    0 34px 60px -28px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* --------------------------------------------------------------- éditorial -- */

html[data-design="v3"][data-theme="editorial"] .hero {
  --grille: rgba(246, 241, 230, 0.07);
  color: #f6f1e6;
  background: linear-gradient(155deg, #201d16 0%, #17150f 52%, #100e09 100%);
  box-shadow:
    0 40px 80px -60px rgba(23, 21, 15, 0.9),
    inset 0 1px 0 rgba(246, 241, 230, 0.08);
}

/* Halo chaud, assorti au titre papier */
html[data-design="v3"][data-theme="editorial"] .hero::before {
  background:
    radial-gradient(44% 54% at 64% 32%, rgba(232, 178, 122, 0.3), transparent 70%),
    radial-gradient(38% 48% at 84% 14%, rgba(168, 162, 158, 0.26), transparent 72%),
    radial-gradient(34% 44% at 24% 86%, rgba(120, 90, 60, 0.28), transparent 74%);
}

html[data-design="v3"][data-theme="editorial"] .hero__surtitre {
  background: rgba(246, 241, 230, 0.07);
  box-shadow: inset 0 0 0 1px rgba(246, 241, 230, 0.14);
  color: rgba(246, 241, 230, 0.72);
}

html[data-design="v3"][data-theme="editorial"] .hero h1 {
  color: #f6f1e6;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* Touche éditoriale : dernier mot en italique, ton chaud */
html[data-design="v3"][data-theme="editorial"] .hero h1 .mot:last-child {
  font-style: italic;
  color: #e8b27a;
}

html[data-design="v3"][data-theme="editorial"] .hero__texte {
  color: rgba(246, 241, 230, 0.72);
  font-family: var(--police);
}

html[data-design="v3"][data-theme="editorial"] .hero__cta {
  background: #f6f1e6;
  color: #17150f;
}

html[data-design="v3"][data-theme="editorial"] .hero__cta--ghost {
  background: transparent;
  color: #f6f1e6;
  box-shadow: inset 0 0 0 1px rgba(246, 241, 230, 0.32);
}

html[data-design="v3"][data-theme="editorial"] .hero__cta--ghost:hover {
  background: rgba(246, 241, 230, 0.1);
}

html[data-design="v3"][data-theme="editorial"] .hero__vitrine .vitrine__carte {
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(246, 241, 230, 0.14);
}

/* ------------------------------------------------------------------ mobile -- */

@media (max-width: 900px) {
  html[data-design="v3"] .hero {
    margin: 12px 0 18px;
    padding: 34px 22px 30px;
    border-radius: 24px;
    /* Une seule colonne : sinon la fiche produit (masquée) garde sa colonne
       et le texte se retrouve écrasé sur quelques caractères. */
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  html[data-design="v3"] .hero__surtitre {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    padding: 5px 11px;
    line-height: 1.35;
    max-width: 100%;
  }

  html[data-design="v3"] .hero h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
    margin-top: 16px;
  }

  html[data-design="v3"] .hero__texte {
    font-size: 0.95rem;
    margin-top: 14px;
  }

  html[data-design="v3"] .hero__actions {
    margin-top: 20px;
  }

  html[data-design="v3"] .hero__cta {
    flex: 1 1 auto;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.88rem;
  }
}

/* --------------------------------------------------------------------------
   Fond « mesh » de la bande d'accroche — teintes modernes, charge après les
   thèmes pour l'emporter sur leur dégradé.
   -------------------------------------------------------------------------- */
html[data-theme] .hero,
.hero {
  background-color: #0a0a16 !important;
  background-image:
    radial-gradient(90% 120% at 12% 0%, rgba(59, 91, 255, 0.34), transparent 62%),
    radial-gradient(70% 110% at 88% 8%, rgba(147, 51, 234, 0.36), transparent 64%),
    radial-gradient(80% 120% at 62% 96%, rgba(16, 185, 129, 0.16), transparent 66%),
    radial-gradient(60% 90% at 30% 70%, rgba(236, 72, 153, 0.14), transparent 62%),
    linear-gradient(160deg, #0b0b1a 0%, #120f2b 46%, #0a0a16 100%) !important;
  border-radius: 26px;
}
