/* ==============================================================
   PORTFOLIO CHRISNAËL BERDIER — CSS Principal V3
   Architecture : Design tokens → Reset → Components → Layout → Pages
   ============================================================== */

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS — Système de variables CSS
   ─────────────────────────────────────────
   RÔLE : Centralise toutes les valeurs réutilisables du design
   (espacements, typographie, couleurs, ombres, durées).

   Définies sur :root = disponibles partout dans le CSS comme
   variables CSS custom (var(--nom)).

   EFFET DOMINO :
   → Changer --accent: #E8552E en #0066FF = TOUTES les couleurs
     d'accentuation (boutons, liens, barres, tags...) deviennent
     bleues en une seule modification.
   → Changer --text-hero: clamp(3rem, 2rem + 4.5vw, 7rem) =
     la taille du titre hero change sur tous les écrans.
     clamp(min, préféré, max) = min sur petits écrans, max sur grands.
   → Changer --z-modal: 200 en 50 = les modales passeraient
     DERRIÈRE la navigation (z-index: 100). Toujours garder
     z-modal > z-nav.
   → --ease-spring (cubic-bezier avec valeur > 1) produit un effet
     de rebond (overshoot). Remplacer par ease-out = pas de rebond.
   ═══════════════════════════════════════════════════════════════ */
/* ======== DESIGN TOKENS ======== */
:root {
  --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem;
  --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem;
  --space-3xl: 4rem; --space-4xl: 6rem;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.45vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.55vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 3rem);
  --text-3xl: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --text-hero: clamp(3rem, 2rem + 4.5vw, 7rem);

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms; --duration-base: 400ms; --duration-slow: 700ms;

  --z-particles: 1; --z-content: 10; --z-back-top: 50;
  --z-nav: 100; --z-modal: 200; --z-a11y: 300;
  --a11y-zoom: 1;
}

/* ═══════════════════════════════════════════════════════════════
   THÈME CLAIR & SOMBRE — Système de theming par data-attribute
   ──────────────────────────────────────────────────────────────
   RÔLE : Redéfinit les tokens de couleur selon le thème actif.

   MÉCANISME :
   L'attribut data-theme="dark" ou "light" est placé sur <html>
   par ThemeManager (JS). Le sélecteur [data-theme="dark"] { }
   redéfinit les mêmes variables CSS avec des valeurs adaptées.
   Tous les composants utilisent var(--bg-primary) etc., donc
   ils basculent automatiquement sans toucher à leur propre CSS.

   C'est le pattern "CSS custom properties pour le theming" :
   une seule source de vérité pour les couleurs, modifiable
   dynamiquement en JS via setAttribute().

   EFFET DOMINO :
   → Changer --accent en mode sombre = la couleur d'accentuation
     sera différente selon le thème (ex: orange sombre, rouge clair).
   → Changer --bg-primary en mode clair = le fond de toutes les
     pages en mode clair changera.
   → Ajouter un nouveau thème = créer un sélecteur
     [data-theme="sepia"] { } avec ses propres valeurs.
   ═══════════════════════════════════════════════════════════════ */
/* ======== MODE CLAIR ======== */
[data-theme="light"], :root {
  --bg-primary: #F5F2EC; --bg-secondary: #EDEAE3; --bg-tertiary: #E2DFD8;
  --bg-card: #FFFFFF; --bg-card-hover: #FAFAF8;
  --bg-nav: rgba(245, 242, 236, 0.88);
  --text-primary: #1A1A2E; --text-secondary: #4A4A5A;
  --text-tertiary: #7A7A8A; --text-inverse: #F5F2EC;
  --accent: #E8552E; --accent-hover: #D14420;
  --accent-soft: rgba(232, 85, 46, 0.1);
  --accent-secondary: #1D7AF2;
  --accent-secondary-soft: rgba(29, 122, 242, 0.1);
  --border: rgba(26, 26, 46, 0.08); --border-strong: rgba(26, 26, 46, 0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 30px rgba(232, 85, 46, 0.15);
}

/* ======== MODE SOMBRE ======== */
[data-theme="dark"] {
  --bg-primary: #0D0D11; --bg-secondary: #151519; --bg-tertiary: #1E1E24;
  --bg-card: #1A1A22; --bg-card-hover: #222230;
  --bg-nav: rgba(13, 13, 17, 0.9);
  --text-primary: #E8E4DE; --text-secondary: #A8A4A0;
  --text-tertiary: #6B6B7B; --text-inverse: #0D0D11;
  --accent: #FF7043; --accent-hover: #FF8A65;
  --accent-soft: rgba(255, 112, 67, 0.12);
  --accent-secondary: #5CA0FF;
  --accent-secondary-soft: rgba(92, 160, 255, 0.1);
  --border: rgba(255, 255, 255, 0.06); --border-strong: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(255, 112, 67, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE — Normalisation et styles fondamentaux
   ────────────────────────────────────────────────────
   RÔLE : Supprime les marges/paddings par défaut des navigateurs
   et établit les règles de base pour tout le document.

   box-sizing: border-box = le padding et la border sont inclus
   dans la largeur totale. Exemple : un div de width:200px avec
   padding:20px fait toujours 200px de large, pas 240px.

   scroll-padding-top: 80px = quand on navigue vers une ancre
   (#section), le scroll s'arrête 80px avant le haut de l'élément
   (compense la hauteur de la nav fixe de 70px + marge).

   font-size: calc(100% * var(--a11y-zoom)) = permet au widget
   accessibilité de modifier la taille globale des textes en
   changeant --a11y-zoom (JS injecte la valeur).

   -webkit-font-smoothing: antialiased = lissage des polices sur
   macOS/iOS pour un rendu plus propre.

   EFFET DOMINO :
   → Supprimer box-sizing: border-box = les paddings s'ajouteraient
     à la largeur déclarée → nombreux bugs de mise en page.
   → Changer scroll-padding-top: 80px en 0px = les ancres #section
     passeraient sous la barre de navigation.
   → Changer line-height: 1.7 en 1.2 = le texte sera plus compact,
     moins aéré (lisibilité réduite).
   ═══════════════════════════════════════════════════════════════ */
/* ======== RESET & BASE ======== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; font-size: calc(100% * var(--a11y-zoom)); }
body {
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.7;
  color: var(--text-primary); background-color: var(--bg-primary);
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* ═══════════════════════════════════════════════════════════════
   SKIP LINK — Lien d'évitement (accessibilité WCAG 2.4.1)
   ─────────────────────────────────────────────────────────
   RÔLE : Permet aux utilisateurs clavier/lecteur d'écran de
   sauter directement au contenu principal sans Tab sur tous
   les éléments de navigation.

   LOGIQUE :
   Le lien est positionné hors écran (top: -100%) par défaut.
   Quand il reçoit le focus (Tab depuis le début de la page),
   il apparaît visuellement (top: var(--space-md)).
   C'est un critère WCAG 2.4.1 niveau A (obligatoire).

   EFFET DOMINO :
   → Supprimer ce composant = violation WCAG 2.4.1, les
     utilisateurs clavier doivent Tab sur tous les liens nav
     avant d'atteindre le contenu.
   → Changer z-index: 9999 en 100 = le lien pourrait passer
     derrière d'autres éléments fixed (nav, modales).
   ═══════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute; top: -100%; left: var(--space-md);
  background: var(--accent); color: #fff; padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm); font-weight: 600; z-index: 9999;
  text-decoration: none; transition: top var(--duration-fast);
}
.skip-link:focus { top: var(--space-md); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--duration-fast); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--space-lg); }
.section { padding-block: var(--space-4xl); }
.section__label {
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .15em; color: var(--accent); margin-bottom: var(--space-sm);
}
.section__title { font-size: var(--text-2xl); margin-bottom: var(--space-2xl); }

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL — Animations d'apparition au défilement
   ───────────────────────────────────────────────────────
   RÔLE : Masque les éléments initialement et les anime quand
   ils entrent dans le viewport (déclenché par JS via IntersectionObserver).

   LOGIQUE :
   .reveal = état initial : invisible (opacity:0) et décalé vers le bas.
   .reveal.is-visible = état final : visible et à sa position normale.
   La classe .is-visible est ajoutée par le module ScrollReveal (JS).

   Les classes .stagger-* ajoutent un délai progressif :
   stagger-2 = 0.15s, stagger-3 = 0.3s, stagger-4 = 0.45s.
   Utilisées sur des éléments groupés pour créer un effet cascade.

   EFFET DOMINO :
   → Changer translateY(30px) en translateY(0) + scale(0.95) =
     les éléments grossissent au lieu de monter.
   → Changer transition-delay de stagger-2 de 0.15s en 0.5s =
     le deuxième élément d'un groupe apparaît 0.5s après le premier
     (effet cascade plus marqué).
   → Supprimer opacity: 0 initial = les éléments sont visibles
     dès le chargement mais l'animation translateY joue quand même.
   ═══════════════════════════════════════════════════════════════ */
/* ======== SCROLL REVEAL ======== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.stagger-2 { transition-delay: 0.15s; } .stagger-3 { transition-delay: 0.3s; } .stagger-4 { transition-delay: 0.45s; }

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — Barre fixe avec glassmorphisme et drawer mobile
   ─────────────────────────────────────────────────────────────
   RÔLE : Barre de navigation fixe en haut, avec effet de verre
   (glassmorphisme), auto-hide au scroll (géré par JS), et
   un drawer latéral pour mobile.

   GLASSMORPHISME :
   backdrop-filter: blur(12px) = flou sur le contenu derrière la nav.
   Nécessite background semi-transparent pour que l'effet soit visible.
   -webkit-backdrop-filter = préfixe pour Safari (obligatoire).

   AUTO-HIDE :
   .nav.is-hidden = transform: translateY(-100%) qui fait monter
   la nav hors écran. La transition (400ms) la rend fluide.

   DRAWER MOBILE :
   Position fixed + z-index: 160 (au-dessus du backdrop z:150).
   transform: translateX(110%) = caché à droite. .is-open retire
   cette transformation. min(280px, 82vw) = s'adapte aux petits écrans.

   IMPORTANT (règle de positionnement CSS) :
   Le backdrop et le drawer sont FRÈRES du <nav> dans le DOM, pas
   enfants. Si on les mettait DANS le nav, backdrop-filter sur .nav
   créerait un nouveau contexte de positionnement et position:fixed
   serait relatif au nav (bug d'affichage).

   EFFET DOMINO :
   → Changer z-index: 160 du drawer en 90 = le drawer passerait
     DERRIÈRE la nav (z:100) → invisible.
   → Changer transform: translateX(110%) en translateX(-110%) =
     le drawer apparaîtrait depuis la gauche.
   → Changer width: min(280px, 82vw) en 100vw = le drawer
     prendra toute la largeur de l'écran (plein écran).
   ═══════════════════════════════════════════════════════════════ */
/* ======== NAVIGATION ======== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  background: var(--bg-nav); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: transform var(--duration-base) var(--ease-out);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav__logo { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.nav__logo span { color: var(--accent); }
.nav__links { display: none; list-style: none; gap: var(--space-xl); }
.nav__link {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 500;
  color: var(--text-secondary); text-decoration: none; padding-bottom: 4px;
  border-bottom: 2px solid transparent; transition: all var(--duration-fast);
}
.nav__link:hover, .nav__link.is-active { color: var(--text-primary); border-bottom-color: var(--accent); }
@media (min-width: 768px) { .nav__links { display: flex; } .nav__burger { display: none !important; } }
.nav__actions { display: flex; align-items: center; gap: var(--space-md); }

/* Theme switch */
.theme-switch {
  position: relative; width: 60px; height: 32px; border-radius: var(--radius-full);
  background: var(--bg-tertiary); border: 2px solid var(--border-strong);
  cursor: pointer; padding: 0; overflow: hidden; transition: border-color var(--duration-fast);
}
.theme-switch:hover { border-color: var(--accent); }
.theme-switch__track {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 100%; padding: 0 6px; font-size: 0.75rem;
}
.theme-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: var(--radius-full); background: var(--accent);
  transition: transform var(--duration-base) var(--ease-spring);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .theme-switch__thumb { transform: translateX(28px); }

/* Burger mobile */
.nav__burger {
  display: flex; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: var(--space-sm); width: 36px;
}
.nav__burger span {
  display: block; width: 100%; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all var(--duration-fast);
}
/* Drawer backdrop */
.nav__drawer-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav__drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Drawer panel */
.nav__drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(280px, 82vw);
  z-index: 160;
  background-color: var(--bg-primary) !important;
  border-left: 1px solid var(--border-strong);
  display: flex; flex-direction: column;
  padding: var(--space-lg);
  transform: translateX(110%);
  transition: transform 0.35s var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}
.nav__drawer.is-open { transform: translateX(0); }

.nav__drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-2xl);
}
.nav__drawer-logo {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  color: var(--text-primary); text-decoration: none;
}
.nav__drawer-logo span { color: var(--accent); }
.nav__drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: var(--space-sm);
  border-radius: var(--radius-sm); transition: color var(--duration-fast);
  line-height: 0;
}
.nav__drawer-close:hover { color: var(--text-primary); }

.nav__drawer-links {
  display: flex; flex-direction: column; gap: var(--space-lg);
}
.nav__drawer-link {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700;
  color: var(--text-primary); text-decoration: none;
  transition: color var(--duration-fast);
}
.nav__drawer-link:hover,
.nav__drawer-link.is-active { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   HERO — Section d'accueil plein écran
   ─────────────────────────────────────
   RÔLE : Section d'accroche qui occupe 100vh (toute la hauteur
   de la fenêtre), centrée, avec animations d'entrée en cascade.

   min-height: 100vh plutôt que height: 100vh = si le contenu
   est plus grand que la fenêtre (petit écran), la section
   grandit au lieu de rogner le contenu.

   padding-top: 70px = compense la nav fixe (hauteur 70px définie
   dans .nav__inner) pour que le contenu du hero ne soit pas
   caché derrière la nav.

   ANIMATIONS D'ENTRÉE :
   Chaque élément du hero (greeting, title, subtitle, cta) a une
   animation fadeInUp avec un délai croissant (0.2s, 0.4s, 0.6s,
   0.8s). Cela crée l'effet de cascade à l'arrivée sur la page.
   Ils partent avec opacity:0 et se terminent à opacity:1 via
   `forwards` (l'animation conserve son état final).

   .hero__title .highlight = gradient de texte CSS :
   background-clip: text + -webkit-text-fill-color: transparent
   rend le dégradé visible uniquement sur le texte.

   EFFET DOMINO :
   → Changer min-height: 100vh en 70vh = le hero prendra 70% de
     la hauteur de la fenêtre.
   → Changer le délai de .hero__cta de .8s en 2s = le bouton CTA
     n'apparaît que 2 secondes après le chargement.
   → Modifier le gradient du .highlight = la ligne "Designer
     Graphique" change de couleur.
   ═══════════════════════════════════════════════════════════════ */
/* ======== HERO ======== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding-top: 70px;
  overflow: hidden;
}
.hero__content { position: relative; z-index: var(--z-content); }
.hero__greeting {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  text-transform: uppercase; letter-spacing: .2em; color: var(--accent);
  margin-bottom: var(--space-lg); opacity: 0; animation: fadeInUp .8s var(--ease-out) .2s forwards;
}
.hero__title {
  font-size: var(--text-hero); font-weight: 800; line-height: 1.05;
  margin-bottom: var(--space-lg); opacity: 0; animation: fadeInUp .8s var(--ease-out) .4s forwards;
}
.hero__title .highlight {
  display: block;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-size: clamp(1.2rem, 1rem + 2vw, 2.5rem); margin-top: var(--space-sm);
}
.hero__subtitle {
  font-size: var(--text-lg); color: var(--text-secondary); max-width: 600px;
  margin: 0 auto var(--space-2xl); opacity: 0; animation: fadeInUp .8s var(--ease-out) .6s forwards;
}
.hero__cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md);
  opacity: 0; animation: fadeInUp .8s var(--ease-out) .8s forwards;
}
.hero__scroll {
  position: absolute; bottom: var(--space-2xl); left: 50%; transform: translateX(-50%);
  z-index: var(--z-content); display: flex; flex-direction: column; align-items: center;
  gap: var(--space-sm); color: var(--text-tertiary); font-size: var(--text-xs);
  opacity: 0; animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}
.hero__scroll-line { width: 1px; height: 40px; background: var(--accent); animation: scrollPulse 2s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════════
   CANVAS PARTICULES — Fond animé pleine page
   ───────────────────────────────────────────
   RÔLE : Le <canvas> qui sert de support aux particules couvre
   toute la fenêtre en position fixed.

   position: fixed = le canvas reste immobile pendant le scroll,
   il ne fait pas partie du flux du document.
   z-index: var(--z-particles) = 1, donc sous le contenu (z:10)
   mais visible.
   pointer-events: none = CRUCIAL. Sans ça, le canvas intercepterait
   tous les clics et l'utilisateur ne pourrait plus interagir avec
   les boutons et liens de la page.

   EFFET DOMINO :
   → Retirer pointer-events: none = plus aucun clic ne passe à
     travers le canvas vers les éléments en dessous.
   → Changer z-index en 50 = les particules passeraient devant
     certains éléments (mais derrière les modales z:200).
   ═══════════════════════════════════════════════════════════════ */
/* Full-page particles */
.page-particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: var(--z-particles); pointer-events: none; display: block;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse { 0%, 100% { transform: scaleY(1); opacity: 1; } 50% { transform: scaleY(.5); opacity: .3; } }

/* ═══════════════════════════════════════════════════════════════
   BOUTONS — Système de boutons réutilisables
   ───────────────────────────────────────────
   RÔLE : Définit les styles de base et les variantes des boutons.

   .btn = classe de base commune à tous les boutons.
   .btn--primary = bouton principal (fond --accent).
   .btn--outline = bouton secondaire (contour seulement).
   .btn--glass = variante glassmorphisme (définie dans premium.css).

   transform: translateY(-2px) au hover = légère élévation qui
   donne une sensation de survol physique.
   --ease-spring (rebond) = l'animation de hover a un petit
   effet de "pression" sur le bouton.

   border-radius: var(--radius-full) = 9999px = bouton en pilule.

   EFFET DOMINO :
   → Changer --radius-full en --radius-md (12px) = tous les
     boutons deviennent rectangulaires arrondis au lieu de pilules.
   → Changer transform: translateY(-2px) en scale(1.05) =
     les boutons grossissent légèrement au hover au lieu de monter.
   → Modifier box-shadow de .btn--primary = l'ombre portée du
     bouton principal change (plus ou moins marquée).
   ═══════════════════════════════════════════════════════════════ */
/* ======== BUTTONS ======== */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-md) var(--space-xl); border-radius: var(--radius-full);
  border: none; cursor: pointer; text-decoration: none;
  transition: all var(--duration-base) var(--ease-spring); white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(232,85,46,0.3); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-glow); color: #fff; }
.btn--outline { background: transparent; color: var(--text-primary); border: 2px solid var(--border-strong); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* ======== PAGE HEADER (inner pages — enhanced) ======== */
.page-header {
  position: relative; padding-top: calc(70px + var(--space-4xl)); padding-bottom: var(--space-3xl);
  text-align: center; overflow: hidden; background: var(--bg-secondary);
}
.page-header::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 600px; height: 600px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none; opacity: .7;
}
.page-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .4;
}
/* Decorative lines */
.page-header .section__label { position: relative; }
.page-header__title { font-size: var(--text-2xl); margin-bottom: var(--space-sm); position: relative; }
.page-header__subtitle { color: var(--text-secondary); font-size: var(--text-lg); position: relative; }

/* ======== ABOUT ======== */
.about { background: var(--bg-secondary); }
.about__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3xl); align-items: center; }
.about__image-wrap {
  position: relative; width: 100%; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  background: var(--bg-tertiary); max-width: 380px; margin: 0 auto;
  box-shadow: var(--shadow-lg); border: 2px solid var(--border); transition: border-color var(--duration-base);
  perspective: 1400px; cursor: pointer;
}
.about__image-wrap:hover { border-color: var(--accent); }
.about__image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.about__text p { color: var(--text-secondary); margin-bottom: var(--space-lg); }
.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-top: var(--space-2xl); }
.stat { text-align: center; }
.stat__number { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--accent); }
.stat__label { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: var(--space-xs); }
@media (min-width: 768px) { .about__grid { grid-template-columns: 1fr 1.3fr; } }

/* ======== PROJECTS (cards, filters, search) ======== */
.projects__toolbar { display: flex; flex-direction: column; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.projects__search { position: relative; max-width: 400px; }
.projects__search-input {
  width: 100%; font-family: var(--font-body); font-size: var(--text-sm);
  padding: var(--space-md) var(--space-md) var(--space-md) 44px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-full);
  background: var(--bg-card); color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.projects__search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.projects__search-input::placeholder { color: var(--text-tertiary); }
.projects__search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none;
}
.projects__filters { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.filter-btn {
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600;
  padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* UE filters hidden by default, shown when toolbar is in UE mode */
.projects__toolbar .projects__filters--ue { display: none; }
.projects__toolbar--ue .projects__filters--cat { display: none; }
.projects__toolbar--ue .projects__filters--ue { display: flex; }

/* Filter mode toggle */
.filter-mode-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: var(--space-md);
}
.filter-mode-label {
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600;
  color: var(--text-tertiary); transition: color var(--duration-fast); user-select: none;
}
.filter-mode-label.is-active { color: var(--text-primary); }
.filter-mode-toggle {
  position: relative; width: 52px; height: 28px;
  background: #16121e; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: border-color var(--duration-fast);
  outline: none; flex-shrink: 0;
}
.filter-mode-toggle:hover { border-color: var(--accent); }
.filter-mode-toggle:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.filter-mode-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 1px 4px rgba(245,166,35,0.45);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.3s ease, box-shadow 0.3s ease;
}
.filter-mode-toggle[aria-checked="true"] .filter-mode-toggle__thumb {
  transform: translateX(24px);
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(255,112,67,0.5);
}

.projects__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
.projects__empty {
  grid-column: 1 / -1; text-align: center; padding: var(--space-3xl);
  color: var(--text-tertiary); font-size: var(--text-lg); display: none;
}
.projects__empty.is-visible { display: block; }

.project-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: all var(--duration-base) var(--ease-out); cursor: pointer;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.project-card.is-hidden { display: none; }
.project-card__image {
  aspect-ratio: 16/10; background: var(--bg-tertiary); overflow: hidden; position: relative;
}
.project-card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.project-card:hover .project-card__image img { transform: scale(1.04); }
.project-card__body { padding: var(--space-lg); }
.project-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.tag {
  font-family: var(--font-display); font-size: .7rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent);
}
.tag--secondary { background: var(--accent-secondary-soft); color: var(--accent-secondary); }
.project-card__title { font-size: var(--text-lg); margin-bottom: var(--space-sm); }
.project-card__desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }
.project-card__link {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  color: var(--accent); margin-top: var(--space-md); transition: gap var(--duration-fast);
  background: none; border: none; cursor: pointer; padding: 0;
}
.project-card__link:hover { gap: var(--space-sm); }
.projects__more { text-align: center; margin-top: var(--space-2xl); }
@media (min-width: 600px) { .projects__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .projects__grid { grid-template-columns: repeat(3, 1fr); } }

/* ═══════════════════════════════════════════════════════════════
   MODAL PROJETS — Fenêtre de détail projet
   ──────────────────────────────────────────
   RÔLE : Overlay + panneau modal pour afficher le détail d'un
   projet (image, vidéo ou site en iframe).

   LOGIQUE CSS :
   L'overlay est en opacity:0 + pointer-events:none par défaut.
   .is-open l'affiche. Le panneau (.project-modal) a une animation
   translateY(30px) + scale(0.97) → translateY(0) + scale(1)
   pour l'effet d'apparition.

   backdrop-filter: blur(10px) sur l'overlay = le fond est flouté
   derrière la modale, ce qui aide à la focalisation.

   .project-modal__header est en position:sticky top:0 = le bouton
   Fermer reste visible même quand on scrolle dans la modale.

   ACCESSIBILITÉ :
   role="dialog" aria-modal="true" = annonce la modale aux
   lecteurs d'écran. closeBtn.focus() dans le JS = le focus
   est envoyé sur le × à l'ouverture (WCAG 2.4.3).

   EFFET DOMINO :
   → Changer max-width: 850px en 100% = la modale prend toute
     la largeur de l'écran.
   → Changer max-height: 90vh en 60vh = la modale sera plus petite
     verticallement, plus de scroll interne pour les gros contenus.
   → Supprimer backdrop-filter = plus d'effet de flou sur le fond.
   ═══════════════════════════════════════════════════════════════ */
/* ======== PROJECT DETAIL MODAL ======== */
.project-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
  z-index: var(--z-modal); opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base); display: flex;
  align-items: center; justify-content: center; padding: var(--space-lg);
}
.project-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.project-modal {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); max-width: 850px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(30px) scale(.97);
  transition: transform var(--duration-base) var(--ease-out);
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}
.project-modal-overlay.is-open .project-modal { transform: translateY(0) scale(1); }
.project-modal__header {
  display: flex; justify-content: flex-end; padding: var(--space-md) var(--space-lg) 0;
  position: sticky; top: 0; z-index: 5;
}
.project-modal__close-btn {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--bg-tertiary); border: 1px solid var(--border-strong);
  color: var(--text-primary); font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
}
.project-modal__close-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.project-modal__image {
  width: 100%; border-bottom: 1px solid var(--border); background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center; padding: var(--space-lg);
  position: relative; overflow: hidden; min-height: 200px;
}
.project-modal__image img {
  max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-out); transform-origin: center center;
}
.project-modal__controls {
  display: flex; gap: var(--space-sm); position: absolute; bottom: var(--space-md);
  right: var(--space-md); z-index: 5;
}
.project-modal__ctrl-btn {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  color: var(--text-primary); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700;
  box-shadow: var(--shadow-sm); transition: all var(--duration-fast);
}
.project-modal__ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.project-modal__ctrl-btn--save {
  width: auto; padding: 0 var(--space-md); gap: var(--space-xs);
  font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600;
}
.project-modal__body { padding: var(--space-2xl); }
.project-modal__tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-lg); }
.project-modal__title { font-size: var(--text-xl); margin-bottom: var(--space-lg); }
.project-modal__desc { color: var(--text-secondary); font-size: var(--text-base); line-height: 1.8; }

/* ======== SKILLS ======== */
.skills__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
.skill-category {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-xl); transition: all var(--duration-base) var(--ease-out);
  position: relative; overflow: hidden;
}
.skill-category::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  opacity: 0; transition: opacity var(--duration-base);
}
.skill-category:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.skill-category:hover::before { opacity: 1; }
.skill-category__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--accent-soft); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin-bottom: var(--space-lg);
}
.skill-category__title { font-size: var(--text-lg); margin-bottom: var(--space-lg); }
.skill-item { margin-bottom: var(--space-md); }
.skill-item__header { display: flex; justify-content: space-between; margin-bottom: var(--space-xs); }
.skill-item__name { font-size: var(--text-sm); font-weight: 500; }
.skill-item__level { font-size: var(--text-xs); color: var(--text-tertiary); }
.skill-item__bar {
  width: 100%; height: 6px; background: var(--bg-tertiary);
  border-radius: var(--radius-full); overflow: hidden;
}
.skill-item__fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: var(--radius-full); width: 0; transition: width 1.2s var(--ease-out);
}
@media (min-width: 600px) { .skills__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .skills__grid { grid-template-columns: repeat(3, 1fr); } }

/* ======== CONTACT ======== */
.contact__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3xl); }
.contact__info { display: flex; flex-direction: column; gap: var(--space-xl); }
.contact__item { display: flex; align-items: flex-start; gap: var(--space-md); }
.contact__item-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-md);
  background: var(--accent-soft); display: flex; align-items: center;
  justify-content: center; color: var(--accent); border: 1px solid var(--border);
  transition: all var(--duration-fast);
}
.contact__item:hover .contact__item-icon { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.contact__item-icon svg { width: 20px; height: 20px; }
.contact__item-label {
  font-size: var(--text-xs); color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: .08em;
}
.contact__item-value { font-weight: 500; margin-top: 2px; }
.contact__item-value a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.contact__form { display: flex; flex-direction: column; gap: var(--space-lg); }
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-group label { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; }
.form-group label .required { color: var(--accent); }
.form-group input, .form-group textarea {
  font-family: var(--font-body); font-size: var(--text-base); padding: var(--space-md);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-primary);
  transition: border-color var(--duration-fast); resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group textarea { min-height: 140px; }
.form-status {
  font-size: var(--text-sm); padding: var(--space-md);
  border-radius: var(--radius-md); display: none;
}
.form-status.is-success {
  display: block; background: rgba(34,197,94,.1); color: #16a34a; border: 1px solid rgba(34,197,94,.2);
}
.form-status.is-error {
  display: block; background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.2);
}
@media (min-width: 768px) { .contact__grid { grid-template-columns: 1fr 1.5fr; } }

/* ======== ABOUT PAGE — enhanced ======== */
.about-page-values { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); margin-top: var(--space-2xl); }
.value-card {
  padding: var(--space-xl); border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--duration-base) var(--ease-out);
}
.value-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.value-card__icon { font-size: 1.8rem; margin-bottom: var(--space-md); }
.value-card__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-sm); }
.value-card__desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }
@media (min-width: 600px) { .about-page-values { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .about-page-values { grid-template-columns: repeat(3, 1fr); } }

/* ======== FOOTER ======== */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding-block: var(--space-2xl); }
.footer__inner {
  display: flex; flex-direction: column; gap: var(--space-lg);
  align-items: center; text-align: center;
}
.footer__socials { display: flex; gap: var(--space-md); }
.footer__social-link {
  width: 42px; height: 42px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong); display: flex;
  align-items: center; justify-content: center; color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.footer__social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.footer__social-link svg { width: 18px; height: 18px; }
.footer__copy { font-size: var(--text-xs); color: var(--text-tertiary); }
.footer__legal-link {
  color: var(--text-tertiary); text-decoration: underline; text-underline-offset: 2px;
  font-size: var(--text-xs); background: none; border: none; cursor: pointer; font-family: var(--font-body);
}
.footer__legal-link:hover { color: var(--accent); }
@media (min-width: 768px) {
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ======== BACK TO TOP + A11Y + MODALS ======== */
.back-to-top {
  position: fixed; bottom: var(--space-xl); left: var(--space-xl); z-index: var(--z-back-top);
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1.5px solid var(--border-strong);
  color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: all var(--duration-base) var(--ease-out);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

.a11y-widget { position: fixed; bottom: var(--space-xl); right: var(--space-xl); z-index: var(--z-a11y); }
.a11y-toggle {
  width: 52px; height: 52px; border-radius: var(--radius-full);
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.15); transition: all var(--duration-fast);
}
.a11y-toggle:hover { transform: scale(1.08); box-shadow: var(--shadow-glow); }
.a11y-toggle svg { width: 26px; height: 26px; }
.a11y-panel {
  position: absolute; bottom: calc(100% + var(--space-md)); right: 0;
  width: 280px; background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: all var(--duration-base) var(--ease-out);
}
.a11y-panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.a11y-panel__title { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-lg); }
.a11y-option {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--space-sm); border-bottom: 1px solid var(--border);
}
.a11y-option:last-child { border-bottom: none; }
.a11y-option__label { font-size: var(--text-sm); font-weight: 500; }
.a11y-option__controls { display: flex; align-items: center; gap: var(--space-xs); }
.a11y-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: transparent;
  color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; transition: all var(--duration-fast);
}
.a11y-btn:hover { border-color: var(--accent); color: var(--accent); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px); z-index: var(--z-modal); opacity: 0;
  pointer-events: none; transition: opacity var(--duration-base);
  display: flex; align-items: center; justify-content: center; padding: var(--space-lg);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: var(--space-2xl);
  max-width: 650px; width: 100%; max-height: 80vh; overflow-y: auto;
  transform: translateY(20px); transition: transform var(--duration-base) var(--ease-out);
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal__close {
  float: right; background: none; border: none; font-size: 1.5rem;
  color: var(--text-secondary); cursor: pointer; padding: var(--space-sm); line-height: 1;
}
.modal__close:hover { color: var(--accent); }
.modal h2 { font-size: var(--text-xl); margin-bottom: var(--space-lg); }
.modal h3 { font-size: var(--text-lg); margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.modal p { color: var(--text-secondary); margin-bottom: var(--space-md); font-size: var(--text-sm); }

/* ═══════════════════════════════════════════════════════════════
   SURCHARGES ACCESSIBILITÉ — Classes appliquées par le widget JS
   ──────────────────────────────────────────────────────────────
   RÔLE : Définit les états visuels activés par le widget a11y.
   Ces classes sont ajoutées/retirées sur <body> par A11yWidget (JS).

   .high-contrast = redéfinit les tokens de couleur avec des
   valeurs à contraste maximal (noir/blanc pur). Le !important
   est nécessaire pour surcharger les tokens déjà appliqués par
   [data-theme="dark"/"light"].

   .reduce-motion = coupe toutes les animations et transitions
   pour les utilisateurs sensibles aux mouvements. Complète la
   media query @media (prefers-reduced-motion) qui détecte le
   réglage OS automatiquement.

   .wide-spacing = augmente letter-spacing et line-height pour
   améliorer la lisibilité (utile en cas de dyslexie).

   EFFET DOMINO :
   → Changer #000/#fff en des valeurs intermédiaires = le mode
     contraste élevé sera moins extrême.
   → Supprimer !important sur .reduce-motion = les transitions
     définies avec une spécificité plus haute ne seraient pas
     annulées (animations des modales, du hero, etc.).
   ═══════════════════════════════════════════════════════════════ */
/* ======== A11Y OVERRIDES ======== */
.high-contrast {
  --text-primary: #000 !important; --text-secondary: #111 !important;
  --bg-primary: #fff !important; --bg-secondary: #f0f0f0 !important;
  --bg-card: #fff !important; --border: #000 !important; --border-strong: #000 !important;
}
[data-theme="dark"] .high-contrast {
  --text-primary: #fff !important; --text-secondary: #eee !important;
  --bg-primary: #000 !important; --bg-secondary: #111 !important;
  --bg-card: #111 !important; --border: #fff !important; --border-strong: #fff !important;
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: 0.01ms !important; transition-duration: 0.01ms !important;
}
.wide-spacing { letter-spacing: .05em; word-spacing: .12em; line-height: 2 !important; }
.wide-spacing p, .wide-spacing li, .wide-spacing span { line-height: 2 !important; }


/* ======== V6 ADDITIONS ======== */

/* --- About CTA row --- */
.about__cta-row {
  margin-top: var(--space-2xl); display: flex; flex-wrap: wrap; gap: var(--space-md);
}

/* --- Tag variants for categories --- */
.tag--web { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.tag--video { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
[data-theme="dark"] .tag--web { background: rgba(52, 211, 153, 0.12); color: #34d399; }
[data-theme="dark"] .tag--video { background: rgba(192, 132, 252, 0.12); color: #c084fc; }

/* --- Icon placeholder cards --- */
.project-card__image--icon {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-secondary-soft));
}
.project-card__icon-wrap {
  width: 80px; height: 80px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-md);
}
.project-card:hover .project-card__icon-wrap {
  border-color: var(--accent); transform: scale(1.08); box-shadow: var(--shadow-glow);
}

/* --- Modal drag --- */
.project-modal__image img.is-draggable { cursor: grab; user-select: none; }
.project-modal__image img.is-dragging { cursor: grabbing; }

/* --- Modal video/site embeds --- */
.project-modal__video-wrap {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; background: #000;
}
.project-modal__video-wrap iframe { width: 100%; height: 100%; border: none; }
.project-modal__site-wrap {
  width: 100%; height: 65vh; border-radius: var(--radius-md); overflow: hidden;
  border: 2px solid var(--border); background: #fff;
}
.project-modal__site-wrap iframe { width: 100%; height: 100%; border: none; }

/* --- Modal ext link --- */
.project-modal__ext-link {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  color: var(--accent); margin-top: var(--space-lg); text-decoration: none;
  padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-full);
  border: 1.5px solid var(--accent); transition: all var(--duration-fast);
}
.project-modal__ext-link:hover { background: var(--accent); color: #fff; }

/* --- Mobile filters --- */
@media (max-width: 599px) {
  .projects__filters {
    overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: var(--space-xs);
  }
  .projects__filters::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; font-size: .7rem; padding: var(--space-sm) var(--space-md); }
  .projects__toolbar { gap: var(--space-md); }
  .projects__search { max-width: 100%; }
  .project-card__tags .tag { font-size: .6rem; padding: 2px 8px; }
  .hero__title { font-size: clamp(2.2rem, 1.5rem + 4vw, 4rem); }
  .hero__subtitle { font-size: var(--text-sm); }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .about__stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
  .stat__number { font-size: var(--text-lg); }
  .about__cta-row { flex-direction: column; }
  .about__cta-row .btn { width: 100%; justify-content: center; text-align: center; }
  .project-modal { max-height: 95vh; margin: var(--space-sm); }
  .project-modal__body { padding: var(--space-lg); }
  .project-modal__controls { bottom: var(--space-sm); right: var(--space-sm); }
  .project-modal__ctrl-btn { width: 34px; height: 34px; font-size: .9rem; }
  .section { padding-block: var(--space-3xl); }
  .page-header { padding-top: calc(70px + var(--space-2xl)); padding-bottom: var(--space-2xl); }
  .value-card { padding: var(--space-lg); }
}
@media (max-width: 380px) {
  .nav__logo { font-size: 1.3rem; }
  .theme-switch { width: 50px; height: 28px; }
  .theme-switch__thumb { width: 18px; height: 18px; }
  [data-theme="dark"] .theme-switch__thumb { transform: translateX(22px); }
}


/* --- Glowing accent line --- */
.page-header::after {
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 30%, var(--accent-secondary) 70%, transparent 95%);
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.7; } }

/* --- Nav glassmorphism --- */
.nav { backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); }

/* --- Smooth project card hover --- */
.project-card:hover { transform: translateY(-6px); }

/* ═══════════════════════════════════════════════════════════════
   V8 — LOADER, CURSEUR, TRANSITIONS DE PAGE
   ──────────────────────────────────────────
   Ces trois composants fonctionnent ensemble pour créer
   une expérience de navigation premium.
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   LOADER — Écran de chargement avec logo animé
   ───────────────────────────────────────────────
   RÔLE : Recouvre toute la page pendant le chargement initial,
   puis disparaît en fondu quand le JS ajoute .is-done.

   z-index: 9999 = au-dessus de tout (y compris les modales).
   visibility: hidden dans .is-done = en plus d'opacity:0, retire
   le loader de l'accessibilité (lecteurs d'écran) et améliore
   les performances (le navigateur ne rend plus l'élément).

   ANIMATIONS DU LOGO :
   loaderReveal = le conteneur SVG s'agrandit (scale 0.9 → 1).
   logoFadeIn = le "C" apparaît avec un effect de blur qui se
   dissipe (filter: blur(6px) → blur(0)).
   logoDotPop = le point orange pop avec un rebond (scale 0 → 1.35 → 1).

   EFFET DOMINO :
   → Changer 2200ms dans le JS = le loader dure plus ou moins.
   → Changer 0.7s (transition CSS) = le fondu de sortie plus rapide.
   → Changer cubic-bezier(0.76, 0, 0.24, 1) = courbe d'accélération
     différente pour la disparition du loader.
   ─────────────────────────────────────────────────────────────── */
/* ================================================================
   V8 ADDITIONS — Loader, Cursor, Page Transitions
   ================================================================ */

/* LOADER */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background-color: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s cubic-bezier(0.76, 0, 0.24, 1), visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__logo {
  width: 90px; height: 90px;
  opacity: 0; transform: scale(0.9);
  animation: loaderReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}
.loader__logo .logo-c {
  fill: var(--text-primary);
  opacity: 0;
  animation: logoFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
.loader__logo .logo-dot {
  opacity: 0; transform-origin: center;
  animation: logoDotPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}
@keyframes loaderReveal { to { opacity: 1; transform: scale(1); } }
@keyframes logoFadeIn { 0% { opacity: 0; filter: blur(6px); } 60% { opacity: 1; filter: blur(0); } 100% { opacity: 1; } }
@keyframes logoDotPop { 0% { opacity: 0; transform: scale(0); } 70% { opacity: 1; transform: scale(1.35); } 100% { opacity: 1; transform: scale(1); } }

/* ───────────────────────────────────────────────────────────────
   CURSEUR PERSONNALISÉ — Point qui suit la souris
   ────────────────────────────────────────────────
   position: fixed + transform: translate(-50%, -50%) = le curseur
   est centré sur le pointeur réel de la souris.
   mix-blend-mode: difference = le curseur inverts les couleurs
   du fond en dessous (orange devient bleu-vert sur fond orange).
   opacity:0 par défaut, 1 quand .is-visible (ajouté par le JS
   au premier mouvement souris).
   ─────────────────────────────────────────────────────────────── */
/* CUSTOM CURSOR */
.cursor-custom {
  position: fixed; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none; z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease, background 0.25s ease;
  mix-blend-mode: difference; opacity: 0;
}
.cursor-custom.is-visible { opacity: 1; }
.cursor-custom.is-hover {
  width: 40px; height: 40px;
  background: rgba(255, 112, 67, 0.12);
  border: 1px solid var(--accent);
}

/* ───────────────────────────────────────────────────────────────
   TRANSITION DE PAGE — Overlay qui glisse lors des navigations
   ─────────────────────────────────────────────────────────────
   Par défaut : translateY(100%) = caché sous la page.
   .is-entering : translateY(0) = monte pour couvrir la page.
   .is-leaving  : translateY(-100%) = monte pour sortir par le haut.

   z-index: 8000 = sous le loader (9999) mais au-dessus de tout
   le contenu (10) et des modales (200).

   pointer-events: none = la transition ne bloque pas les clics
   dans les rares cas où elle reste visible.
   ─────────────────────────────────────────────────────────────── */
/* PAGE TRANSITION */
.page-transition-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background-color: var(--bg-primary);
  transform: translateY(100%);
  transition: transform 0.65s cubic-bezier(0.76, 0, 0.24, 1);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.page-transition-overlay.is-entering { transform: translateY(0); }
.page-transition-overlay.is-leaving { transform: translateY(-100%); }
.page-transition-overlay .pt-logo {
  width: 45px; height: 45px;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}
.page-transition-overlay.is-entering .pt-logo { opacity: 1; }

/* CENTERED SEARCH BAR */
.projects__search-centered {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.projects__search-centered .projects__search {
  max-width: 500px;
  width: 100%;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* CENTERED TOOLBAR */
.projects__toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}
.projects__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* ───────────────────────────────────────────────────────────────
   MARQUEE — Bandeau de texte défilant
   ────────────────────────────────────
   .marquee-strip__inner = flex avec width: max-content (s'étend
   autant que le contenu le nécessite). L'animation marqueeScroll
   translate de 0 à -50% : le contenu est dupliqué dans le HTML
   (même liste de mots deux fois), donc à -50% on revient au
   début visuellement → boucle seamless.

   EFFET DOMINO :
   → Changer 25s en 10s = le défilement est 2.5x plus rapide.
   → Changer translate(-50%) en translate(-33%) = bogue si le
     contenu n'est pas triplé dans le HTML (saut visible).
   ─────────────────────────────────────────────────────────────── */
/* MARQUEE STRIP */
.marquee-strip {
  padding: var(--space-md) 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: var(--z-content);
}
.marquee-strip__inner {
  display: flex;
  gap: var(--space-xl);
  animation: marqueeScroll 25s linear infinite;
  width: max-content;
}
.marquee-strip__item {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 400;
  white-space: nowrap;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.marquee-strip__item::after {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* BADGE DISPONIBLE */
.badge-dispo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.06);
  margin-top: var(--space-lg);
}
.badge-dispo__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: badgePulse 2s ease-in-out infinite;
}
.badge-dispo__text {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #4ade80;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* LANGUAGE SELECTOR */
.lang-selector {
  position: relative;
  z-index: 10;
}
.lang-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-secondary);
}
.lang-btn:hover {
  border-color: var(--accent);
  background: rgba(232, 85, 46, 0.08);
  color: var(--accent);
}
.lang-btn svg { width: 16px; height: 16px; }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 0.35rem;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
[data-theme="dark"] .lang-dropdown {
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.lang-selector.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-align: left;
}
.lang-option:hover {
  background: var(--accent);
  color: #fff;
}
.lang-option.is-active {
  color: var(--accent);
  font-weight: 500;
}
.lang-option__flag {
  font-size: 1rem;
  line-height: 1;
}

/* BADGE SPACING FIX */
.badge-dispo {
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* HERO SPACING FIX — prevent badge/CTA/scroll overlap */
.hero__cta {
  margin-top: var(--space-xl);
}
.hero__scroll {
  bottom: var(--space-md) !important;
  z-index: 2;
}
.hero__content {
  padding-bottom: 100px;
}

/* GLOBE ICON — match theme-switch style */
.lang-btn {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
}
.lang-btn svg {
  stroke: var(--text-secondary) !important;
}
.lang-btn:hover {
  border-color: var(--accent) !important;
  background: rgba(232, 85, 46, 0.08) !important;
}
.lang-btn:hover svg {
  stroke: var(--accent) !important;
}
