/* ==========================================================================
   OTYCHE — Couche de finition "Premium"
   Se charge APRÈS style.css : n'écrase rien, ajoute uniquement de la
   profondeur (glassmorphism, dégradés, glow, micro-animations) sur les
   composants existants. Aucune fonctionnalité, aucune classe supprimée.
   ========================================================================== */

:root {
  --grad-brand: linear-gradient(135deg, #4169E1 0%, #6E8CF0 55%, #8AA6FF 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(65,105,225,.14), rgba(110,140,240,.06));
  --grad-mesh: radial-gradient(circle at 15% 20%, rgba(65,105,225,.16), transparent 45%),
               radial-gradient(circle at 85% 15%, rgba(110,140,240,.14), transparent 40%),
               radial-gradient(circle at 50% 100%, rgba(46,76,184,.12), transparent 50%);
  --glow-brand: 0 0 0 1px rgba(65,105,225,.25), 0 18px 40px -12px rgba(65,105,225,.55);
  --glass-bg: rgba(255,255,255,.62);
  --glass-border: rgba(255,255,255,.35);
  --ease-premium: cubic-bezier(.19,1,.22,1);
}
html[data-theme="dark"] {
  --glass-bg: rgba(23,27,38,.55);
  --glass-border: rgba(255,255,255,.08);
}

/* Respect total du mode "mouvement réduit" pour toute la couche premium */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .btn-magnetic, .card-otyche, .article-slide-card, .tilt-3d { transition: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Barre de progression de lecture (scroll)                                */
/* ---------------------------------------------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-brand);
  z-index: 2100;
  box-shadow: 0 0 12px rgba(65,105,225,.7);
  transition: width .1s linear;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }

/* ---------------------------------------------------------------------- */
/* Header — verre dépoli renforcé au scroll                                */
/* ---------------------------------------------------------------------- */
.site-header {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background-color .35s ease, box-shadow .35s ease, backdrop-filter .35s ease, border-color .35s ease;
}
.site-header.is-scrolled {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px -12px rgba(15,23,55,.18);
}
.site-header .nav-link, .site-header .navbar-brand { position: relative; }

/* ---------------------------------------------------------------------- */
/* Boutons — dégradé, lueur, effet miroir au survol                        */
/* ---------------------------------------------------------------------- */
.btn-otyche {
  background: var(--grad-brand);
  border: none;
  position: relative;
  box-shadow: 0 6px 18px -6px rgba(65,105,225,.45);
  will-change: transform;
}
.btn-otyche::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  background-size: 220% 100%;
  background-position: 120% 0;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.btn-otyche:hover::after { opacity: 1; animation: otyche-sheen 1.1s var(--ease-premium); }
.btn-otyche:hover, .btn-otyche:focus {
  background: var(--grad-brand);
  transform: translateY(-3px);
  box-shadow: var(--glow-brand);
}
@keyframes otyche-sheen { from { background-position: 120% 0; } to { background-position: -20% 0; } }

.btn-outline-otyche { backdrop-filter: blur(2px); }
.btn-outline-otyche:hover { box-shadow: var(--glow-brand); }

.btn-otyche, .btn-outline-otyche, .btn-otyche-dark {
  transition: transform .35s var(--ease-premium), box-shadow .35s var(--ease-premium), background-color .25s ease;
}

/* Attraction magnétique (pilotée en JS via --mx/--my sur .btn-magnetic) */
.btn-magnetic { transform: translate(var(--mx, 0), var(--my, 0)); }

/* Effet ripple au clic (ajouté dynamiquement en JS : span.btn-ripple) */
.btn-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.55);
  transform: scale(0); opacity: .65;
  animation: otyche-ripple .6s ease-out forwards;
}
@keyframes otyche-ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------------------------------------------------------------------- */
/* Cartes — verre, profondeur, hover 3D léger                              */
/* ---------------------------------------------------------------------- */
.card-otyche {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .45s var(--ease-premium), box-shadow .45s var(--ease-premium), border-color .3s ease;
}
.card-otyche:hover {
  box-shadow: 0 30px 60px -24px rgba(23,32,66,.28), var(--glow-brand);
}
html[data-theme="dark"] .card-otyche:hover {
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), var(--glow-brand);
}

/* Variante verre pour widgets/encarts */
.glass-card, .stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
}

/* Éléments flottants décoratifs réutilisables */
.floaty { animation: otyche-float 6s ease-in-out infinite; }
.floaty-slow { animation: otyche-float 9s ease-in-out infinite; }
@keyframes otyche-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(6px); }
}

/* Apparition "blur reveal" — activée en JS via .js-reveal-blur.in-view */
.js-reveal-blur { opacity: 0; filter: blur(14px); transform: translateY(18px); transition: opacity .8s var(--ease-premium), filter .8s var(--ease-premium), transform .8s var(--ease-premium); }
.js-reveal-blur.in-view { opacity: 1; filter: blur(0); transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* Hero — profondeur et lumière additionnelles                             */
/* ---------------------------------------------------------------------- */
.hero-slider { position: relative; }
.hero-slider::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-mesh);
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}
.hs-aurora { filter: blur(70px) saturate(140%); }
.hero-illustration-glow { animation: otyche-glow-pulse 4.5s ease-in-out infinite; }
@keyframes otyche-glow-pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.06); }
}
.hero-cta .btn-otyche { letter-spacing: .01em; }

/* ---------------------------------------------------------------------- */
/* Slider d'articles — carte verre premium                                 */
/* ---------------------------------------------------------------------- */
.article-slide-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform .5s var(--ease-premium), box-shadow .5s var(--ease-premium), border-color .3s ease;
}
.article-slide-card:hover {
  transform: translateY(-10px) scale(1.012);
  border-color: rgba(65,105,225,.35);
  box-shadow: 0 34px 60px -22px rgba(65,105,225,.35);
}
.article-slide-card-media { position: relative; }
.article-slide-card-media::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,14,20,.75) 0%, rgba(12,14,20,.05) 45%, transparent 70%);
  z-index: 1;
  opacity: .85;
  transition: opacity .4s ease;
}
.article-slide-card:hover .article-slide-card-media::before { opacity: .95; }
.article-slide-card-img { transition: transform .7s var(--ease-premium), filter .5s ease; }
.article-slide-card:hover .article-slide-card-img { transform: scale(1.12); filter: saturate(1.08); }
.article-slide-card-tag {
  backdrop-filter: blur(6px);
  background: rgba(65,105,225,.85) !important;
  box-shadow: 0 6px 16px -4px rgba(65,105,225,.6);
}
.article-slide-card-title { transition: color .25s ease; }
.article-slide-card:hover .article-slide-card-title { color: var(--bleu-principal); }
.article-slide-card-more {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600; color: var(--bleu-principal);
  transition: gap .3s var(--ease-premium);
}
.row-slider-arrow { backdrop-filter: blur(8px); }

/* ---------------------------------------------------------------------- */
/* Footer — dégradé + liens légaux resserrés                               */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: radial-gradient(circle at 15% 0%, rgba(65,105,225,.16), transparent 55%), var(--fond-sombre);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110,140,240,.55), transparent);
}
.footer-social a { transition: transform .3s var(--ease-premium), background-color .25s ease, box-shadow .25s ease; }
.footer-social a:hover { box-shadow: 0 8px 20px -6px rgba(65,105,225,.6); }

/* Regroupe les 3 liens légaux avec un espacement resserré et cohérent,
   et garantit qu'ils restent alignés sur UNE seule ligne, y compris en
   mobile (demande explicite : Confidentialité / CGU / Mentions légales) */
.footer-legal-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .55rem;
  white-space: nowrap;
}
.footer-legal-links .footer-privacy-link { position: relative; padding-right: .65rem; }
.footer-legal-links .footer-privacy-link:not(:last-child)::after {
  content: "";
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .5;
}
@media (max-width: 767px) {
  .footer-main { gap: .85rem; }
  .footer-legal-links {
    justify-content: center;
    gap: .4rem;
    font-size: .78rem;
    max-width: 100%;
  }
  .footer-legal-links .footer-privacy-link { padding-right: .5rem; white-space: nowrap; }
}
@media (max-width: 360px) {
  .footer-legal-links { font-size: .72rem; gap: .3rem; }
  .footer-legal-links .footer-privacy-link { padding-right: .38rem; }
}

/* ---------------------------------------------------------------------- */
/* Cartes produit / boutique — cohérence premium                           */
/* ---------------------------------------------------------------------- */
.product-card, .card-produit-otyche {
  transition: transform .45s var(--ease-premium), box-shadow .45s var(--ease-premium);
}
.product-card:hover, .card-produit-otyche:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 50px -20px rgba(65,105,225,.35);
}

/* ---------------------------------------------------------------------- */
/* Stagger utilitaire pour listes de cartes (délai croissant en CSS pur)   */
/* ---------------------------------------------------------------------- */
.stagger-parent > * { animation: otyche-fade-up .6s var(--ease-premium) both; }
.stagger-parent > *:nth-child(1) { animation-delay: .03s; }
.stagger-parent > *:nth-child(2) { animation-delay: .09s; }
.stagger-parent > *:nth-child(3) { animation-delay: .15s; }
.stagger-parent > *:nth-child(4) { animation-delay: .21s; }
.stagger-parent > *:nth-child(5) { animation-delay: .27s; }
.stagger-parent > *:nth-child(6) { animation-delay: .33s; }
@keyframes otyche-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------------------------------------------------------------- */
/* Scrollbar fine et thématisée (support navigateurs Webkit)               */
/* ---------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(65,105,225,.35); border-radius: 100px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(65,105,225,.55); background-clip: padding-box; }
