/* ================================================================
   PORTFOLIO TORIK — Feuille de style
   ================================================================
   Sommaire :
     01. Variables globales (couleurs, ombres)
     02. Reset & typographie de base
     03. Arrière-plan animé (blobs)
     04. Mise en page générale (container, section, eyebrow)
     05. Navbar
     06. Hero / À propos
     07. Projets (carousel)
     08. Compétences
     09. Contact
     10. Footer
     11. Responsive (mobile / tablette)
   ================================================================ */


/* ================================================================
   01. Variables globales
   ---------------------------------------------------------------- */
:root {
  /* Fond */
  --bg-1: #0c0f17;
  --bg-2: #0a0d14;
  --bg-3: #11141d;

  /* Texte */
  --ink:       #f3f1ec;  /* texte principal */
  --ink-soft:  #b8bccb;  /* texte secondaire */
  --ink-mute:  #797f93;  /* texte tertiaire / labels */

  /* Accents */
  --coral: #ff8a6b;
  --sky:   #8ab4ff;
  --sun:   #ffd089;

  /* Effets verre (glassmorphism) */
  --glass:        rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Ombres */
  --shadow-soft:   0 12px 40px -12px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 24px 60px -20px rgba(0, 0, 0, 0.60);
}


/* ================================================================
   02. Reset & typographie
   ---------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg-1);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(255, 138, 107, 0.22), transparent 60%),
    radial-gradient(900px  700px at -10% 30%, rgba(138, 180, 255, 0.20), transparent 55%),
    radial-gradient(1100px 900px at 50% 110%, rgba(255, 138, 107, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

a       { color: inherit; text-decoration: none; }
button  { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img     { display: block; max-width: 100%; }


/* ================================================================
   03. Arrière-plan animé (blobs flottants)
   ---------------------------------------------------------------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  mix-blend-mode: screen;
}

.blob-1 {
  top: 10%; left: 5%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, #ffd089, transparent 70%);
  animation: float1 22s ease-in-out infinite;
}
.blob-2 {
  top: 50%; right: 5%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, #8ab4ff, transparent 70%);
  animation: float2 28s ease-in-out infinite;
}
.blob-3 {
  bottom: 5%; left: 35%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, #ff8a6b, transparent 70%);
  animation: float3 25s ease-in-out infinite;
}

@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate( 40px,  60px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, -40px); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate( 60px, -50px); } }


/* ================================================================
   04. Mise en page générale
   ---------------------------------------------------------------- */
.page      { position: relative; z-index: 2; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
section    { padding: 120px 0; position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--ink-mute);
}

.section-title {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 24px;
}
.section-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 620px;
}


/* ================================================================
   05. Navbar
   ---------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 24px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: var(--shadow-soft);
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  margin-right: 8px;
}
.nav-brand span { color: var(--coral); }

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-link {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 100px;
  transition: all 0.25s ease;
}
.nav-link:hover         { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.nav-link.active        { color: var(--ink); background: rgba(255, 138, 107, 0.16); }

.nav-cta {
  margin-left: 6px;
  padding: 10px 20px;
  background: var(--ink);
  color: #0c0f17;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.25s ease;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--coral); }


/* ================================================================
   06. Hero / À propos
   ---------------------------------------------------------------- */
.hero {
  padding-top: 180px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
  width: 100%;
}

/* Pill "Disponible" */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}
.hero-pill .dot {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #5ec77a, #3fb060);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  font-size: 11px;
}

/* Titre hero (Manrope, pas Fraunces) */
.hero-title {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: 1.04;
  margin-bottom: 28px;
  font-weight: 300;
  letter-spacing: -0.025em;
}
.hero-title .accent {
  font-weight: 500;
  background: linear-gradient(120deg, var(--coral), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


.hero-title .accent.typewriter::after {
  content: '.';
  color: var(--coral);
  animation: cursor-blink 0.75s step-end infinite;
}

@keyframes cursor-blink {
  from, to { color: transparent; }
  50%       { color: var(--coral); }
}

.hero-desc {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Boutons génériques */
.btn {
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary       { background: var(--ink); color: #0c0f17; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); }

.btn-ghost {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--glass-strong); transform: translateY(-2px); }

/* Carte avatar + cartes flottantes */
.avatar-wrap {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
}
.avatar-card {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-strong);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.avatar-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.avatar-card img.avatar-active {
  opacity: 1;
}

.avatar-floating {
  position: absolute;
  background: rgba(20, 24, 35, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: var(--shadow-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: floatY 6s ease-in-out infinite;
  z-index: 2;
}
.avatar-floating.f1 { top: 20px;    left: -30px; }
.avatar-floating.f2 { bottom: 40px; right: -40px; animation-delay: -3s; }

.avatar-floating .ico {
  width: 28px; height: 28px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.avatar-floating .label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }


/* ================================================================
   07. Projets — Carousel
   ---------------------------------------------------------------- */
.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 32px;
  flex-wrap: wrap;
}

.carousel-controls { display: flex; gap: 10px; }

.ctrl {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  transition: all 0.25s ease;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.ctrl:hover    { background: var(--ink); color: #0c0f17; transform: translateY(-2px); }
.ctrl:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

.carousel       { position: relative; overflow: visible; }
.carousel-track {
  display: flex;
  gap: 28px;
  transition: transform 0.7s cubic-bezier(.2, .8, .2, 1);
}

.project-card {
  flex: 0 0 calc((100% - 56px) / 3);
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease;
  transform-style: preserve-3d;
  cursor: default;
}
.project-card.clickable        { cursor: pointer; }
.project-card:hover            { box-shadow: var(--shadow-strong); }

.project-cover {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background-size: cover;
  background-position: center;
}
/* Variante photo : on garde la lettre lisible via un voile sombre + flou subtil */
.project-cover.has-image {
  background-color: #11141d;
}
.project-cover.has-image::before {
  content: "";
  position: absolute; inset: 0;
  backdrop-filter: blur(2px);
  background: linear-gradient(135deg, rgba(0,0,0,0.30), rgba(0,0,0,0.45));
  z-index: 0;
}
.project-card:hover .project-cover.has-image::before {
  backdrop-filter: blur(0px);
  background: linear-gradient(135deg, rgba(0,0,0,0.15), rgba(0,0,0,0.25));
  transition: backdrop-filter 0.4s ease, background 0.4s ease;
}
/* Rayures subtiles — uniquement sur les couvertures dégradées (pas sur photo) */
.project-cover:not(.has-image)::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 12px,
    rgba(255, 255, 255, 0.08) 12px,
    rgba(255, 255, 255, 0.08) 24px
  );
}
.project-glyph {
  font-family: 'Fraunces', serif;
  font-size: 84px;
  color: white;
  opacity: 0.95;
  font-weight: 500;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}
/* Sur une photo, la lettre prend le dégradé d'accent pour mieux ressortir */
.project-cover.has-image .project-glyph {
  background: linear-gradient(135deg, var(--coral), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

.project-body  { padding: 24px 26px 28px; }
.project-tag   {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 10px;
}
.project-title { font-size: 24px; margin-bottom: 8px; }
.project-desc  { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.project-stack { display: flex; gap: 6px; flex-wrap: wrap; }
.stack-chip {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  color: var(--ink-soft);
  font-weight: 500;
}
.project-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #0c0f17;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, background 0.2s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.project-arrow:hover { background: var(--coral); }
.project-card.clickable:hover .project-arrow { transform: rotate(-45deg); }

.carousel-dots {
  display: flex; gap: 8px;
  margin-top: 40px;
  justify-content: center;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
  cursor: pointer;
}
.dot.active { width: 28px; border-radius: 4px; background: var(--coral); }


/* ================================================================
   08. Compétences
   ---------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}

.skill-card {
  padding: 28px 24px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(.2, .8, .2, 1);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}
/* halo coloré au survol — la couleur vient de --sc1 (passée en inline style) */
.skill-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--sc1, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.skill-card:hover::before { opacity: 0.5; }

.skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative; z-index: 1;
}
.skill-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  color: white;
}
.skill-icon img {
  width: 26px; height: 26px;
  object-fit: contain;
  display: block;
}
.skill-level {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.skill-name { font-size: 20px; margin-bottom: 6px; position: relative; z-index: 1; }
.skill-desc { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; position: relative; z-index: 1; }

.skill-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  position: relative; z-index: 1;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--sky));
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}


/* ================================================================
   09. Contact
   ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
  margin-top: 56px;
}
.contact-card {
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

/* Variante : quand la grille n'a qu'une seule carte, la centrer */
.contact-grid.single {
  grid-template-columns: 1fr;
  justify-items: center;
}
.contact-grid.single .contact-card {
  max-width: 720px;
  width: 100%;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-row  {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.contact-row:last-child { border-bottom: none; }

.contact-row-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255, 138, 107, 0.14);
  color: var(--coral);
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-row-label {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-row-value { font-size: 16px; font-weight: 500; }

/* Formulaire */
.form-row        { margin-bottom: 18px; }
.form-row.split  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-input,
.form-area {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: all 0.2s ease;
}
.form-input::placeholder,
.form-area::placeholder { color: var(--ink-mute); }
.form-input:focus,
.form-area:focus {
  outline: none;
  border-color: var(--coral);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 138, 107, 0.18);
}
.form-area { resize: vertical; min-height: 120px; }

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--ink);
  color: #0c0f17;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s ease;
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.submit-btn:hover { background: var(--coral); transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.submit-btn.sent  { background: #5ec77a; }


/* ================================================================
   10. Footer
   ---------------------------------------------------------------- */
footer {
  padding: 80px 0 48px;
  position: relative;
  z-index: 2;
}
.footer-card {
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 36px;
  padding: 56px 56px 32px;
  box-shadow: var(--shadow-soft);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}
.footer-brand h3 { font-size: 32px; margin-bottom: 12px; }
.footer-brand p  { color: var(--ink-soft); max-width: 340px; }

.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: var(--ink-soft);
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--coral); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 16px;
}
.copyright { font-size: 13px; color: var(--ink-mute); }

.socials { display: flex; gap: 10px; }
.social {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: all 0.25s ease;
}
.social:hover {
  background: var(--ink);
  color: #0c0f17;
  transform: translateY(-2px);
}


/* ================================================================
   11. Responsive
   ---------------------------------------------------------------- */

/* Tablette ----------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 360px; gap: 56px; }
  section    { padding: 100px 0; }
}

/* Petit laptop / grande tablette ------------------------- */
@media (max-width: 860px) {
  .navbar       { top: 14px; padding: 6px 6px 6px 18px; gap: 2px; max-width: calc(100vw - 24px); }
  .nav-brand    { font-size: 16px; padding-right: 12px; margin-right: 4px; }
  .nav-link     { padding: 8px 12px; font-size: 13px; }
  .nav-cta      { padding: 8px 14px; font-size: 13px; }

  .hero         { padding-top: 150px; padding-bottom: 60px; min-height: auto; }
  .hero-grid    { grid-template-columns: 1fr; gap: 48px; }
  .hero-title   { font-size: clamp(40px, 11vw, 64px); }
  .hero-desc    { font-size: 17px; }

  .avatar-wrap        { max-width: 320px; margin: 0 auto; order: -1; }
  .avatar-floating.f1 { top: 12px;    left: 12px; }
  .avatar-floating.f2 { bottom: 12px; right: 12px; }

  .project-card     { flex: 0 0 calc((100% - 24px) / 2); }
  .skills-grid      { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .contact-grid     { grid-template-columns: 1fr; gap: 24px; }
  .contact-card     { padding: 32px; }
  .footer-top       { grid-template-columns: 1fr; gap: 32px; }
  .footer-card      { padding: 40px 32px 28px; border-radius: 28px; }
  .projects-head    { margin-bottom: 40px; }
  .section-title    { font-size: clamp(32px, 6vw, 48px); }
}

/* Téléphone --------------------------------------------- */
@media (max-width: 640px) {
  section            { padding: 80px 0; }
  .container         { padding: 0 20px; }
  .hero              { padding-top: 130px; padding-bottom: 40px; }

  .hero-pill         { font-size: 12px; padding: 6px 14px 6px 6px; }
  .hero-pill .dot    { width: 18px; height: 18px; font-size: 10px; }
  .hero-title        { font-size: clamp(36px, 11vw, 52px); line-height: 1.05; }
  .hero-desc         { font-size: 16px; }
  .hero-actions      { gap: 10px; }
  .btn               { padding: 12px 20px; font-size: 14px; }

  .navbar            { top: 12px; padding: 4px 4px 4px 14px; gap: 0; width: calc(100vw - 20px); justify-content: space-between; }
  .nav-brand         { font-size: 15px; padding-right: 0; margin-right: 0; border-right: none; }
  .nav-links         { display: flex; gap: 0; flex: 1; justify-content: center; }
  .nav-link          { padding: 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
  .nav-link.active   { background: rgba(255, 138, 107, 0.16); padding: 8px 8px; }
  .nav-cta           { display: none; }

  .avatar-wrap       { max-width: 280px; }
  .avatar-floating   { font-size: 12px; padding: 10px 12px; }
  .avatar-floating .ico { width: 24px; height: 24px; font-size: 13px; }
  .avatar-floating .label { font-size: 9px; }

  .projects-head     { flex-direction: column; align-items: flex-start; gap: 20px; }
  .carousel-controls { align-self: flex-end; }
  .ctrl              { width: 44px; height: 44px; }
  .project-card      { flex: 0 0 100%; }
  .project-cover     { aspect-ratio: 16/10; }
  .project-glyph     { font-size: 64px; }
  .project-body      { padding: 20px 22px 24px; }

  .skills-grid       { grid-template-columns: 1fr 1fr; gap: 12px; }
  .skill-card        { padding: 22px 18px; }
  .skill-name        { font-size: 18px; }
  .skill-icon        { width: 38px; height: 38px; font-size: 16px; }
  .skill-icon img    { width: 22px; height: 22px; }

  .contact-card      { padding: 24px; border-radius: 22px; }
  .form-row.split    { grid-template-columns: 1fr; }

  .footer-card       { padding: 32px 24px 24px; border-radius: 24px; }
  .footer-bottom     { flex-direction: column; align-items: flex-start; gap: 20px; }

  .section-title     { font-size: clamp(30px, 8vw, 40px); }
  .section-sub       { font-size: 16px; }
}

/* Très petits écrans ------------------------------------ */
@media (max-width: 380px) {
  .nav-link  { font-size: 10px; padding: 8px 4px; }
  .nav-brand { font-size: 14px; }
}


/* ================================================================
   12. Popup détaillée projet (modal)
   ---------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  animation: modalFadeIn 0.25s ease;
  overflow: hidden;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 64px);
  background: rgba(20, 24, 35, 0.92);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(20, 24, 35, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: var(--coral);
  color: #0c0f17;
  transform: scale(1.05);
}

/* Couverture (screenshot ou repli) */
.modal-cover {
  flex-shrink: 0;
  height: 320px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-cover.has-shot::after {
  /* léger gradient en bas pour fondre avec le body */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(20, 24, 35, 0.7), transparent);
  pointer-events: none;
}

/* Contenu */
.modal-body {
  padding: 36px 40px 40px;
  overflow: visible;
}

.modal-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 10px;
}
.modal-title {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 24px;
}

/* Métadonnées (Rôle, Année, …) */
.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 24px;
  padding: 20px 0;
  margin-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-meta > div { display: flex; flex-direction: column; gap: 4px; }
.meta-k {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.meta-v { font-size: 14px; color: var(--ink); font-weight: 500; }

.modal-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.modal-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}

.modal-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.modal-features .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(94, 199, 122, 0.18);
  color: #5ec77a;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* Responsive modal */
@media (max-width: 640px) {
  .modal-backdrop { padding: 16px 12px; }
  .modal         { border-radius: 22px; max-height: calc(100vh - 32px); }
  .modal-cover   { height: 200px; }
  .modal-body    { padding: 28px 24px 32px; }
  .modal-title   { font-size: 28px; }
  .modal-close   { top: 12px; right: 12px; width: 36px; height: 36px; }
  .modal-meta    { grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px 0; }
}
