/* ==========================================================================
   YuguTech — thèmes
   1. classique  : clair, sobre, professionnel (valeurs de style.css)
   2. verre      : sombre, verre dépoli, dégradés — très « 2026 »
   3. editorial  : papier chaud, typographie serif, esprit magazine

   Le thème est appliqué sur <html data-theme="…"> par app.js.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SOBRE (par défaut) — aucun changement : tout est dans style.css
   -------------------------------------------------------------------------- */

html[data-theme="classique"] {
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. VERRE — sombre, translucide, dégradés
   -------------------------------------------------------------------------- */

html[data-theme="verre"] {
  color-scheme: dark;

  --fond: #08090d;
  --panneau: #12151f;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.105);

  --bordure: rgba(255, 255, 255, 0.1);
  --bordure-forte: rgba(255, 255, 255, 0.22);

  --texte: #f4f6fb;
  --texte-2: #b8bfcd;
  --muet: #8b92a2;

  --accent: #8fb0ff;
  --accent-fonce: #aac4ff;
  --accent-doux: rgba(143, 176, 255, 0.14);
  --accent-bordure: rgba(143, 176, 255, 0.34);

  --vert: #4ade80;
  --vert-doux: rgba(74, 222, 128, 0.12);
  --vert-bordure: rgba(74, 222, 128, 0.3);

  --ambre: #fbbf24;
  --ambre-doux: rgba(251, 191, 36, 0.1);
  --ambre-bordure: rgba(251, 191, 36, 0.3);
  --ambre-fonce: #fcd34d;

  --sur-accent: #08090d;
  --survol: rgba(255, 255, 255, 0.06);
  --fond-image: #f6f7fa;
  --icone: #6b7280;
  --favori-fond: rgba(12, 14, 20, 0.72);
  --entete-fond: rgba(8, 9, 13, 0.68);
  --anneau: 0 0 0 3px rgba(143, 176, 255, 0.28);

  --grille: rgba(255, 255, 255, 0.07);

  --rayon: 18px;
  --rayon-petit: 12px;
  --ombre: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --ombre-haute: 0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 30px 60px -28px rgba(0, 0, 0, 1);
}

html[data-theme="verre"] body {
  background:
    radial-gradient(1100px 620px at 10% -10%, rgba(70, 105, 255, 0.3), transparent 62%),
    radial-gradient(900px 540px at 95% -6%, rgba(168, 85, 247, 0.24), transparent 58%),
    radial-gradient(760px 520px at 45% 112%, rgba(20, 184, 166, 0.16), transparent 62%),
    #08090d;
  background-attachment: fixed;
}

html[data-theme="verre"] .carte {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.028));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

html[data-theme="verre"] .carte:hover {
  border-color: rgba(143, 176, 255, 0.4);
  box-shadow:
    0 0 0 1px rgba(143, 176, 255, 0.18),
    0 34px 70px -30px rgba(70, 110, 255, 0.55);
}

html[data-theme="verre"] .hero h1 {
  background: linear-gradient(180deg, #ffffff 25%, #a9bcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Le titre est découpé en mots pour l'animation : sans cette règle, les mots
   deviennent invisibles (le dégradé ne suit pas les enfants inline-block). */
html[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-theme="verre"] .entete {
  background: var(--entete-fond);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="verre"] .modale__carte {
  background: #0f1118;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="verre"] .bouton {
  background: linear-gradient(180deg, #9dbcff, #7c9bff);
  border-color: transparent;
  box-shadow: 0 10px 30px -12px rgba(120, 155, 255, 0.75);
}

html[data-theme="verre"] .bouton:hover {
  background: linear-gradient(180deg, #b2caff, #93adff);
  border-color: transparent;
}

html[data-theme="verre"] .bouton-liste[aria-pressed="true"] {
  color: var(--accent);
}

html[data-theme="verre"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23b8bfcd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="verre"] .pied {
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="verre"] .puce[aria-pressed="true"] {
  background: #f4f6fb;
  border-color: #f4f6fb;
  color: #08090d;
}

html[data-theme="verre"] .logo__icone {
  fill: #7c9bff;
}

/* --------------------------------------------------------------------------
   3. ÉDITORIAL — papier chaud, serif, filets fins
   -------------------------------------------------------------------------- */

html[data-theme="editorial"] {
  color-scheme: light;

  --fond: #f7f5f0;
  --panneau: #fffdf9;
  --surface: #fffdf9;
  --surface-2: #f1ece1;
  --surface-3: #e6e0d2;

  --bordure: #e2dccd;
  --bordure-forte: #c8bfab;

  --texte: #1a1512;
  --texte-2: #4b423a;
  --muet: #857a6b;

  --accent: #9a3412;
  --accent-fonce: #7c2d12;
  --accent-doux: #fdf1e9;
  --accent-bordure: #eec9b6;

  --vert: #2f5d3f;
  --vert-doux: #eef3ee;
  --vert-bordure: #c4d6c7;

  --ambre: #8a5a00;
  --ambre-doux: #fbf3e0;
  --ambre-bordure: #e7d2a2;
  --ambre-fonce: #8a5a00;

  --sur-accent: #fffdf9;
  --survol: #f3efe6;
  --fond-image: #fffdf9;
  --icone: #a89e8f;
  --favori-fond: rgba(255, 253, 249, 0.9);
  --entete-fond: rgba(247, 245, 240, 0.9);
  --anneau: 0 0 0 3px rgba(154, 52, 18, 0.14);

  --rayon: 5px;
  --rayon-petit: 4px;
  --ombre: none;
  --ombre-haute: none;

  --police-titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
}

html[data-theme="editorial"] .hero h1 {
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(2.15rem, 4.8vw, 3.3rem);
  line-height: 1.02;
}

html[data-theme="editorial"] .hero__surtitre {
  letter-spacing: 0.14em;
}

html[data-theme="editorial"] .carte {
  border-color: var(--bordure);
}

html[data-theme="editorial"] .carte:hover {
  transform: none;
  border-color: var(--bordure-forte);
}

html[data-theme="editorial"] .carte__titre {
  font-family: var(--police-titre);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

html[data-theme="editorial"] .carte__prix .prix {
  font-weight: 600;
  letter-spacing: -0.02em;
}

html[data-theme="editorial"] .puce {
  border-radius: 3px;
  background: transparent;
  border-color: var(--bordure-forte);
}

html[data-theme="editorial"] .puce[aria-pressed="true"] {
  background: var(--texte);
  border-color: var(--texte);
  color: var(--fond);
}

html[data-theme="editorial"] .etiquette-eco {
  border-radius: 2px;
  background: transparent;
}

html[data-theme="editorial"] .bouton,
html[data-theme="editorial"] .bouton-liste,
html[data-theme="editorial"] select,
html[data-theme="editorial"] .recherche,
html[data-theme="editorial"] .entete {
  border-radius: 3px;
}

html[data-theme="editorial"] .produit__titre,
html[data-theme="editorial"] .modale__carte .produit__titre {
  font-family: var(--police-titre);
  font-weight: 600;
}

html[data-theme="editorial"] .modale__carte {
  border: 1px solid var(--bordure-forte);
  border-radius: 4px;
}

html[data-theme="editorial"] .pied {
  border-top: 1px solid var(--bordure-forte);
}
