/* ════════════════════════════════════════════════════════════
   CSS VARIABLES — palette light / dark
════════════════════════════════════════════════════════════ */
:root {
  --c-bg:         #F6F5F3;
  --c-surface:    #ECEBE7;
  --c-sable:      #E8E5E0;
  --c-text:       #1A1A24;
  --c-text-mid:   #4A4845;
  --c-text-soft:  #6B6960;
  --c-text-muted: #9A9690;
  --c-accent:     #7B6FA0;
  --c-accent-dk:  #5A4F80;
  --c-accent-lt:  #EDEAF5;
  --c-accent-mid: #C4B8E0;
  --c-border:     #D3CEC8;
  --c-border-s:   #E8E5E0;
}

html.dark {
  --c-bg:         #121020;
  --c-surface:    #1E1C2C;
  --c-sable:      #1A1A24;
  --c-text:       #F0EFF7;
  --c-text-mid:   #C2BFD0;
  --c-text-soft:  #9A9690;
  --c-text-muted: #9A9690;
  --c-accent:     #9B8FC4;
  --c-accent-dk:  #7B6FA0;
  --c-accent-lt:  #1C1A38;
  --c-accent-mid: #28204C;
  --c-border:     #2A2840;
  --c-border-s:   #221F30;
}

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

html { scroll-behavior: smooth; cursor: none; }

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* ─── Accessibilité ─────────────────────────────────────────────────────────── */

/* Skip link (RGAA 12.12 / WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; left: 16px; }

/* Focus visible global (RGAA 10.7 / WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Texte accessible hors-écran */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ════════════════════════════════════════════════════════════
   CURSEUR PERSONNALISÉ
════════════════════════════════════════════════════════════ */
#cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.2s ease;
  will-change: left, top;
}

#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, opacity 0.2s ease;
  opacity: 0.6;
  will-change: left, top;
}

body:has(a:hover) #cursor,
body:has(button:hover) #cursor,
body:has([data-modal-btn]:hover) #cursor  { width: 16px; height: 16px; background: var(--c-accent-dk); }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring,
body:has([data-modal-btn]:hover) #cursor-ring { width: 56px; height: 56px; opacity: 0.3; }

/* ════════════════════════════════════════════════════════════
   LOGO NAVBAR
════════════════════════════════════════════════════════════ */
.logo-badge {
  background: var(--c-text);
  color: var(--c-bg);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  width: 32px; height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}

/* ════════════════════════════════════════════════════════════
   NAVIGATION
════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 23, 20, 0.08);
}

html.dark #navbar.scrolled {
  background: rgba(20, 18, 16, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-mid);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--c-accent);
  transition: width 0.3s cubic-bezier(.23,1,.32,1);
}

.nav-link:hover,
.nav-link.active { color: var(--c-text); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Menu mobile */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  z-index: 90;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

#mobile-menu.open { display: flex; }

#mobile-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

html.dark #mobile-close svg path { stroke: var(--c-text); }

.mobile-nav-link {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--c-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover { color: var(--c-accent); }

/* Burger */
#burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  background: none;
  border: none;
  padding: 4px;
}

.burger-line {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--c-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

#burger.open .burger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#burger.open .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
#burger.open .burger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════
   BOUTONS PARTAGÉS
════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-text);
  color: var(--c-bg);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.01em;
  border: none;
  cursor: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover { background: var(--c-accent); transform: translateY(-2px); }
.btn-primary svg   { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(4px); }

/* hover en dark : texte clair sur fond accent moyen */
html.dark .btn-primary:hover { color: var(--c-text); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 28px;
  border: 1.5px solid var(--c-text);
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-2px); }
html.dark .btn-secondary { border-color: var(--c-border); }

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  background-color: var(--c-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

#hero-deco {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Fraunces', serif;
  font-size: clamp(200px, 28vw, 420px);
  font-weight: 700;
  color: var(--c-sable);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

html.dark #hero-deco { color: #1E1C2C; }

.hero-content { position: relative; z-index: 1; }

/* Photo + tag */
.hero-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.hero-avatar-wrap {
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--c-border);
  flex-shrink: 0;
  background: var(--c-sable);
}

.hero-avatar {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.hero-avatar-fallback {
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-soft);
}

/* Tag / eyebrow */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.hero-tag::before {
  content: '';
  display: block;
  width: 24px; height: 1.5px;
  background: var(--c-accent);
}

/* Titre principal */
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.0;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

.hero-title em { font-style: italic; font-weight: 400; color: var(--c-text-mid); }

/* Typewriter */
#typewriter-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 4px;
}

#typewriter {
  font-family: 'Fraunces', serif;
  font-size: 1em;
  font-weight: 700;
  font-style: italic;
  color: var(--c-accent);
  letter-spacing: -0.02em;
  display: inline-block;
  min-width: 0;
}

.cursor-blink {
  display: inline-block;
  width: 3px;
  height: 0.82em;
  background: var(--c-accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Typewriter — ligne responsif */
.hero-typewriter-line {
  height: 1.1em;
  overflow: hidden;
  white-space: nowrap;
}

/* Sous-titre */
.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--c-text-soft);
  line-height: 1.6;
  max-width: 480px;
}

/* Chips hero */
.chip-terra-border { border: 1px solid var(--c-accent-mid); }

/* Séparateurs de stats */
.stat-divider { width: 1px; height: 36px; background: var(--c-border); flex-shrink: 0; }

/* Stats */
.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--c-text-muted);
  letter-spacing: 0.03em;
}

/* Scroll indicator */
#scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.scroll-line {
  width: 1.5px; height: 48px;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

html.dark .scroll-line { background: linear-gradient(to bottom, var(--c-accent), transparent); }

@keyframes scrollDown {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

.scroll-text {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ════════════════════════════════════════════════════════════
   ANIMATIONS SCROLL
════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.23,1,.32,1), transform 0.7s cubic-bezier(.23,1,.32,1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   SECTIONS UTILITAIRES
════════════════════════════════════════════════════════════ */
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.section-bar {
  width: 48px; height: 3px;
  background: var(--c-accent);
  margin-top: 16px;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   LABEL PETITES CAPS — pattern partagé
════════════════════════════════════════════════════════════ */
.exp-meta-label,
.exp-block-label,
.contact-info-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.exp-block-label { margin-bottom: 10px; }
.contact-info-label { margin-bottom: 4px; }

.form-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-soft);
}

/* ════════════════════════════════════════════════════════════
   EXPÉRIENCES
════════════════════════════════════════════════════════════ */
.exp-timeline { display: flex; flex-direction: column; gap: 32px; }

.exp-card {
  background: var(--c-bg);
  border-radius: 12px;
  border: 1px solid var(--c-border);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.exp-card:hover {
  box-shadow: 0 8px 40px rgba(26,26,36,0.08);
  transform: translateY(-2px);
}

html.dark .exp-card { background: #181624; border-color: var(--c-border); }
html.dark .exp-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.35); }

.exp-card-inner { display: grid; grid-template-columns: 200px 1fr; }

/* Colonne gauche */
.exp-meta {
  padding: 32px 24px;
  border-right: 1px solid var(--c-border-s);
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--c-surface);
}

html.dark .exp-meta { background: var(--c-surface); border-color: var(--c-border-s); }

.exp-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-self: flex-start;
}

.exp-badge--dev   { background: var(--c-text); color: var(--c-bg); }
.exp-badge--other { background: var(--c-border); color: var(--c-text-mid); }

html.dark .exp-badge--other { background: var(--c-border-s); border: 1px solid var(--c-border); }

.exp-meta-block { display: flex; flex-direction: column; gap: 3px; }

.exp-meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.4;
}

.exp-duration-num {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}

/* Colonne droite */
.exp-content { padding: 32px 36px; display: flex; flex-direction: column; gap: 24px; }

.exp-header { display: flex; align-items: flex-start; justify-content: space-between; }

.exp-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}

.exp-company-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.exp-company  { font-size: 14px; font-weight: 500; color: var(--c-text-mid); }
.exp-sep      { color: var(--c-border); }
.exp-location { font-size: 13px; color: var(--c-text-soft); }

.exp-website {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.exp-website:hover { opacity: 0.7; }

.exp-description p {
  font-size: 15px;
  color: var(--c-text-mid);
  line-height: 1.7;
}

.exp-missions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-missions-list li {
  font-size: 14px;
  color: var(--c-text-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.exp-missions-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  transform: translateY(-50%);
}

/* Sites travaillés */
.exp-sites-list { display: flex; flex-wrap: wrap; gap: 10px; }

.exp-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  padding: 6px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.exp-site-link:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-lt); }

/* Pills */
.exp-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}

.pill--tech { background: var(--c-text); color: var(--c-bg); }
.pill--soft { background: var(--c-accent-lt); color: var(--c-accent-dk); border: 1px solid var(--c-accent-mid); }

html.dark .pill--tech { background: #2C2A3C; color: var(--c-text); }
html.dark .pill--soft { background: var(--c-accent-lt); color: #C4B8E0; border-color: var(--c-accent-mid); }

/* Tags de carte (générés par projects.js) */
.card-tag-tech { background: var(--c-text); color: var(--c-bg); }
.card-tag-cat  { background: var(--c-accent-lt); color: var(--c-accent-dk); border: 1px solid var(--c-accent-mid); }


/* ════════════════════════════════════════════════════════════
   CONTACT
════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}

.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }

.form-input {
  width: 100%;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 0; }

.form-input::placeholder { color: var(--c-text-muted); }
.form-input:focus { border-color: var(--c-accent); background: var(--c-bg); }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

html.dark .form-input { background: #181624; border-color: var(--c-border); }
html.dark .form-input:focus { border-color: var(--c-accent); background: var(--c-surface); }

.form-error { font-size: 11px; color: var(--c-accent); margin-top: -2px; }
.form-input[aria-invalid="true"] { border-color: var(--c-accent); }

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--c-accent-lt);
  border: 1px solid var(--c-accent-mid);
  border-radius: 6px;
  font-size: 14px;
  color: var(--c-accent-dk);
}

html.dark .form-success { color: #C4B8E0; }
.form-success.visible { display: flex; }

/* Infos contact */
.contact-info-col { display: flex; flex-direction: column; gap: 0; }
.contact-info-block { margin-bottom: 20px; }

.contact-info-value { font-size: 15px; font-weight: 500; color: var(--c-text); }

.contact-info-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.contact-info-link:hover { opacity: 0.7; }

/* Bloc CV */
.contact-cv-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  margin-bottom: 20px;
  transition: border-color 0.2s, background 0.2s;
}

.contact-cv-block:hover { border-color: var(--c-accent); background: var(--c-accent-lt); }

html.dark .contact-cv-block { background: #181624; border-color: var(--c-border); }
html.dark .contact-cv-block:hover { border-color: var(--c-accent); background: var(--c-accent-lt); }

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-cv-block:hover .cv-link { color: var(--c-accent); }

.cv-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: var(--c-text);
  color: var(--c-bg);
  border-radius: 3px;
}

/* Séparateur contact */
.contact-divider { height: 1px; background: var(--c-border); margin: 24px 0; }

.contact-socials { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

.social-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  padding: 10px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social-link:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-lt); }

html.dark .social-link { background: #181624; border-color: var(--c-border); color: var(--c-text-mid); }
html.dark .social-link:hover { border-color: var(--c-accent); color: var(--c-accent); background: var(--c-accent-lt); }

/* ════════════════════════════════════════════════════════════
   ICÔNES TECH (Compétences)
════════════════════════════════════════════════════════════ */
.tech-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.tech-icon-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  background: var(--c-bg);
  border: 1px solid var(--c-border-s);
  border-radius: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-icon-chip:hover {
  border-color: var(--c-accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(123, 111, 160, 0.15);
}

.tech-icon-chip img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.tech-icon-chip span {
  font-size: 10px;
  font-weight: 500;
  color: var(--c-text-mid);
  text-align: center;
  line-height: 1.2;
}

html.dark .tech-icon-chip { background: #181624; border-color: var(--c-border); }
html.dark .tech-icon-chip span { color: var(--c-text-mid); }
html.dark .tech-icon-chip:hover { border-color: var(--c-accent); box-shadow: 0 4px 16px rgba(155, 143, 196, 0.15); }

/* ════════════════════════════════════════════════════════════
   PHOTOGRAPHIE
════════════════════════════════════════════════════════════ */
#photography {
  background: #1A1A24;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

#photography .hero-tag    { color: var(--c-accent); }
#photography .section-title { color: #F6F5F3; }
#photography .section-bar   { background: var(--c-accent); }

/* Hiérarchie typographique (fond toujours sombre) */
.photo-text-primary   { color: #AEAABD; }
.photo-text-secondary { color: #C2BFD0; }
.photo-text-muted     { color: #9A9690; }

/* Trait décoratif */
.photo-strip-line { height: 1px; background: #2A2840; flex-shrink: 0; }

/* Lien contact photo */
.photo-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-accent);
  transition: color 0.2s ease;
}
.photo-contact-link:hover { color: #F6F5F3; }
.photo-contact-link svg   { flex-shrink: 0; }

#photo-featured {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: #19172A;
  border: 1px dashed #2A2840;
}

/* Déco arrière-plan */
.photo-deco {
  position: absolute;
  right: -2vw;
  top: 80px;
  font-family: 'Fraunces', serif;
  font-size: clamp(120px, 20vw, 280px);
  font-weight: 700;
  font-style: italic;
  color: #1E1C2C;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Info box */
.photo-info-box {
  background: #19172A;
  border: 1px solid #2A2840;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

/* Lien Instagram */
.photo-insta-link { color: #9A9690; transition: color 0.2s ease; }
.photo-insta-link:hover { color: var(--c-accent); }

/* Textes footer (fond encre permanent) */
.footer-text  { color: #9A9690; }
.footer-label { color: #AEAABD; }

/* Bulles de filtre photo */
.photo-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 20px 0;
}
.photo-filter-btn {
  border: 1px solid #3A3848;
  background: transparent;
  color: #9A9690;
  border-radius: 20px;
  padding: 6px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.photo-filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.photo-filter-btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #F6F5F3;
}
html.dark .photo-filter-btn { border-color: #3A3848; color: #9A9690; }
html.dark .photo-filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
html.dark .photo-filter-btn.active { background: var(--c-accent); border-color: var(--c-accent); color: #F0EDE7; }

/* Strip photos */
.photo-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.photo-strip:active   { cursor: grabbing; }
.photo-strip::-webkit-scrollbar { display: none; }

.photo-item {
  position: relative;
  height: 380px;
  border-radius: 10px;
  overflow: hidden;
  background: #1E1C2C;
  border: 1px dashed #2A2840;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: border-color 0.3s ease;
}

.photo-item:hover { border-color: var(--c-accent); }

.photo-item img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo-item:hover img { transform: scale(1.04); }

.photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(26,26,36,0.85), transparent);
  font-size: 12px;
  color: #F6F5F3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-item:hover .photo-caption { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   BACK TO TOP
════════════════════════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--c-text);
  color: var(--c-bg);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 80;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(26,26,36,0.25);
}

#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover   { background: var(--c-accent); }

html.dark #back-to-top { background: #181624; box-shadow: 0 4px 20px rgba(0,0,0,0.45); }
html.dark #back-to-top:hover { background: var(--c-accent); }

/* ════════════════════════════════════════════════════════════
   SLIDER
════════════════════════════════════════════════════════════ */
#projects-slider::-webkit-scrollbar { display: none; }

/* ════════════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════════════ */
#project-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none; padding: 0;
  border-radius: 16px;
  max-width: min(720px, calc(100vw - 32px));
  max-height: min(90svh, 860px);
  width: 100%;
  background: var(--c-bg);
  box-shadow: 0 24px 80px rgba(26,26,36,0.25);
  outline: none;
  overflow: hidden;
}

#project-modal[open] {
  display: flex;
  flex-direction: column;
  animation: modalIn 0.28s cubic-bezier(.23,1,.32,1);
}

#project-modal::backdrop {
  background: rgba(26,26,36,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdropIn {
  from { opacity: 0; } to { opacity: 1; }
}

#modal-body { overflow-y: auto; overscroll-behavior: contain; }

/* Dégradé bas des vignettes image */
.thumb-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(to top, rgba(26,26,36,0.5), transparent);
  pointer-events: none;
}

/* Vignettes modales */
.modal-thumb {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-sable);
}

.modal-thumb-portfolio {
  height: 220px;
  background: linear-gradient(135deg, #1A1A24 0%, #4A4845 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.modal-thumb-portfolio-bg    { font-family: 'Fraunces', serif; font-size: 80px; font-weight: 700; color: #F6F5F3; opacity: 0.08; position: absolute; user-select: none; }
.modal-thumb-portfolio-label { font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; font-style: italic; color: var(--c-accent); }

.modal-body p        { margin-bottom: 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body ul       { margin: 0 0 12px; padding-left: 18px; list-style: disc; }
.modal-body li       { margin-bottom: 7px; }
.modal-body li:last-child { margin-bottom: 0; }

html.dark #project-modal { background: #181624; box-shadow: 0 24px 80px rgba(0,0,0,0.55); }
html.dark #project-modal::backdrop { background: rgba(0,0,0,0.72); }

/* ════════════════════════════════════════════════════════════
   BOUTON THÈME
════════════════════════════════════════════════════════════ */
#theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border);
  background: transparent;
  color: var(--c-text-mid);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

#theme-toggle:hover { border-color: var(--c-accent); color: var(--c-accent); }

#theme-toggle .icon-sun  { display: none; }
#theme-toggle .icon-moon { display: block; }

html.dark #theme-toggle .icon-sun  { display: block; }
html.dark #theme-toggle .icon-moon { display: none; }

/* ════════════════════════════════════════════════════════════
   DARK MODE — overrides résiduels (Tailwind + cas spéciaux)
════════════════════════════════════════════════════════════ */

/* Transition douce au changement de thème */
html.dark,
html.dark *,
html.dark *::before,
html.dark *::after {
  transition-property: background-color, color, border-color, box-shadow;
  transition-duration: 0.22s;
  transition-timing-function: ease;
}

/* Préserve les transitions reveal */
html.dark .reveal {
  transition: opacity 0.7s cubic-bezier(.23,1,.32,1), transform 0.7s cubic-bezier(.23,1,.32,1);
}

/* Tailwind custom colors */
html.dark .bg-ivoire      { background-color: var(--c-bg) !important; }
html.dark .bg-sable       { background-color: var(--c-sable) !important; }
html.dark .bg-terra-light { background-color: var(--c-accent-lt) !important; }
html.dark .text-encre     { color: var(--c-text) !important; }
html.dark .text-gris      { color: var(--c-text-mid) !important; }
html.dark .text-terra     { color: var(--c-accent) !important; }
html.dark .border-sable-mid { border-color: var(--c-border) !important; }
html.dark .border-sable   { border-color: var(--c-border-s) !important; }

/* Tailwind couleurs nommées */
html.dark .bg-surface         { background-color: var(--c-surface) !important; }
html.dark .border-encre-light { border-color: var(--c-sable) !important; }
html.dark .text-soft          { color: var(--c-text-soft) !important; }
html.dark .text-muted         { color: var(--c-text-muted) !important; }

/* Photographie (fond sombre permanent — variables ignorées) */
html.dark #photography               { background: #0C0B14; }
html.dark .photo-deco                { color: #131220; }
html.dark .photo-item                { background: #121020; border-color: var(--c-border); }
html.dark .photo-item:hover          { border-color: var(--c-accent); }
html.dark #photography .hero-tag     { color: var(--c-accent); }
html.dark #photography .section-bar  { background: var(--c-accent); }
html.dark #exp-photo-divider         { background: #0C0B14 !important; }
html.dark #exp-photo-divider polygon { fill: var(--c-sable) !important; }
html.dark .photo-info-box            { background: #0C0B14; border-color: var(--c-border); }
html.dark #photo-featured            { background: #0C0B14; border-color: var(--c-border); }

/* Footer (fond bg-encre) */
html.dark footer {
  background-color: #0C0B14
}

html.dark .footer-text {
  color: var(--c-text-soft);
}

html.dark .footer-label {
  color: var(--c-text-mid);
}

/* Slider arrows */
html.dark #slider-prev, html.dark #slider-next {
  border-color: var(--c-border);
  color: var(--c-text-mid);
}
html.dark #slider-prev:hover, html.dark #slider-next:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #burger { display: flex; }
  #desktop-nav { display: none; }
  html { cursor: auto; }
  #cursor, #cursor-ring { display: none; }

  .exp-card-inner { grid-template-columns: 1fr; }
  .exp-meta {
    border-right: none;
    border-bottom: 1px solid var(--c-border-s);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px;
    gap: 16px;
  }
  .exp-content { padding: 20px; }

  .about-photo-wrap { display: none; }

  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item { aspect-ratio: 4/3; }

  #back-to-top { cursor: auto; bottom: 20px; right: 16px; }
  .photo-strip { cursor: auto; }
  .photo-item  { height: 260px; }

  #theme-toggle { cursor: auto; }
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-col { order: 2; }
  .contact-info-col { order: 1; }
}

/* ════════════════════════════════════════════════════════════
   ACCESSIBILITÉ — prefers-reduced-motion (WCAG 2.3.3)
════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal          { opacity: 1; transform: translateY(0); transition: none; }
  .reveal.visible  { opacity: 1; transform: translateY(0); }
  .scroll-line     { animation: none; opacity: 0.5; }
  .cursor-blink    { animation: none; opacity: 1; }
  .animate-pulse   { animation: none !important; }
  #cursor, #cursor-ring { display: none; }
}

/* ════════════════════════════════════════════════════════════
   ADMIN BAR
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #admin-bar {
    bottom: 80px !important;
    left: 12px !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  #admin-bar a, #admin-bar button {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
}
