@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root{
  --paper:#ffffff;
  --ink:#161514;
  --footer:#161514;
  --footer-text:#ffffff;
  --line:#ffffff;

  /* candy palette used across placeholder art */
  --c1:#3aa65c; /* green */
  --c2:#a9432f; /* rust */
  --c3:#e8c34a; /* yellow */
  --c4:#4fc0ce; /* sky */
  --c5:#e8792f; /* orange */
  --c6:#5b7fd4; /* blue */
  --c7:#f2a5c4; /* pink */
  --c8:#1d1d1b; /* near black */
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth; overflow-y:scroll;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Poppins', sans-serif;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
img{display:block; max-width:100%;}

a:focus-visible, button:focus-visible{
  outline:2px solid var(--ink);
  outline-offset:3px;
}

@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important;}
}

.wrap{max-width:1320px; margin:0 auto; padding:0 48px;}

/* ---------- HEADER ---------- */
header{
  padding:18px 0 10px;
  position:sticky;
  top:0;
  z-index:100;
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  max-width:1320px; margin:0 auto; padding:0 48px;
}
.logo{
  font-family:'Permanent Marker', cursive;
  font-size:1.40rem;
  line-height:1.05;
  letter-spacing:0.01em;
  display:block;
}
.logo span{display:block;}
/* La nav n'a plus de fond : plutôt qu'une plaque derrière le logo, un
   contour blanc épouse directement la forme du dessin (façon sticker),
   pour qu'il reste lisible quel que soit ce qui défile derrière. */
.logo img{
  height:50px;
  width:auto;
  display:block;
  filter:
    drop-shadow(2px 0 0 #fff)
    drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff)
    drop-shadow(0 -2px 0 #fff)
    drop-shadow(1.4px 1.4px 0 #fff)
    drop-shadow(-1.4px 1.4px 0 #fff)
    drop-shadow(1.4px -1.4px 0 #fff)
    drop-shadow(-1.4px -1.4px 0 #fff);
}
.navlinks{display:flex; gap:10px; font-size:0.8rem; font-weight:700;}
.navlinks a{
  display:inline-block;
  padding:8px 18px;
  border-radius:100px;
  background:var(--ink);
  color:#ffff;
  transition:transform .4s cubic-bezier(.34,1.56,.64,1);
}
.navlinks a:hover,
.navlinks a.active{
  transform:rotate(-6deg) scale(1.15); color: #05a3ff;
}
/* Le contact est le seul lien coloré : il ressort du reste du menu. */
.navlinks a.nav-cta{
  background:#05a3ff;
  color:#fff;
}
.navlinks a.nav-cta:hover,
.navlinks a.nav-cta.active{
  color:var(--ink);
}
.burger{
  display:none; background:none; border:none; cursor:pointer;
  width:26px; height:18px; position:relative; padding:0;
}
.burger-bar{
  position:absolute; left:0; width:100%; height:2px;
  background:var(--ink); border-radius:2px;
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), opacity .2s ease, top .35s ease;
}
.burger-bar:nth-child(1){top:0;}
.burger-bar:nth-child(2){top:8px;}
.burger-bar:nth-child(3){top:16px;}
.burger.open .burger-bar:nth-child(1){top:8px; transform:rotate(45deg);}
.burger.open .burger-bar:nth-child(2){opacity:0;}
.burger.open .burger-bar:nth-child(3){top:8px; transform:rotate(-45deg);}

@media (max-width:820px){
  /* Le header reste sans fond ici (accueil, contact, mentions légales) :
     pas de voile ni de dégradé, le logo garde son contour blanc en sticker
     (voir .logo img) pour rester lisible. Portfolio et À propos, où le
     contenu remplit l'écran dès le haut de page, surchargent ceci avec un
     fond blanc plein dans leur propre <style> (voir header{background...}
     dans portfolio.html / apropos.html). */
  /* Le menu déroulant se positionne sous le pictogramme (burger), boutons
     alignés sur la droite — chacun garde son propre fond (comme sur
     desktop), sans rectangle blanc qui les engloberait. Apparaît avec un
     léger fondu + glissé au lieu d'un affichage instantané. Reste dans le
     flux (display:flex en permanence) pour que la transition puisse jouer ;
     visibility bascule après le fondu de fermeture pour ne pas laisser les
     liens focusables/cliquables tant que le menu est invisible. */
  .navlinks{
    display:flex;
    position:absolute; top:66px; right:24px; left:auto;
    flex-direction:column; align-items:flex-end; gap:10px;
    z-index:60;
    opacity:0;
    visibility:hidden;
    transform:translateY(-10px) scale(0.96);
    transform-origin:top right;
    transition:opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1), visibility 0s linear .25s;
  }
  .navlinks.open{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
    transition:opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1), visibility 0s linear 0s;
  }
  .navlinks a{padding:9px 20px;}
  .burger{display:block;}
  .wrap, .nav{padding-left:24px; padding-right:24px;}
}

/* ---------- FOOTER ---------- */
footer{
  background:var(--footer);
  color:var(--footer-text);
  margin-top:120px;
  padding:16px 0;
}
.footer-inner{
  max-width:1320px; margin:0 auto; padding:0 48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.footer-links{display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px 20px; font-size:0.78rem;}
.footer-links a:hover{color:#05a3ff;}

.back-to-top{
  background:none;
  border:none; cursor:pointer;
  flex-shrink:0;
  transition:transform .4s cubic-bezier(.34,1.56,.64,1);
}
.back-to-top img{width:38px; height:auto; display:block;}
.back-to-top:hover{transform:translateY(-3px) rotate(-8deg) scale(1.08);}

@media (max-width:820px){
  .footer-inner{padding:0 24px;}
}
@media (max-width:480px){
  .footer-links{font-size:0.72rem; gap:5px 14px;}
}

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  background:var(--ink); color:#fff;
  font-weight:700; font-size:0.95rem;
  padding:15px 28px;
  border-radius:100px;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1);
}
/* Le décollé reste animé, mais la couleur change en cut (pas de transition
   sur background) : bascule immédiate, sans fondu ni jeu d'opacité. */
.btn:hover{transform:translateY(-2px); background:#05a3ff;}
.btn-outline{
  background:transparent; color:var(--ink);
  border:2px solid var(--ink);
}
.btn-outline:hover{background:var(--ink); color:#fff;}

/* ---------- PLACEHOLDER TILE ---------- */
.ph{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  flex-direction:column; gap:8px;
  color:rgba(255,255,255,0.85);
  font-family:'Poppins', sans-serif;
  font-size:0.72rem;
  text-align:center;
  padding:14px;
}
.ph svg{width:26px;height:26px;opacity:0.8;}

/* ---------- MODALE SHOWREEL ---------- */
.showreel-modal{
  position:fixed; inset:0;
  background:rgba(255,255,255,0.94);
  display:flex; align-items:center; justify-content:center;
  padding:40px;
  z-index:300; /* au-dessus du header et de la lightbox du portfolio */
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
}
.showreel-modal.open{opacity:1; pointer-events:auto;}
.showreel-inner{
  position:relative;
  width:min(1100px, 92vw);
  transform:scale(.9);
  transition:transform .5s cubic-bezier(0,1.56,.64,1);
}
.showreel-modal.open .showreel-inner{transform:scale(1);}
.showreel-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:10px;
  overflow:hidden;
  background:#161514;
}
.showreel-frame iframe{
  position:absolute; inset:0;
  width:100%; height:100%;
  border:0;
}
.showreel-close{
  position:absolute;
  top:-20px; right:-20px;
  width:40px; height:40px;
  border-radius:100px;
  background:#fff;
  border:none;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  z-index:2;
  box-shadow:0 2px 10px rgba(0,0,0,0.12);
  transition:transform .3s cubic-bezier(.34,1.56,.64,1);
}
.showreel-close:hover{transform:rotate(90deg);}
.showreel-close svg{width:18px; height:18px;}
.showreel-fallback{
  display:block;
  margin-top:14px;
  text-align:center;
  font-size:0.78rem;
  font-weight:600;
  color:#05a3ff;
}
.showreel-fallback:hover{text-decoration:underline;}

@media (max-width:600px){
  .showreel-modal{padding:20px;}
  .showreel-close{top:-16px; right:-6px;}
}

/* ---------- CURSEUR PERSONNALISÉ ---------- */
/* La classe est posée par cursor.js : sans JavaScript, le pointeur du système
   reste en place. */
html.custom-cursor,
html.custom-cursor *{cursor:none;}
/* Sauf au-dessus du lecteur vidéo, dont l'iframe gère son propre pointeur. */
html.custom-cursor .showreel-frame,
html.custom-cursor .showreel-frame *{cursor:auto;}

.cursor{
  position:fixed;
  top:0; left:0;
  width:0; height:0;
  pointer-events:none;
  z-index:400; /* au-dessus de la modale showreel (300) */
  opacity:0;
  will-change:transform;
  transition:opacity .12s ease;
}
.cursor.is-visible{opacity:1;}
.cursor.is-hidden{opacity:0;}

/* Les dessins sont superposés ; chacun est décalé pour que son point de
   contact (la pointe de la flèche, le bout du doigt) tombe pile sur le
   pointeur. On ne montre que celui de l'état courant. */
.cursor img{
  position:absolute;
  opacity:0;
  transition:opacity .07s ease, transform .1s ease;
  transform-origin:top left;
  /* Le conteneur est un point sans dimension : sans cela, la règle globale
     img{max-width:100%} réduirait les dessins à zéro. */
  max-width:none;
}
.cursor .cursor-classic{width:14.6px; height:28.2px; left:-1.3px;  top:0; transform:rotate(-6deg);}
/* transform-origin recalé sur la pointe du doigt (environ 48% de la largeur,
   0 en hauteur) pour que le "down scale" au clic reste ancré sur le pointeur
   plutôt que sur le coin de l'image. */
.cursor .cursor-clic   {width:25.3px; height:31.7px; left:-12.2px; top:0; transform-origin:48% 0%;}

/* Petit "down scale" de la main pendant l'appui du clic (souris enfoncée). */
.cursor.is-pressed .cursor-clic{transform:scale(0.8);}

.cursor[data-state="classic"] .cursor-classic,
.cursor[data-state="clic"] .cursor-clic{opacity:1;}

@media (prefers-reduced-motion: reduce){
  .cursor img{transition:none;}
}

/* ---------- ACCESSIBILITÉ ---------- */
/* Titre de page réservé aux lecteurs d'écran et aux moteurs de recherche.
   Sur l'accueil et le portfolio, le titre visible est un lettrage SVG animé ;
   sur les autres pages il est porté par la mise en page. Aucun des deux n'est
   lisible comme du texte : ce <h1> comble ce manque sans rien changer à l'écran.
   La technique (et non display:none) garde le texte annoncé à la voix. */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
