/*
 * Niuweb — 04. Direction artistique « Aurora Glass ».
 * Fichier volontairement isolé : couleurs, intensité du grain et verre se règlent ici.
 * Le glassmorphism a besoin d'un arrière-plan texturé/coloré pour être perceptible.
 * Aucune bibliothèque, aucun canvas animé, aucune image de décor téléchargée.
 */
:root {
  --glass-fill: rgba(255, 255, 255, .38);
  --glass-stroke: rgba(255, 255, 255, .89);
  --glass-inner: rgba(255, 255, 255, .78);
  --glass-drop: 0 22px 70px rgba(24, 75, 86, .095), 0 5px 15px rgba(24, 75, 86, .035);
  --glass-blur: 26px;
  --grain-strength: .30;
  --mint-glow: rgba(60, 227, 195, .68);
  --violet-glow: rgba(160, 121, 248, .60);
  --pink-glow: rgba(250, 126, 170, .54);
  --blue-glow: rgba(95, 189, 251, .57);
}
:root[data-theme="dark"] {
  --glass-fill: var(--surface);
  --glass-stroke: rgba(206, 255, 246, .27);
  --glass-inner: rgba(227, 255, 252, .17);
  --glass-drop: 0 25px 64px rgba(0, 0, 0, .3);
  --mint-glow: rgba(38, 191, 175, .55);
  --violet-glow: rgba(141, 109, 238, .46);
  --pink-glow: rgba(228, 101, 175, .36);
  --blue-glow: rgba(69, 137, 216, .40);
}

/* Grain photographique SVG (feTurbulence), présent sur TOUTES les surfaces. */
body::before {
  opacity: var(--grain-strength);
  background-image: url('../svg/film-grain.svg');
  background-repeat: repeat;
  background-size: 192px 192px;
  mix-blend-mode: multiply;
  z-index: 70;
}

/* Un peu de lumière derrière le header pour rendre le toggle vitrifié. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 145px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.34), transparent);
}
:root[data-theme="dark"] .site-header::before { content:none; }

/* HERO : 3 nappes lumineuses en arrière-plan, non animées en permanence. */
.hero__aura {
  width: min(1000px, 77vw);
  height: 790px;
  top: -10px;
  right: -205px;
  filter: blur(39px) saturate(124%);
  opacity: .94;
  background:
    radial-gradient(ellipse 31% 35% at 39% 28%,var(--mint-glow),transparent 90%),
    radial-gradient(ellipse 35% 39% at 68% 32%,var(--blue-glow),transparent 85%),
    radial-gradient(ellipse 36% 41% at 71% 61%,var(--violet-glow),transparent 90%),
    radial-gradient(ellipse 30% 28% at 39% 75%,var(--pink-glow),transparent 95%);
}
.hero__visual { isolation: isolate; }
.hero__glow {
  inset: -8% -9% -3% -12%;
  z-index: -2;
  filter: blur(21px) saturate(130%);
  border-radius: 45%;
  opacity: .95;
  background:
    radial-gradient(ellipse 38% 40% at 29% 34%, rgba(92,240,219,.64), transparent 94%),
    radial-gradient(ellipse 42% 46% at 68% 24%, rgba(101,197,250,.55), transparent 94%),
    radial-gradient(ellipse 38% 44% at 86% 68%, rgba(208,133,254,.62), transparent 94%),
    radial-gradient(ellipse 45% 33% at 27% 77%, rgba(252,155,198,.50), transparent 94%);
}
/* Le contour lumineux est en verre, pas en trait plein opaque. */
.glass-panel {
  border: 1.5px solid var(--glass-stroke);
  background: linear-gradient(139deg,rgba(255,255,255,.42),rgba(255,255,255,.08) 38%,rgba(183,236,246,.10) 70%,rgba(255,255,255,.24));
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.89), inset -1px -1px 0 rgba(255,255,255,.26), 0 18px 42px rgba(49,108,132,.10);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
}
.glass-panel--back { transform: translate(33px,-27px) rotate(8deg); opacity: .75; }
.glass-panel--mid { transform: translate(-19px,19px) rotate(-7deg); opacity: .9; }
.browser-window {
  top: 22%;
  left: 5%;
  width: 94%;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 38px 85px rgba(31,77,94,.20), 0 8px 20px rgba(27,72,87,.09), inset 0 2px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(27px) saturate(175%);
  -webkit-backdrop-filter: blur(27px) saturate(175%);
}
.browser-window__bar { border-radius: 11px 11px 0 0; background: rgba(250,253,251,.85); }
.browser-window__image { border-radius: 0 0 11px 11px; }

/* Glassmorphism physique : translucidité + reflet directionnel + bord clair + ombre. */
.glass-card, .glass-chip, .theme-toggle {
  background: linear-gradient(135deg,rgba(255,255,255,.24),transparent 45%), var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-drop), inset 0 1px 0 var(--glass-inner);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
}
.glass-card { position:relative; isolation:isolate; }
.glass-card::after {
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  pointer-events:none;
  z-index:-1;
  background:linear-gradient(124deg,rgba(255,255,255,.20),transparent 34%,transparent 77%,rgba(255,255,255,.11));
}
.service-card:hover,.project-card:hover {
  border-color: rgba(255,255,255,.94);
  box-shadow: 0 27px 65px rgba(31,101,111,.16), inset 0 1px 0 rgba(255,255,255,.88);
}
.glass-chip {
  background: linear-gradient(122deg,rgba(255,255,255,.76),rgba(255,255,255,.29));
  border: 1px solid rgba(255,255,255,.94);
  box-shadow: 0 18px 36px rgba(36,83,99,.13), inset 0 1px 0 rgba(255,255,255,.94);
  backdrop-filter: blur(32px) saturate(165%);
  -webkit-backdrop-filter: blur(32px) saturate(165%);
}
.theme-toggle { background: rgba(255,255,255,.30); }
.button--outline { backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); background:rgba(255,255,255,.29); border-color:rgba(255,255,255,.80); box-shadow:inset 0 1px 0 rgba(255,255,255,.80),0 3px 16px rgba(31,85,86,.06); }

/* AMBIANCE : grands dégradés organiques DERRIÈRE les cartes vitrées. */
.services,.approach,.work { isolation:isolate; overflow:hidden; }
.services > .container,.approach > .container,.work > .container { position:relative; z-index:2; }
.atmosphere {
  position:absolute;
  z-index:0;
  pointer-events:none;
  background-repeat:no-repeat;
  filter:blur(34px) saturate(137%);
  opacity:.84;
  border-radius:50%;
}
.atmosphere--services {
  top:16%; left:-7%; width:118%; height:88%;
  background:
    radial-gradient(ellipse 26% 47% at 9% 83%,rgba(70,218,202,.50),transparent 88%),
    radial-gradient(ellipse 25% 51% at 48% 67%,rgba(122,186,245,.39),transparent 90%),
    radial-gradient(ellipse 20% 55% at 78% 52%,rgba(204,143,251,.43),transparent 90%),
    radial-gradient(ellipse 17% 35% at 97% 77%,rgba(255,163,183,.32),transparent 90%);
}
.atmosphere--work {
  top:9%; left:-7%; width:116%; height:100%;
  background:
    radial-gradient(ellipse 24% 42% at 31% 75%,rgba(103,220,216,.44),transparent 88%),
    radial-gradient(ellipse 23% 49% at 63% 51%,rgba(174,142,245,.39),transparent 88%),
    radial-gradient(ellipse 20% 41% at 98% 75%,rgba(91,200,234,.49),transparent 89%);
}
/* Dans l'approche, le glow est derrière la photo, donc visible dans le verre. */
.approach__orb {
  filter:blur(30px) saturate(136%);
  background:
    radial-gradient(ellipse at 26% 37%,rgba(68,222,203,.60),transparent 64%),
    radial-gradient(ellipse at 73% 57%,rgba(171,120,247,.54),transparent 61%),
    radial-gradient(ellipse at 45% 81%,rgba(247,157,181,.39),transparent 62%);
}
.portrait-card { padding:11px; background:rgba(255,255,255,.30); }
.project-card { background:linear-gradient(143deg,rgba(255,255,255,.38),rgba(255,255,255,.19)); }
.project-card__media { border:1px solid rgba(255,255,255,.52); }

/* Bandeau final : grain et lumière colorée À L'INTÉRIEUR du panneau. */
.contact__panel {
  border:1px solid rgba(205,255,240,.30);
  box-shadow:0 24px 70px rgba(12,64,69,.17),inset 0 1px 0 rgba(255,255,255,.14);
}
.contact__panel::after {
  content:"";position:absolute;inset:0;border-radius:inherit;z-index:0;pointer-events:none;
  background-image:url('../svg/film-grain.svg');
  background-size:210px 210px;opacity:.34;mix-blend-mode:screen;
}
.contact__decoration--left { filter:blur(17px) saturate(130%); opacity:.85; }
.contact__decoration--right { filter:blur(16px) saturate(130%); opacity:.89; }

/* Dark mode : glass toujours lisible, images inchangées. */
:root[data-theme="dark"] .glass-card { background:var(--glass-fill); }
:root[data-theme="dark"] .glass-card::after { opacity:.38; }
:root[data-theme="dark"] .glass-panel { background:linear-gradient(120deg,rgba(165,246,237,.21),rgba(70,95,132,.10) 59%,rgba(187,140,254,.12));box-shadow:inset 0 1px 0 rgba(212,255,250,.22),0 15px 48px rgba(0,0,0,.22); }
:root[data-theme="dark"] .theme-toggle { background:rgba(44,73,72,.40); }
:root[data-theme="dark"] .glass-chip { background:linear-gradient(120deg,rgba(240,255,251,.82),rgba(221,250,248,.54)); color:#153938; }
:root[data-theme="dark"] .button--outline { background:rgba(102,162,158,.11);border-color:rgba(175,229,215,.30); }

/* La transparence reste élégante si un navigateur ne sait pas flouter. */
@supports not ((backdrop-filter: blur(5px)) or (-webkit-backdrop-filter: blur(5px))) {
  .glass-card { background:rgba(248,254,252,.91); }
  .glass-panel { background:rgba(229,246,247,.7); }
  .glass-chip { background:rgba(247,255,252,.93); }
  :root[data-theme="dark"] .glass-panel { background:rgba(40,75,76,.86); }
}
@media (max-width:860px) {
  .hero__aura { width:105%; height:65%; top:36%; right:-12%; filter:blur(28px); }
  .atmosphere { filter:blur(28px) saturate(125%); }
}
@media (max-width:640px) {
  :root { --grain-strength:.24; --glass-blur:18px; }
  .hero__glow { inset:0 -4%;filter:blur(18px); }
  .hero__aura { top:44%;height:54%; }
  .atmosphere--services,.atmosphere--work { left:-25%;width:155%; }
  .glass-panel { backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px); }
  .browser-window { padding:4px; }
  .glass-chip { backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px); }
}
/* Reflet qui suit doucement le pointeur : uniquement sur les cartes interactives. */
.service-card::before,.project-card::before {
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  z-index:0;
  pointer-events:none;
  opacity:0;
  background:radial-gradient(380px circle at var(--glint-x,50%) var(--glint-y,0%),rgba(255,255,255,.52),transparent 66%);
  transition:opacity .35s ease;
}
.service-card:hover::before,.project-card:hover::before,.service-card:focus-within::before { opacity:.9; }
.service-card > *,.project-card > * { position:relative;z-index:1; }
:root[data-theme="dark"] .service-card::before,:root[data-theme="dark"] .project-card::before {
  background:radial-gradient(350px circle at var(--glint-x,50%) var(--glint-y,0%),rgba(144,243,223,.17),transparent 69%);
}
@media (prefers-reduced-motion:no-preference) and (min-width:861px) {
  .hero__glow { animation:aurora-breathe 13s ease-in-out infinite alternate; }
}
@keyframes aurora-breathe { from {transform:translate3d(-1%,1%,0) scale(.96);} to {transform:translate3d(2%,-2%,0) scale(1.04);} }
@media (prefers-reduced-motion:reduce) {
  .hero__glow { animation:none; }
  .service-card::before,.project-card::before { transition:none; }
}
