/* =============================================================
   ASTRO-CLUB — style.css
   Contraintes : animations uniquement via transform/opacity,
   will-change: transform sur calques animés, pas de top/left/margin
   ============================================================= */

/* ─────────────────────────────────────────────
   VARIABLES
───────────────────────────────────────────── */
:root {
  /* Couleurs d'ambiance par niveau */
  --c-level-1:   #02011a;   /* Orbite — bleu nuit profond   */
  --c-level-2:   #0d0124;   /* Ciel profond — violet sombre */
  --c-level-3:   #020c1e;   /* Galaxies — bleu abyssal      */
  --c-level-4:   #000008;   /* Confins — quasi-noir         */

  /* Accents lumineux par niveau */
  --accent-1:    #5c8fff;   /* Bleu ciel / atmosphère       */
  --accent-2:    #b060ff;   /* Violet nébuleuse             */
  --accent-3:    #38d9c0;   /* Cyan galaxies                */
  --accent-4:    #8888aa;   /* Gris mystérieux / confins    */

  /* Texte */
  --c-text:      #e8eaf6;
  --c-text-muted:#9fa8da;
  --c-text-dim:  #5c6bc0;

  /* Glass — plus transparent pour laisser passer les nébuleuses
     (le backdrop-filter conserve la lisibilité malgré le fond dilué) */
  --glass-bg:    rgba(8, 6, 30, 0.18);
  --glass-border:rgba(255, 255, 255, 0.08);
  --glass-blur:  14px;

  /* Typo */
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Espacements */
  --gap-sm:  1rem;
  --gap-md:  2rem;
  --gap-lg:  4rem;
  --gap-xl:  8rem;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────
   RESET
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Scroll snapping : aimantation sur chaque section */
  scroll-snap-type: y mandatory;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, a {
  cursor: pointer;
}

/* ─────────────────────────────────────────────
   BASE
───────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at center, #050a14 0%, #000000 80%) !important;
  color: var(--c-text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────
   FOND ÉTOILÉ (CSS-only, Step 1)
   Les calques seront animés en parallaxe Step 2/3.
   will-change: transform déjà positionné pour l'étape GSAP.
───────────────────────────────────────────── */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -5; /* au-dessus des images de fond, sous le contenu */
  pointer-events: none;
  overflow: hidden;

  background: transparent !important;
}

/* Canvas starfield — dessiné une fois au chargement, parallaxe via GSAP translateY */
#starfieldCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent !important;
  will-change: transform;
}

/* ─────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(2, 1, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--c-text);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.25s var(--ease-smooth);
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__logo-star {
  color: var(--accent-1);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav__link {
  color: var(--c-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  transition: color 0.2s var(--ease-smooth),
              background 0.2s var(--ease-smooth);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link--active {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav__link--active {
  color: var(--accent-1);
}

.nav__link:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   SECTIONS — Conteneur commun
───────────────────────────────────────────── */
.section {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Padding réduit et symétrique : supprime les trous inter-sections */
  padding: 5rem 2rem 3rem;
  /* Le halo/nébuleuse ::before doit pouvoir "respirer" hors des limites */
  overflow: visible;
  /* Scroll snapping : aimantation sur le centre de chaque section */
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* Halo/nébuleuse colorée par section — placée derrière la .glass-container,
   devant le starfield. filter: blur() statique (non animé) pour l'effet diffus. */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
  transition: opacity 0.6s var(--ease-smooth);
}

/* Niveau 1 — Orbite : nébuleuse bleue */
.section--1::before {
  background: radial-gradient(ellipse 65% 55% at 50% 50%,
    rgba(80, 120, 255, 0.32) 0%,
    rgba(80, 120, 255, 0.15) 35%,
    transparent 70%);
}

/* Niveau 2 — Ciel Profond : nébuleuse violette (couleur historique conservée) */
.section--2::before {
  background: radial-gradient(ellipse 65% 55% at 50% 50%,
    rgba(176, 96, 255, 0.32) 0%,
    rgba(100, 20, 200, 0.15) 35%,
    transparent 70%);
}

/* Niveau 3 — Galaxies : nébuleuse émeraude/cyan */
.section--3::before {
  background: radial-gradient(ellipse 65% 55% at 50% 50%,
    rgba(60, 255, 180, 0.28) 0%,
    rgba(60, 255, 180, 0.15) 35%,
    transparent 70%);
}

/* Niveau 4 — Confins : nébuleuse rose/pourpre */
.section--4::before {
  background: radial-gradient(ellipse 65% 55% at 50% 50%,
    rgba(255, 80, 150, 0.28) 0%,
    rgba(255, 80, 150, 0.15) 35%,
    transparent 70%);
}

/* ─────────────────────────────────────────────
   GLASSMORPHISM CONTAINER
───────────────────────────────────────────── */
.glass-container {
  position: relative;
  z-index: 1;
  width: 100%;
  /* Max-width réduite pour laisser respirer la nébuleuse sur les côtés */
  max-width: 1080px;
  margin: 0.75rem auto;
  padding: 3rem 3.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  /* Prêt pour animation d'entrée GSAP Step 3 */
  will-change: transform;
}

/* ─────────────────────────────────────────────
   BADGE (étiquette de niveau)
───────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.5rem;
}

/* Couleur d'accent du badge selon la section */
.section--1 .badge { color: var(--accent-1); border-color: rgba(92, 143, 255, 0.25); }
.section--2 .badge { color: var(--accent-2); border-color: rgba(176, 96, 255, 0.25); }
.section--3 .badge { color: var(--accent-3); border-color: rgba(56, 217, 192, 0.25); }
.section--4 .badge { color: var(--accent-4); border-color: rgba(136, 136, 170, 0.20); }

/* ─────────────────────────────────────────────
   TYPOGRAPHIE
───────────────────────────────────────────── */
.section__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}

/* Filet coloré sous le titre selon le niveau */
.section--1 .section__title { color: #d8e8ff; }
.section--2 .section__title { color: #e8d8ff; }
.section--3 .section__title { color: #d8f8f2; }
.section--4 .section__title { color: #d8d8ee; }

.section__lead {
  font-size: 1.15rem;
  color: var(--c-text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.section__text {
  font-size: 1rem;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ─────────────────────────────────────────────
   BOUTON
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-smooth),
              box-shadow 0.2s var(--ease-smooth),
              opacity 0.2s var(--ease-smooth);
  will-change: transform;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(92, 143, 255, 0.9), rgba(140, 80, 255, 0.9));
  color: #fff;
  box-shadow: 0 4px 24px rgba(92, 143, 255, 0.3);
}

.section--3 .btn--primary {
  background: linear-gradient(135deg, rgba(56, 217, 192, 0.85), rgba(30, 100, 180, 0.85));
  box-shadow: 0 4px 24px rgba(56, 217, 192, 0.25);
}

.section--4 .btn--primary {
  background: linear-gradient(135deg, rgba(100, 100, 160, 0.8), rgba(60, 60, 120, 0.8));
  box-shadow: 0 4px 24px rgba(80, 80, 130, 0.25);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(92, 143, 255, 0.45);
  outline: none;
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────
   GRILLE DE CARTES (Section Présentation)
───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.25s var(--ease-smooth),
              border-color 0.25s var(--ease-smooth),
              background 0.25s var(--ease-smooth);
  will-change: transform;
}

.card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(176, 96, 255, 0.20);
}

.card__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(176, 96, 255, 0.10);
  border: 1px solid rgba(176, 96, 255, 0.15);
  color: var(--accent-2);
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.card__text {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   LISTE AGENDA
───────────────────────────────────────────── */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.event {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: transform 0.2s var(--ease-smooth),
              border-color 0.2s var(--ease-smooth);
  will-change: transform;
}

.event:hover {
  transform: translateX(4px);
  border-color: rgba(56, 217, 192, 0.18);
}

.event__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  font-style: normal;
}

.event__day {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-3);
}

.event__month {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--c-text-dim);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.event__content {
  padding-top: 0.1rem;
}

.event__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}

.event__desc {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.55;
}

/* ─────────────────────────────────────────────
   FORMULAIRE CONTACT
───────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
}

.form__input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease-smooth),
              background 0.2s var(--ease-smooth),
              box-shadow 0.2s var(--ease-smooth);
  appearance: none;
  -webkit-appearance: none;
}

.form__input::placeholder {
  color: rgba(159, 168, 218, 0.35);
}

.form__input:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.form__input:focus {
  outline: none;
  border-color: rgba(136, 136, 170, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(100, 100, 160, 0.15);
}

.form__textarea {
  resize: vertical;
  min-height: 110px;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.footer {
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer__text {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--c-text-dim);
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────────
   ANIMATION — Pulsation lente du badge (transform only)
───────────────────────────────────────────── */
@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.98); }
}

.badge {
  animation: badge-pulse 4s ease-in-out infinite;
  will-change: transform;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__inner {
    padding: 0.9rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav__links {
    gap: 0;
  }

  .nav__link {
    font-size: 0.82rem;
    padding: 0.35rem 0.7rem;
  }

  .glass-container {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }

  .section {
    padding: 6rem 1rem 2rem;
  }

  .section__title {
    font-size: clamp(1.7rem, 7vw, 2.5rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .event {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event__date {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
    width: auto;
    text-align: left;
  }

  .event__day {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .glass-container {
    padding: 1.5rem 1.2rem;
    border-radius: 14px;
  }

  .section__lead {
    font-size: 1rem;
  }

  .btn--primary {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================
   MOTEUR SPATIAL — Étape 2 : décors de fond par scène
   Contraintes : transform uniquement pour animations,
   filter/blur pour diffusion, will-change: transform partout.
   ============================================================= */

/* ─────────────────────────────────────────────
   CONTENEUR MOTEUR (fixed, derrière tout)
───────────────────────────────────────────── */
.space-engine {
  position: fixed;
  inset: 0;
  z-index: -10; /* le plus bas : images HD derrière les étoiles */
  pointer-events: none;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
   SCÈNES — base commune
───────────────────────────────────────────── */
.scene {
  position: absolute;
  inset: 0;
  /* GSAP contrôle opacity + visibility via autoAlpha */
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

/* Scène 1 visible par défaut (JS la rend ensuite) */
.scene--1 {
  opacity: 1;
  visibility: visible;
}

/* =============================================================
   PORTFOLIO — Blocs CV, Galerie photo, Tableau technique
   Ajouts pour la refonte portfolio ; réutilise le glassmorphism
   et les accents de section existants.
   ============================================================= */

/* ─────────────────────────────────────────────
   CV "Dashboard Plein Écran" — Section 1
   Typo sans-serif homogène, tout le CV tient dans une seule vue viewport,
   pas d'override de min-height : la section garde son 100vh de base
   et le contenu est compacté pour tenir dedans.
───────────────────────────────────────────── */

.section--1 {
  /* Padding vertical de sécurité : le conteneur ne touche jamais les bords,
     même sur petits écrans. Le centrage vertical vient de .section (flex). */
  padding: 4rem 2rem;
}

/* En-tête CV : conteneur élargi et centré verticalement (via .section).
   Colonne flex — sans scroll : tout le contenu s'affiche statiquement sur un écran. */
.section--1 .glass-container {
  /* padding-bottom élargi : réserve la place du bouton ancré en bas à droite */
  padding: 1.5rem 2.5rem 5rem;
  max-width: min(1400px, 92vw);
  display: flex;
  flex-direction: column;
}
.section--1 .badge {
  /* Style identique au badge « GALERIE » (base .badge) : police, padding,
     border-radius hérités. On ne resserre que la marge basse pour l'en-tête compact. */
  margin-bottom: 0.5rem;
  /* Empêche l'étirement par le conteneur flex-column */
  align-self: flex-start;
  width: max-content;
}
.section--1 .section__title {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  margin-bottom: 0.25rem;
  /* Réserve la zone haut-droite pour la photo 120px + son offset de 4rem */
  padding-right: 11.5rem;
}
#cv .section__lead {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  /* Compactage à gauche : le paragraphe ne dépasse pas 75% du bloc,
     laissant la colonne de droite disponible pour la photo 120px */
  max-width: 75%;
  text-align: left;
}
.section--1 .btn {
  padding: 0.4rem 1.1rem;
  font-size: 0.78rem;
  /* Ancré en bas à droite du conteneur (position: relative sur .glass-container).
     right = padding latéral du conteneur → aligné sur le bord droit du texte. */
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  margin: 0;
  width: max-content;
}

/* Photo de profil — cercle parfait ancré en haut à droite du bloc CV.
   .glass-container est déjà position: relative → l'absolute s'ancre bien dedans. */
.cv-profile-img {
  position: absolute;
  top: 2.5rem;
  right: 4rem;
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(92, 143, 255, 0.5);
  box-shadow: 0 4px 24px rgba(92, 143, 255, 0.25);
  z-index: 2;
}

/* Dashboard : 2 colonnes 0.8fr / 1.2fr, alignées en haut */
.cv-main-wrapper {
  display: grid;
  grid-template-columns: 0.23fr 0.77fr;
  gap: 4rem;
  margin: 0;
  text-align: left;
  align-items: start;
}

.cv-col--left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Colonne compressée à ~22% : force les mots longs à revenir à la ligne */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.cv-col--right {
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Expériences réparties en 2 sous-colonnes dans la partie droite */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
/* Les listes internes ne portent aucune marge globale qui casserait l'alignement */
.experience-grid .cv-timeline {
  margin: 0;
}

/* Labels de bloc — petits, uppercase, discrets */
.cv-block__title {
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin: 0 0 0.4rem;
}

/* Compétences — tags très compacts */
.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.cv-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  line-height: 1.35;
  border-radius: 100px;
  background: rgba(92, 143, 255, 0.08);
  border: 1px solid rgba(92, 143, 255, 0.20);
  color: var(--c-text);
}

/* Timeline — traits fins, gaps minimaux */
.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}
.cv-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0.65rem;
  border-left: 1.5px solid rgba(92, 143, 255, 0.3);
}
.cv-item__date {
  font-size: 0.7rem;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--c-text-dim);
  text-transform: uppercase;
}
.cv-item__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0.05rem 0 0;
  color: var(--c-text);
}
.cv-item__meta {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--c-text-muted);
}
/* Ligne des certifications : police réduite + interlettrage négatif
   pour forcer un affichage sur une seule ligne */
[aria-labelledby="cv-certifications"] .cv-item__meta {
  font-size: 0.65rem;
  letter-spacing: -0.2px;
}
.cv-item__desc {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.1rem;
  color: var(--c-text-muted);
}
.cv-item__desc ul {
  padding-left: 0.9rem;
  margin: 0.05rem 0 0;
  list-style-type: square;
}
.cv-item__desc li {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   Galerie photo — Section 2 (4 catégories, carrousels horizontaux, lightbox)
   Contrainte : toute la section doit tenir dans 100vh, aucun scroll vertical global.
───────────────────────────────────────────── */

/* Compactage vertical de la section Galerie pour tenir dans 100vh */
.section--2 {
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.section--2 .glass-container {
  padding: 2rem 3rem;
}
.section--2 .badge {
  margin-bottom: 0.8rem;
}
.section--2 .section__title {
  margin-bottom: 0.7rem;
}
.section--2 .section__text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.gallery-category {
  margin-top: 0.6rem;
}
.gallery-category:first-of-type {
  margin-top: 0.85rem;
}

.gallery-category-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 0.3rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(176, 96, 255, 0.18);
}

/* Chaque catégorie = une ligne à défilement horizontal */
.photo-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0.75rem;
  /* padding-bottom : laisse la scrollbar respirer sans mordre sur les photos */
  padding-bottom: 1rem;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  /* Firefox : scrollbar fine, teintée bleutée sur piste discrète */
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 143, 255, 0.4) rgba(255, 255, 255, 0.05);
}

/* WebKit (Chrome, Safari, Edge) — barre horizontale visible et thémée bleue */
.photo-grid::-webkit-scrollbar {
  height: 8px;
}
.photo-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.photo-grid::-webkit-scrollbar-thumb {
  background: rgba(92, 143, 255, 0.4);
  border-radius: 10px;
}
.photo-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 143, 255, 0.8);
}

/* Miniatures fixes, ~50% de la taille précédente */
.photo-placeholder {
  position: relative;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth),
              box-shadow 0.3s var(--ease-smooth);
  will-change: transform;
}

/* Curseur pointer uniquement quand une image est réellement présente */
.photo-placeholder:has(img) {
  cursor: pointer;
}

.photo-placeholder:hover {
  transform: scale(1.05);
  border-color: rgba(176, 96, 255, 0.35);
  box-shadow: 0 8px 32px rgba(176, 96, 255, 0.20);
  z-index: 2;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox : overlay plein écran affichant l'image cliquée */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
#lightbox.is-open {
  display: flex;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(176, 96, 255, 0.4);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--c-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease-smooth),
              transform 0.2s var(--ease-smooth);
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  outline: none;
}

/* ─────────────────────────────────────────────
   Tableau technique — Section 3
───────────────────────────────────────────── */
.tech-table-wrap {
  margin-top: 2rem;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.tech-table th,
.tech-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-table thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(56, 217, 192, 0.05);
  border-bottom: 1px solid rgba(56, 217, 192, 0.15);
}

.tech-table tbody td {
  color: var(--c-text-muted);
}

.tech-table tbody tr {
  transition: background 0.2s var(--ease-smooth);
}

.tech-table tbody tr:hover {
  background: rgba(56, 217, 192, 0.06);
}

.tech-table tbody tr:last-child td {
  border-bottom: none;
}

.tech-table tbody td:first-child {
  color: var(--c-text);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   Responsive — Portfolio
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .cv-main-wrapper {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  /* Sur mobile, le bouton reprend sa place dans le flux (pas d'ancrage absolu
     qui chevaucherait le contenu empilé) ; on retire aussi le padding-bottom réservé */
  .section--1 .glass-container {
    padding-bottom: 2rem;
  }
  .section--1 .btn {
    position: static;
    margin-top: 1.25rem;
  }
  /* Sur mobile, les colonnes s'empilent : plus de trait vertical de séparation */
  .cv-col--right {
    padding-left: 0;
    border-left: none;
  }

  /* Galerie sur mobile : le carrousel horizontal reste (défini plus haut),
     on resserre juste le gap pour tenir plus de miniatures visibles. */
  .photo-grid {
    gap: 0.5rem;
  }

  .tech-table {
    font-size: 0.82rem;
  }

  .tech-table th,
  .tech-table td {
    padding: 0.7rem 0.85rem;
  }
}
