/* ================================================================
   YUCE ENGIN — Portfolio
   Feuille de styles principale
   ================================================================ */


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

:root {
  --bg:           #0b0b0b;        /* Fond général */
  --gold:         #c8a84b;        /* Accent doré */
  --gold-dim:     #a88a38;        /* Doré hover */
  --white:        #ffffff;
  --muted:        rgba(255,255,255,0.55);
  --border:       rgba(255,255,255,0.1);
  --glass:        rgba(11,11,11,0.55);
  --glass-border: rgba(255,255,255,0.12);
  --radius:       14px;
  /* Image hero — utilisée à la fois dans le preloader et dans la section hero */
  --hero-img: url('https://cdn.prod.website-files.com/6915bbf51d482439010ee790/6915bc3ac9fe346a924724b0_minimalist-architecture-1.avif');
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}


/* ────────────────────────────────────────────────────────────────
   PRELOADER
   Animation d'entrée : lettres YUCE avec image centrale,
   explosion plein écran puis transition vers le portfolio.
   ──────────────────────────────────────────────────────────────── */

/* Overlay fixe qui couvre tout l'écran */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  overflow: hidden;
}

/* Masqué par défaut — retiré par GSAP au démarrage */
.preloader.is--hidden { display: none; }

/* Conteneur centré pour le mot animé */
.loader-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--white);
}

/* Mot YUCE — grande typographie */
.loader-word {
  display: flex;
  align-items: center;
  font-family: 'Syne', sans-serif;
  font-size: clamp(5rem, 13vw, 13rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* Groupes gauche (YU) et droite (CE) */
.loader-left, .loader-right {
  display: flex;
  /* pas d'overflow:hidden ici — chaque lettre a son propre wrapper */
}
.loader-left  { justify-content: flex-end; }
.loader-right { justify-content: flex-start; }

/* Chaque lettre dans son propre wrapper pour clipper le slide-up verticalement */
.loader-letter-wrap {
  overflow: hidden;
  display: block;
}

.loader-letter { display: block; }
.loader-letter.is--gold { color: var(--gold); }

/* Boîte image centrale entre YU et CE — s'ouvre horizontalement */
.loader-box {
  width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.loader-box-inner {
  min-width: 1em;
  height: 0.82em;   /* Hauteur identique au slot de texte */
  position: relative;
  display: flex;
  align-items: center;
  /* PAS d'overflow:hidden ici — l'image doit sortir lors de l'explosion */
}

/* Wrapper de l'image — s'étire en largeur via GSAP */
.loader-img-wrap {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 0%;
  height: 0.82em;
  overflow: hidden;
}

.loader-img-inner {
  position: absolute;
  inset: 0;
  min-width: 1em;
}

/* Images de l'animation (flash + image finale) */
.loader-img,
.loader-img-extra {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

/* Ordre d'apparition des images flash (z-index décroissant = disparaissent en premier) */
.loader-img-extra.is--1 { z-index: 3; }
.loader-img-extra.is--2 { z-index: 2; }
.loader-img-extra.is--3 { z-index: 1; }

/* Contenu header visible par-dessus l'image (nav + nom + tagline) */
.preloader-content {
  position: relative;
  z-index: 2;           /* Au-dessus du #loaderCover (z-index:1) */
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 5%;   /* Doit correspondre exactement à .site-nav */
}

/* Nav dans le preloader */
.preloader-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.preloader-nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}

.preloader-nav-links { display: flex; gap: 1.5rem; }

.preloader-nav-link {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  display: block;
}

.preloader-nav-cta {
  background: var(--gold);
  color: #000;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

/* Bas du preloader : nom gauche + tagline droite */
.preloader-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  overflow: hidden;
}

.preloader-name {
  display: flex;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
}

.preloader-name-letter { display: block; }
.preloader-name-letter.is--gold  { color: var(--gold); }
.preloader-name-letter.is--space { margin-left: 0.35em; }

.preloader-tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
}


/* ────────────────────────────────────────────────────────────────
   NAVIGATION PRINCIPALE (portfolio)
   Fixe en haut — transparente sur le hero, flouée après scroll.
   ──────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Padding identique à .preloader-content pour que la transition soit imperceptible */
  padding: 2.5rem 5%;
  background: transparent;
  transition: padding 0.4s, background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

/* État scrollé : fond flouté */
.site-nav.is--scrolled {
  padding: 1rem 5%;
  background: rgba(11,11,11,0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--white);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.btn-hire {
  background: var(--gold);
  color: #000;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-hire:hover { background: var(--gold-dim); transform: translateY(-1px); }


/* ────────────────────────────────────────────────────────────────
   GRAFFITI TAG ANIMATION (canvas + spray can)
   Déclenché après la fin du preloader via runGraffitiAnimation().
   ──────────────────────────────────────────────────────────────── */

/* Canvas positionné en absolu sur toute la section hero */
#graffitiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Bombe de peinture qui suit la pointe d'écriture */
#sprayCan {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  width: 52px;
  transform-origin: center center;
  transform: rotate(-135deg);   /* Inclinée pour pointer vers le bas-gauche */
  transition: opacity 0.15s;
}


/* ────────────────────────────────────────────────────────────────
   HERO
   Section plein écran — design identique au dernier frame
   du preloader pour une transition imperceptible.
   ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}

/* Photo de fond plein écran — même image que --hero-img */
.hero-photo-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Layout identique à .preloader-content (même padding, même structure) */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 5%;
  padding-top: calc(2.5rem + 68px); /* Compense la hauteur de la nav fixe */
}

/* Ligne du bas : nom à gauche, tagline à droite */
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Nom — identique à .preloader-name */
.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: flex-end;
}

.hero-name span       { display: block; }
.hero-name .is--gold  { color: var(--gold); }
.hero-name .is--space { margin-left: 0.35em; }
.hero-name .is--copy  {
  font-size: 0.55em;
  opacity: 0.35;
  padding-bottom: 0.12em;
  margin-left: 0.15em;
}

/* Tagline — identique à .preloader-tagline */
.hero-tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}


/* ────────────────────────────────────────────────────────────────
   SECTION WORKS — Grille de projets
   ──────────────────────────────────────────────────────────────── */
.works {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Petite étiquette au-dessus du titre de section */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-eyebrow-line {
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
}

.section-eyebrow-text {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* En-tête de section : titre + lien "View All" */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.view-all {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.view-all:hover { color: var(--white); border-color: var(--white); }

/* Grille verticale de cartes */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* ────────────────────────────────────────────────────────────────
   CARTES PROJETS
   ──────────────────────────────────────────────────────────────── */

/* Base commune à toutes les cartes */
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(200,168,75,0.3);
}

/* ── Carte Van Gogh Museum ── */
.card-vangogh {
  height: 420px;
  background: #0b0b0b;
}

/* Photo de fond avec zoom au survol */
.card-vangogh .card-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('images/vangogh.png') center / cover no-repeat;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-vangogh:hover .card-photo { transform: scale(1.05); }

/* Dégradé sombre en bas pour la lisibilité du texte */
.card-vangogh .card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1)  0%,
    rgba(0,0,0,0.0)  20%,
    rgba(0,0,0,0.65) 58%,
    rgba(0,0,0,0.95) 100%
  );
}

/* ── Carte Vision XPRO 2 ── */
.card-vision {
  height: 290px;
  background: linear-gradient(135deg, #00050f, #030a18);
}

/* Blob SVG décoratif en fond de carte */
.card-blob {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.card:hover .card-blob { opacity: 0.8; }

/* Contenu de la carte — layout flex colonne */
.card-body {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Ligne du haut : badge + flèche */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Badge "musée / lieu" en haut à gauche */
.card-badge {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Flèche circulaire — tourne + devient dorée au survol */
.card-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background 0.2s, transform 0.25s;
}
.card:hover .card-arrow {
  background: var(--gold);
  color: #000;
  transform: rotate(45deg);
}

.card-center { text-align: center; }

/* Petit label au-dessus du titre de carte */
.card-caption {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* Titre principal de la carte */
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
}

/* Variante couleur pour Vision */
.card-vision .card-title {
  color: #00d4ff;
  text-shadow: 0 0 60px rgba(0,200,255,0.35);
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-meta h3 { font-size: 1rem; font-weight: 600; }

/* Tags de compétences */
.card-tags { display: flex; gap: 0.4rem; margin-top: 0.4rem; }

.tag {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}

/* Bouton ticket (conservé pour d'autres cartes éventuelles) */
.btn-ticket {
  background: var(--gold); color: #000;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.55rem 1.1rem; border-radius: 6px; text-decoration: none;
  transition: background 0.2s;
}
.btn-ticket:hover { background: var(--gold-dim); }

/* ── Barre de navigation intégrée à la carte Vision ── */
.vision-chrome {
  position: absolute; top: 0; left: 0; right: 0;
  height: 36px; z-index: 2;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 0.68rem; color: rgba(255,255,255,0.45);
}
.vision-chrome-links { display: flex; gap: 1.5rem; }
.vision-chrome-cta {
  background: #00aaff; color: #000;
  font-size: 0.62rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 4px;
}

/* ── Lunettes SVG dans la carte Vision ── */
.glasses-stage {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.glasses-svg {
  width: 58%;
  opacity: 0.9;
  filter: drop-shadow(0 0 35px rgba(0,160,255,0.3));
}


/* ────────────────────────────────────────────────────────────────
   SECTION CTA — Contact
   ──────────────────────────────────────────────────────────────── */
.cta {
  border-top: 1px solid var(--border);
  padding: 6rem 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Halo doré central décoratif */
.cta::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(200,168,75,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-label {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Lignes décoratives autour du label */
.cta-label::before,
.cta-label::after {
  content: '';
  width: 1.5rem; height: 1px;
  background: var(--gold);
}

/* Email cliquable en grande typographie */
.cta-email {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
  position: relative;
  z-index: 1;
}
.cta-email:hover { color: var(--gold); }


/* ────────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

.footer-links { display: flex; gap: 1.75rem; }
.footer-links a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }


/* ────────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-links           { display: none; }
  .hero-stats          { display: none; }
  .preloader-nav-links { display: none; }
  .loader-word         { font-size: 5rem; }
}
