/*
Theme Name:   Caroline Rossignol — Portfolio
Theme URI:
Author:       Caroline Rossignol
Description:  Portfolio développeuse WordPress — Thème enfant Twenty Twenty-Four. Conforme WCAG 2.1 AA, directive EU accessibilité 28/06/2025, PWA, responsive tous écrans.
Template:     twentytwentyfour
Version:      2.0.0
Text Domain:  cr-portfolio
*/

/* ═══════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════ */
:root {
  /* Couleurs — contraste WCAG AA vérifié */
  --ink:        #0e0e0e;
  --ink-soft:   #1a1a1a;
  --surface:    #252525;
  --line:       #383838;
  --cream:      #f4efe6;
  --cream-dim:  #d8d2c8;
  --gold:       #c9a96e;   /* contraste 4.6:1 sur fond sombre ✓ */
  --gold-lt:    #dfc08e;
  --white:      #ffffff;
  --muted:      #999;
  --muted-lt:   #bbb;
  --focus:      #4a9eff;   /* couleur de focus visible WCAG 2.1 §2.4.11 */
  --error:      #ff6b6b;
  --success:    #6bcf8a;

  /* Typographie — tailles minimales accessibles */
  --serif: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
  --sans:  'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:  'DM Mono', 'Fira Mono', 'Courier New', monospace;

  /* Espacements */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  7rem;

  /* Misc */
  --r:      4px;
  --r-lg:   12px;
  --ease:   cubic-bezier(.25,.46,.45,.94);
  --dur:    0.3s;
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITÉ — FONDATIONS
═══════════════════════════════════════════════════════ */

/* Skip link — WCAG 2.4.1 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--focus);
  color: var(--ink);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--r) var(--r);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus visible global — WCAG 2.4.7 & 2.4.11 */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r);
}
/* Ne pas supprimer le focus souris sur les éléments interactifs */
:focus:not(:focus-visible) { outline: none; }

/* Taille minimale cibles tactiles — WCAG 2.5.8 (44×44px) */
button, a, input, textarea, select, [role="button"] {
  min-height: 44px;
}
nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Animations — respecter préférences utilisateur WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .skill-bar-fill { transition: none !important; }
}

/* Contraste élevé — WCAG 1.4.3 */
@media (forced-colors: active) {
  .btn--gold { background: ButtonFace; border: 2px solid ButtonText; }
  .skill-bar-fill { background: Highlight; }
}

/* Mode sombre système */
@media (prefers-color-scheme: light) {
  /* Le thème est sombre, on garde le sombre par défaut */
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px; /* base 16px minimum — WCAG 1.4.4 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7; /* ≥1.5 recommandé WCAG 1.4.8 */
  overflow-x: hidden;
}

/* Interligne suffisant pour la lisibilité */
p { margin-bottom: 1rem; color: var(--muted-lt); line-height: 1.75; }
p:last-child { margin-bottom: 0; }

img {
  max-width: 100%;
  display: block;
  height: auto;
}

ul, ol { list-style: none; }

a {
  color: var(--gold);
  text-decoration: underline; /* WCAG 1.4.1 — liens identifiables sans couleur seule */
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--gold-lt); }

/* Ne pas enlever la déco dans la nav (gérée séparément) */
nav a { text-decoration: none; }

/* ═══════════════════════════════════════════════════════
   TYPOGRAPHIE
═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
}
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; font-weight: 600; font-family: var(--sans); }

.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}
.divider {
  width: 48px; height: 1px;
  background: var(--gold);
  margin: 1.25rem 0 2rem;
  border: none;
}
.text-large {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--cream-dim);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════ */
.wrap { width: min(92%, 1160px); margin-inline: auto; }
.section { padding: var(--sp-xl) 0; }
.section--alt { background: var(--ink-soft); }
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); align-items: start; }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }

/* ═══════════════════════════════════════════════════════
   BOUTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px; /* cible tactile ≥44px */
  padding: 0.75rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur), box-shadow var(--dur);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: var(--gold);
  color: var(--ink); /* contraste ≥7:1 */
  border-color: var(--gold);
}
.btn--gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--ink); box-shadow: 0 6px 20px rgba(201,169,110,.3); }

.btn--outline {
  background: transparent;
  color: var(--cream-dim);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   HEADER / NAVIGATION
═══════════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background var(--dur), padding var(--dur);
}
#site-header.is-scrolled {
  background: rgba(14,14,14,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
#site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-logo em { color: var(--gold); font-style: italic; }

/* Navigation principale */
#primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
#primary-nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color var(--dur), background var(--dur);
  text-decoration: none;
}
#primary-nav a:hover,
#primary-nav a[aria-current="page"] {
  color: var(--gold);
  background: rgba(201,169,110,.08);
}

/* Burger */
#nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  padding: 0.5rem;
  transition: border-color var(--dur);
}
#nav-burger:hover { border-color: var(--gold); }
#nav-burger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--cream);
  transition: all var(--dur);
  border-radius: 1px;
}
#nav-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 4px); }
#nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav-burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -4px); }

/* ═══════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */
#hero {
  min-height: 100svh; /* small viewport height pour mobiles */
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,169,110,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,169,110,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, var(--ink) 100%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 700px; }

.hero-eyebrow {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: ''; width: 36px; height: 1px; background: var(--gold); flex-shrink: 0;
}
.hero-eyebrow span {
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic; color: var(--gold);
  font-weight: 300; display: block; margin-bottom: 0.2rem;
}
.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--muted-lt); max-width: 560px;
  margin: 1.5rem 0 2.25rem; line-height: 1.8;
}
.hero-tagline em { color: var(--gold); font-style: italic; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
  animation: cr-bounce 2.5s ease infinite;
  text-decoration: none;
}
.hero-scroll::after {
  content: ''; width: 1px; height: 36px;
  background: linear-gradient(var(--gold), transparent);
}
@keyframes cr-bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

/* ═══════════════════════════════════════════════════════
   SECTION À PROPOS
═══════════════════════════════════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-lg); align-items: start;
}

.about-photo-wrap { position: relative; }
.about-photo {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r-lg);
  filter: grayscale(25%);
  transition: filter 0.4s;
}
.about-photo:hover { filter: none; }
.about-photo-frame {
  position: absolute; inset: -12px -12px 12px 12px;
  border: 1px solid rgba(201,169,110,.35);
  border-radius: var(--r-lg); pointer-events: none;
}
.about-chip {
  position: absolute; bottom: -1.25rem; right: -1.25rem;
  background: var(--gold); color: var(--ink);
  padding: 1rem 1.25rem; border-radius: var(--r-lg);
  font-family: var(--mono); font-size: 0.68rem;
  line-height: 1.5; text-transform: uppercase; letter-spacing: 0.07em;
}
.about-chip strong {
  display: block; font-size: 1.4rem;
  font-family: var(--serif); letter-spacing: 0; text-transform: none;
}
.about-placeholder {
  width: 100%; aspect-ratio: 4/5;
  background: linear-gradient(145deg, var(--surface), var(--ink-soft));
  border-radius: var(--r-lg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

.about-list {
  display: flex; flex-direction: column; gap: 0.6rem; margin: 1.5rem 0;
}
.about-list li {
  display: flex; align-items: baseline; gap: 0.75rem;
  font-size: 0.95rem; color: var(--muted-lt);
}
.about-list li::before {
  content: '→'; color: var(--gold); flex-shrink: 0; font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════════
   COMPÉTENCES
═══════════════════════════════════════════════════════ */
.skills-header {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg); align-items: end; margin-bottom: var(--sp-lg);
}
.skills-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.skill-item {
  background: var(--ink-soft); padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: background var(--dur);
}
.skill-item:hover,
.skill-item:focus-within { background: var(--surface); }
.skill-icon { font-size: 1.6rem; line-height: 1; }
.skill-name { font-size: 0.95rem; font-weight: 600; color: var(--white); }
.skill-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; flex: 1; }
.skill-bar {
  height: 2px; background: var(--line); border-radius: 1px;
  margin-top: auto; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; background: var(--gold);
  width: 0; transition: width 1.2s var(--ease);
  border-radius: 1px;
}
.skill-item.animated .skill-bar-fill { width: var(--pct, 80%); }

.pills-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  align-items: center; margin-top: var(--sp-md);
}
.pill-label {
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
  margin-right: 0.25rem;
}
.pill {
  padding: 0.3rem 0.85rem; min-height: 32px;
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted-lt);
  transition: border-color var(--dur), color var(--dur);
  display: inline-flex; align-items: center;
}
.pill:hover { border-color: var(--gold); color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   PROJETS
═══════════════════════════════════════════════════════ */
.projects-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: var(--sp-lg); flex-wrap: wrap; gap: 1rem;
}
.projects-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.project-card {
  background: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--dur), transform var(--dur) var(--ease);
}
.project-card:hover,
.project-card:focus-within {
  border-color: rgba(201,169,110,.45); transform: translateY(-5px);
}
.project-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface);
}
.project-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .project-thumb img { transform: scale(1.04); }
.project-thumb-placeholder {
  width: 100%; height: 100%; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--surface), var(--ink-soft));
}
.project-overlay {
  position: absolute; inset: 0; background: rgba(14,14,14,.8);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  opacity: 0; transition: opacity var(--dur);
}
.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay { opacity: 1; }
.project-link-btn {
  min-height: 44px; padding: 0.55rem 1.1rem;
  background: var(--gold); color: var(--ink);
  border-radius: var(--r); font-family: var(--mono);
  font-size: 0.73rem; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: background var(--dur);
}
.project-link-btn:hover { background: var(--gold-lt); color: var(--ink); }

.project-body {
  padding: 1.75rem; flex: 1; display: flex; flex-direction: column;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.project-tag {
  padding: 0.18rem 0.65rem;
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: 100px; font-family: var(--mono);
  font-size: 0.68rem; color: var(--gold);
}
.project-context {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--muted); letter-spacing: 0.06em;
  margin-bottom: 0.4rem; text-transform: uppercase;
}
.project-title {
  font-family: var(--serif); font-size: 1.35rem;
  color: var(--white); font-weight: 400; line-height: 1.25;
  margin-bottom: 0.7rem;
}
.project-title a { color: var(--white); text-decoration: none; }
.project-title a:hover { color: var(--gold); text-decoration: underline; }
.project-desc { font-size: 0.9rem; color: var(--muted-lt); line-height: 1.65; flex: 1; }
.project-footer {
  display: flex; gap: 1.25rem; align-items: center;
  padding-top: 1.25rem; margin-top: 1.25rem; border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.project-footer-link {
  font-family: var(--mono); font-size: 0.73rem;
  color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; transition: color var(--dur); text-decoration: none;
}
.project-footer-link:hover { color: var(--gold); text-decoration: underline; }
.project-year {
  margin-left: auto; font-family: var(--mono);
  font-size: 0.7rem; color: var(--line);
}

/* ═══════════════════════════════════════════════════════
   PARCOURS TIMELINE
═══════════════════════════════════════════════════════ */
.parcours-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl); align-items: start;
}
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: 6px; bottom: 0; width: 1px;
  background: linear-gradient(var(--gold), var(--line) 85%, transparent);
}
.tl-item {
  position: relative; padding-left: 2rem; padding-bottom: 2.25rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -4px; top: 6px;
  width: 9px; height: 9px; background: var(--gold);
  border-radius: 50%; border: 2px solid var(--ink);
  box-shadow: 0 0 0 3px rgba(201,169,110,.2);
}
.tl-period { font-family: var(--mono); font-size: 0.7rem; color: var(--gold); margin-bottom: 0.2rem; }
.tl-role   { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 0.1rem; }
.tl-co     { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.tl-text   { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

.formation-list { display: flex; flex-direction: column; }
.formation-item {
  display: grid; grid-template-columns: 65px 1fr;
  gap: 1.25rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.formation-item:first-child { border-top: 1px solid var(--line); }
.formation-year { font-family: var(--mono); font-size: 0.8rem; color: var(--gold); font-weight: 600; }
.formation-title { font-size: 0.97rem; font-weight: 600; color: var(--white); margin-bottom: 0.15rem; }
.formation-sub   { font-size: 0.82rem; color: var(--muted); }

.interests-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.interest-chip {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.9rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.83rem; color: var(--muted-lt);
  transition: border-color var(--dur), color var(--dur);
}
.interest-chip:hover { border-color: var(--gold); color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════ */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-lg); align-items: start;
}
.contact-bio {
  color: var(--muted-lt); font-size: 1.05rem; line-height: 1.75; margin-bottom: 2rem;
}
.contact-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; min-height: 64px;
  background: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--r); transition: border-color var(--dur);
}
.contact-card:hover { border-color: var(--gold); }
.cc-icon {
  width: 40px; height: 40px; background: rgba(201,169,110,.12);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; aria-hidden: true;
}
.cc-label { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 0.1rem; }
.cc-value { font-size: 0.9rem; color: var(--white); }
.cc-value a { color: var(--white); }
.cc-value a:hover { color: var(--gold); }

/* Formulaire */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--muted-lt); text-transform: uppercase; letter-spacing: 0.1em;
}
.field input:not([type="checkbox"]),
.field textarea,
.field select {
  background: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0.85rem 1rem;
  font-family: var(--sans); font-size: 1rem; /* ≥16px pour éviter zoom iOS */
  color: var(--white); min-height: 48px;
  transition: border-color var(--dur), box-shadow var(--dur);
  resize: vertical;
}
/* .field input:not([type="checkbox"]) {
  background: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--r); padding: 0.85rem 1rem;
  font-family: var(--sans); font-size: 1rem;
  color: var(--white); min-height: 48px;
  transition: border-color var(--dur), box-shadow var(--dur);
  resize: vertical;
} */
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(74,158,255,.2);
}
.field textarea { min-height: 150px; }
.field .field-hint {
  font-size: 0.78rem; color: var(--muted); font-family: var(--mono);
}
.field .field-error {
  font-size: 0.78rem; color: var(--error); font-family: var(--mono);
  display: none;
}
.field.has-error input,
.field.has-error textarea { border-color: var(--error); }
.field.has-error .field-error { display: block; }
/* Indication champ obligatoire */
.field label .required { color: var(--error); margin-left: 2px; }

.rgpd-consent {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem; background: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--r);
}
.rgpd-consent input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 20px;
  flex-shrink: 0; margin-top: 2px; accent-color: var(--gold);
  cursor: pointer;
}
.rgpd-consent label {
  font-size: 0.85rem; color: var(--muted-lt); line-height: 1.6; cursor: pointer;
}
.rgpd-consent a { color: var(--gold); }

.form-feedback {
  padding: 1rem 1.25rem; border-radius: var(--r);
  font-size: 0.9rem; display: none;
  role: "alert"; aria-live: "polite";
}
.form-feedback.ok  { display: block; background: rgba(107,207,138,.1); border: 1px solid rgba(107,207,138,.3); color: #6bcf8a; }
.form-feedback.err { display: block; background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); color: var(--error); }

/* ═══════════════════════════════════════════════════════
   PAGE RGPD
═══════════════════════════════════════════════════════ */
.rgpd-page { padding-top: 110px; padding-bottom: var(--sp-xl); }
.rgpd-page h1 { margin-bottom: 0.5rem; }
.rgpd-page .last-update { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 3rem; }
.rgpd-section { margin-bottom: 2.5rem; }
.rgpd-section h2 { font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.rgpd-section h3 { font-size: 1.1rem; color: var(--gold); margin: 1.25rem 0 0.5rem; font-family: var(--sans); font-weight: 600; }
.rgpd-section p, .rgpd-section li { color: var(--muted-lt); line-height: 1.8; margin-bottom: 0.75rem; }
.rgpd-section ul { list-style: disc; padding-left: 1.5rem; }
.rgpd-section table {
  width: 100%; border-collapse: collapse;
  margin: 1.25rem 0; font-size: 0.9rem;
}
.rgpd-section table th {
  background: var(--surface); color: var(--white);
  padding: 0.75rem 1rem; text-align: left;
  border: 1px solid var(--line); font-weight: 600;
}
.rgpd-section table td {
  padding: 0.75rem 1rem; border: 1px solid var(--line);
  color: var(--muted-lt); vertical-align: top;
}
.rgpd-section table tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* ═══════════════════════════════════════════════════════
   PAGE PROJETS — ARCHIVE (SUPPRIMÉE) + page-projets.php
═══════════════════════════════════════════════════════ */
.projets-hero { padding: 110px 0 var(--sp-lg); text-align: center; }
.projets-hero h1 { margin-bottom: 1rem; }
.projets-hero p { max-width: 560px; margin-inline: auto; color: var(--muted-lt); }

.filters-bar {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center; margin-bottom: 3rem;
}
.filter-btn {
  min-height: 44px; padding: 0.45rem 1.1rem;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); border-radius: 100px;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: all var(--dur);
}
.filter-btn:hover,
.filter-btn[aria-pressed="true"] {
  background: var(--gold); border-color: var(--gold); color: var(--ink);
}

/* ═══════════════════════════════════════════════════════
   SINGLE PROJET
═══════════════════════════════════════════════════════ */
.projet-single { padding-top: 110px; padding-bottom: var(--sp-xl); }
.projet-back {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; margin-bottom: 2.5rem;
  transition: color var(--dur); text-decoration: none;
}
.projet-back:hover { color: var(--gold); }
.projet-hero-img {
  width: 100%; aspect-ratio: 16/6; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line); margin-bottom: var(--sp-md);
}
.projet-hero-placeholder {
  width: 100%; aspect-ratio: 16/6; display: flex;
  align-items: center; justify-content: center; font-size: 4rem;
  background: linear-gradient(135deg, var(--surface), var(--ink-soft));
  border-radius: var(--r-lg); border: 1px solid var(--line); margin-bottom: var(--sp-md);
}
.projet-meta-bar {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center;
  padding: 1.25rem 1.5rem; background: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 2.5rem;
}
.meta-label { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; display: block; }
.meta-val   { font-size: 0.9rem; color: var(--white); }
.projet-content { color: var(--muted-lt); line-height: 1.8; font-size: 1.05rem; }
.projet-content h2 { color: var(--white); font-family: var(--serif); font-weight: 400; font-size: 1.75rem; margin: 2rem 0 0.75rem; }
.projet-content p  { margin-bottom: 1rem; }
.projet-content ul { list-style: disc; padding-left: 1.5rem; }
.projet-content ul li { margin-bottom: 0.4rem; }
.projet-nav {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: var(--sp-md); margin-top: var(--sp-md); border-top: 1px solid var(--line);
}
.projet-nav-link { display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; }
.projet-nav-link .nav-dir   { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.projet-nav-link .nav-title { font-size: 0.95rem; color: var(--white); }
.projet-nav-link.next { text-align: right; }
.projet-nav-link:hover .nav-title { color: var(--gold); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
#site-footer {
  border-top: 1px solid var(--line); padding: 2.5rem 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.25rem;
}
.footer-copy {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.footer-links a {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  padding: 0.5rem 0.75rem; min-height: 44px;
  display: inline-flex; align-items: center;
  border-radius: var(--r); transition: color var(--dur), background var(--dur);
  text-decoration: none;
}
.footer-links a:hover { color: var(--gold); background: rgba(201,169,110,.08); }

/* ═══════════════════════════════════════════════════════
   PWA INSTALL POPUP
═══════════════════════════════════════════════════════ */
#pwa-banner {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 2000;
  width: min(92%, 480px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  transition: transform 0.4s var(--ease);
  opacity: 0; pointer-events: none;
}
#pwa-banner.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1; pointer-events: auto;
}
.pwa-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--gold); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.pwa-text { flex: 1; }
.pwa-text strong { display: block; color: var(--white); font-size: 0.95rem; margin-bottom: 0.2rem; }
.pwa-text span { font-size: 0.8rem; color: var(--muted); }
.pwa-actions { display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; }
.pwa-install {
  min-height: 36px; padding: 0.4rem 1rem;
  background: var(--gold); color: var(--ink);
  border: none; border-radius: var(--r);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur);
}
.pwa-install:hover { background: var(--gold-lt); }
.pwa-dismiss {
  min-height: 36px; padding: 0.4rem 1rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: 0.72rem;
  cursor: pointer; transition: color var(--dur), border-color var(--dur);
}
.pwa-dismiss:hover { color: var(--cream); border-color: var(--muted); }

/* iOS banner spécifique */
#pwa-ios-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 1.25rem 1.5rem; text-align: center;
  transform: translateY(100%); transition: transform 0.4s var(--ease);
  opacity: 0; pointer-events: none;
}
#pwa-ios-banner.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.pwa-ios-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.25rem; cursor: pointer; min-height: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
}
.pwa-ios-text { font-size: 0.88rem; color: var(--muted-lt); line-height: 1.6; }
.pwa-ios-text strong { color: var(--white); display: block; margin-bottom: 0.25rem; }
.pwa-ios-arrow { font-size: 1.5rem; margin: 0.5rem 0 0; display: block; animation: cr-bounce 1.5s infinite; }

/* ═══════════════════════════════════════════════════════
   CARROUSEL PROJETS
═══════════════════════════════════════════════════════ */
.carousel-outer {
  position: relative;
  padding: 0 0 3.5rem;
  overflow: hidden;
}

/* Viewport avec fondu aux bords */
.carousel-viewport {
  overflow: hidden;
  padding: 1.5rem max(1.5rem, calc((100vw - 1180px) / 2));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

.carousel-track {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0; padding: 0;
  will-change: transform;
  cursor: grab;
}
.carousel-track:active { cursor: grabbing; }

/* Slide — largeur responsive */
.carousel-slide {
  flex: 0 0 calc((min(1180px, 100vw - 3rem) - 2 * 1.75rem) / 3);
  min-width: 0;
}
@media (max-width: 1099px) {
  .carousel-slide { flex: 0 0 calc((min(1180px, 100vw - 3rem) - 1.75rem) / 2); }
}
@media (max-width: 679px) {
  .carousel-slide { flex: 0 0 calc(100vw - 3rem); }
}

/* Carte dans le carrousel — hauteur uniforme */
.project-card--carousel { height: 100%; display: flex; flex-direction: column; }
.project-card--carousel .project-thumb { aspect-ratio: 16/9; flex-shrink: 0; }
.project-card--carousel .project-body  { flex: 1; display: flex; flex-direction: column; }
.project-card--carousel .project-desc  { flex: 1; }

/* Boutons prev / next */
.carousel-controls {
  position: absolute;
  top: 42%; transform: translateY(-50%);
  left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
  display: flex; justify-content: space-between;
  padding: 0 0.75rem;
}
.carousel-btn {
  pointer-events: all;
  width: 48px; height: 48px; min-height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(14,14,14,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--cream-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur), color var(--dur), transform 0.2s var(--ease), opacity 0.25s;
}
.carousel-btn:hover:not(:disabled) {
  background: var(--gold); border-color: var(--gold); color: var(--ink); transform: scale(1.1);
}
.carousel-btn:disabled { opacity: 0.22; cursor: default; pointer-events: none; }

/* Dots */
.carousel-dots { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.5rem; }
.carousel-dot {
  width: 8px; height: 8px; min-height: 8px;
  border-radius: 50%; border: 1px solid var(--gold);
  background: transparent; cursor: pointer; padding: 0;
  transition: background var(--dur), width 0.3s var(--ease);
}
.carousel-dot.is-active { background: var(--gold); width: 24px; border-radius: 4px; }

/* Barre de progression */
.carousel-progress {
  height: 2px; background: var(--line); border-radius: 2px;
  margin: 1.25rem max(1.5rem, calc((100vw - 1180px) / 2)) 0;
  overflow: hidden;
}
.carousel-progress-bar {
  height: 100%; background: var(--gold); border-radius: 2px;
  width: 0%; transition: width 0.55s var(--ease);
}

/* ═══════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════ */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤960px)
═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  :root { --sp-xl: 5rem; --sp-lg: 3rem; }

  .col-2, .about-grid, .parcours-grid,
  .contact-wrap, .skills-header,
  .projects-grid { grid-template-columns: 1fr; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .col-3 { grid-template-columns: repeat(2, 1fr); }

  .about-chip { position: static; display: inline-block; margin-top: 1.25rem; }
  .about-photo-frame { display: none; }

  .projects-header { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }

  #nav-burger { display: flex; }
  #primary-nav ul {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(14,14,14,.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem; border-bottom: 1px solid var(--line);
    gap: 0.25rem;
  }
  #primary-nav ul.is-open { display: flex; }
  #primary-nav a { width: 100%; font-size: 0.9rem; padding: 0.75rem 1rem; }
  #site-header .wrap { position: relative; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤640px)
═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --sp-xl: 4rem; }

  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }

  .skills-grid { grid-template-columns: 1fr 1fr; }
  .col-3 { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .projet-meta-bar { flex-direction: column; gap: 0.75rem; }

  #pwa-banner {
    bottom: 0; left: 0; right: 0; width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateX(0) translateY(100%);
  }
  #pwa-banner.is-visible { transform: translateX(0) translateY(0); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — LARGE (≥1400px)
═══════════════════════════════════════════════════════ */
@media (min-width: 1400px) {
  :root { --sp-xl: 9rem; }
  .wrap { max-width: 1260px; }
}

/* ═══════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════ */
@media print {
  #site-header, #pwa-banner, #pwa-ios-banner,
  .hero-scroll, nav { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  a { color: black; text-decoration: underline; }
  .section--alt { background: #f5f5f5; }
}

/* ═══════════════════════════════════════════════════════
   SINGLE PROJET — VERSION 4 (refonte sobre)
   Conforme WCAG 2.1 AA / Directive EU 28 juin 2025
═══════════════════════════════════════════════════════ */

/* ── Fil d'ariane ──────────────────────────────────────── */
.breadcrumb {
  padding-top: 100px;
  padding-bottom: 1.5rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.breadcrumb ol li a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.breadcrumb ol li a:hover { color: var(--gold); text-decoration: underline; }
.breadcrumb ol li[aria-current="page"] { color: var(--gold); }
.breadcrumb-sep { color: var(--line); }

/* ── Image héro ────────────────────────────────────────── */
.projet-hero-zone {
  position: relative;
  width: 100%;
  aspect-ratio: 21/7;
  overflow: hidden;
  background: var(--ink-soft);
}
.projet-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.projet-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(14,14,14,.85) 100%
  );
  pointer-events: none;
}
.projet-hero-empty {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, var(--surface), var(--ink-soft));
}

/* ── Retour ────────────────────────────────────────────── */
.projet-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  margin: 1.75rem 0 2.25rem;
  letter-spacing: 0.06em;
  transition: color var(--dur);
}
.projet-back:hover { color: var(--gold); }

/* ── Layout 2 colonnes ─────────────────────────────────── */
.projet-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

/* ── Colonne principale ────────────────────────────────── */
.projet-main { min-width: 0; }

.projet-header { margin-bottom: 2rem; }

.projet-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-bottom: 1rem;
}
.projet-tech-tag {
  padding: 0.2rem 0.75rem;
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.projet-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.projet-intro {
  font-size: 1.05rem;
  color: var(--muted-lt);
  line-height: 1.8;
  max-width: 65ch;
  margin: 0;
}

/* Séparateur doré */
.projet-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 2rem 0;
  border: none;
}

/* ── Métas en liste définition ─────────────────────────── */
.projet-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 2.5rem;
}
.projet-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 140px;
}
.projet-meta-item dt {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.projet-meta-item dd {
  font-size: 0.95rem;
  color: var(--white);
  margin: 0;
}

/* ── Contenu éditeur ───────────────────────────────────── */
.projet-body-content {
  color: var(--muted-lt);
  line-height: 1.85;
  font-size: 1rem;
}
.projet-body-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--white);
  margin: 2.5rem 0 0.75rem;
}
.projet-body-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  margin: 1.75rem 0 0.5rem;
}
.projet-body-content p { margin-bottom: 1.1rem; }
.projet-body-content ul,
.projet-body-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}
.projet-body-content ul { list-style: disc; }
.projet-body-content ol { list-style: decimal; }
.projet-body-content li { margin-bottom: 0.4rem; }
.projet-body-content a {
  color: var(--gold);
  text-underline-offset: 3px;
}
.projet-body-content a:hover { color: var(--gold-lt); }
/* Images dans le contenu */
.projet-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--line);
  margin: 1.5rem 0;
}

/* ── Aperçu iframe ──────────────────────────────────────── */
.projet-preview {
  margin-top: 3rem;
}
.projet-preview-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1rem;
}
.preview-browser {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink-soft);
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.preview-dot {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.preview-dot--r { background: #ff5f57; }
.preview-dot--y { background: #ffbd2e; }
.preview-dot--g { background: #28c840; }
.preview-url {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-left: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-iframe {
  width: 100%;
  height: 560px;
  border: none;
  display: block;
}
.preview-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.75rem;
  font-family: var(--mono);
}
.preview-note a {
  color: var(--gold);
  text-underline-offset: 2px;
}

/* ── Barre latérale ─────────────────────────────────────── */
.projet-aside {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.aside-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.aside-card--light {
  background: transparent;
  border-color: rgba(201,169,110,.15);
}
.aside-card--light p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.aside-card-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 400;
  margin: 0;
  /* override heritage h2 */
  font-size: 0.65rem !important;
  line-height: 1 !important;
}
/* Bouton pleine largeur dans aside */
.btn--full {
  width: 100%;
  justify-content: center;
}

/* ── Technologies dans aside ────────────────────────────── */
.aside-tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.aside-tech-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted-lt);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.aside-tech-item:last-child { border-bottom: none; }
.aside-tech-item::before {
  content: '→';
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ── Navigation projets ─────────────────────────────────── */
.projet-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.projet-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color var(--dur), background var(--dur);
  min-height: 80px;
}
.projet-nav-link:hover {
  border-color: rgba(201,169,110,.45);
  background: var(--surface);
}
.projet-nav-link--next {
  text-align: right;
}
.projet-nav-link .nav-dir {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.projet-nav-link .nav-name {
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.3;
}
.projet-nav-link:hover .nav-name { color: var(--gold); }

/* ═══════════════════════════════════════════════════════
   COMPATIBILITÉ MULTI-NAVIGATEURS
   (IE est exclu — support Edge, Firefox, Chrome, Safari)
═══════════════════════════════════════════════════════ */

/* Aspect-ratio fallback pour Safari < 15 */
@supports not (aspect-ratio: 21/7) {
  .projet-hero-zone { height: 320px; }
  .projet-hero-empty { height: 240px; }
}
@supports not (aspect-ratio: 16/9) {
  .project-thumb img { height: 200px; }
}

/* backdrop-filter fallback (Firefox < 103) */
@supports not (backdrop-filter: blur(1px)) {
  #site-header.is-scrolled { background: rgba(14,14,14,.98); }
  #primary-nav ul.is-open  { background: rgba(14,14,14,.99); }
}

/* gap sur flexbox — fallback Safari < 14.1 */
@supports not (gap: 1rem) {
  .projet-tech-list > * + * { margin-left: 0.5rem; margin-bottom: 0.5rem; }
  .aside-card         > * + * { margin-top: 0.85rem; }
  .projet-meta-list   > * + * { margin-left: 1.5rem; }
}

/* min() / min-width sur .wrap — Firefox < 75 */
@supports not (width: min(92%, 1160px)) {
  .wrap { width: 92%; max-width: 1160px; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE SINGLE PROJET
═══════════════════════════════════════════════════════ */

/* Tablette (≤ 960px) */
@media (max-width: 960px) {
  .projet-layout {
    grid-template-columns: 1fr;
  }
  .projet-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-card {
    flex: 1 1 200px;
  }
  .preview-iframe { height: 400px; }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
  .projet-hero-zone { aspect-ratio: 16/9; }

  .breadcrumb { padding-top: 80px; padding-bottom: 1rem; }

  .projet-meta-list {
    flex-direction: column;
    gap: 1rem;
  }
  .projet-meta-item { min-width: unset; }

  .projet-nav {
    grid-template-columns: 1fr;
  }
  .projet-nav-link--next { text-align: left; }

  .projet-aside {
    flex-direction: column;
  }
  .preview-iframe { height: 280px; }
}

/* Très petit (≤ 380px — Samsung Galaxy A, anciens iPhones) */
@media (max-width: 380px) {
  .projet-title { font-size: 1.6rem; }
  .projet-tech-tag { font-size: 0.62rem; padding: 0.15rem 0.55rem; }
  .aside-card { padding: 1.1rem; }
}

/* Impression */
@media print {
  .projet-aside,
  .projet-nav,
  .projet-preview,
  .breadcrumb,
  .projet-back,
  #site-header { display: none !important; }
  .projet-layout { grid-template-columns: 1fr; }
  .projet-title { color: black; }
  .projet-body-content { color: #333; }
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITÉ — COMPLÉMENTS WCAG 2.1 AA / EU 2025
═══════════════════════════════════════════════════════ */

/* 1.4.11 — Non-text contrast : bordures visibles même en forced-colors */
@media (forced-colors: active) {
  .aside-card,
  .projet-meta-list,
  .projet-nav-link,
  .preview-browser {
    border: 2px solid ButtonText;
  }
  .projet-tech-tag {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}

/* 2.4.11 — Focus apparence améliorée */
.projet-nav-link:focus-visible,
.projet-back:focus-visible,
.breadcrumb a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: var(--r);
}

/* WCAG 1.4.4 — Redimensionnement jusqu'à 200% */
@media (min-resolution: 192dpi) {
  html { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════
   VERSION 3.0 — AJOUTS ACCESSIBILITÉ & COMPATIBILITÉ
   Directive EU 28/06/2025 — Tous navigateurs / écrans
═══════════════════════════════════════════════════════ */

/* ── Breadcrumb (fil d'Ariane) ─────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  list-style: none;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding: 0;
}
.breadcrumb li:last-child { color: var(--gold); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); text-decoration: underline; }
.breadcrumb-sep { color: var(--line); user-select: none; }

/* ── Projet single layout ──────────────────────────── */
.projet-content-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
  padding-bottom: var(--sp-xl);
  margin-top: 2.5rem;
}

/* ═══════════════════════════════════════════════════════
   CARROUSEL GALERIE SIDEBAR — sg = sidebar gallery
   Responsive · WCAG 2.1 AA · all browsers
═══════════════════════════════════════════════════════ */

/* Wrapper global */
.sg-carousel {
  position: relative;   /* contexte pour sg-nav absolu */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  margin-bottom: 1.5rem;
}

/* Indicateur démo */
.sg-demo-note {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: .4rem;
  align-items: flex-start;
  padding: .65rem .9rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted);
  background: rgba(201,169,110,.06);
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.sg-demo-note strong { color: var(--gold); }
.sg-demo-note svg { flex-shrink: 0; margin-top: 1px; }

/* Image principale */
.sg-main {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  /* aspect-ratio avec fallback padding-top pour Safari < 15 */
  aspect-ratio: 4/3;
}
/* Fallback Safari < 15 */
@supports not (aspect-ratio: 4/3) {
  .sg-main::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3 */
  }
  .sg-main-img {
    position: absolute !important;
    inset: 0;
  }
}

.sg-main-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  display: block;
  -webkit-transition: opacity .2s ease, -webkit-transform .25s ease;
  transition: opacity .2s ease, transform .25s ease;
}

/* Bouton agrandir */
.sg-zoom {
  position: absolute;
  top: .6rem;
  right: .6rem;
  width: 34px;
  height: 34px;
  min-height: 34px;
  background: rgba(14,14,14,.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  color: var(--cream-dim);
  text-decoration: none;
  -webkit-transition: background var(--dur), color var(--dur), opacity var(--dur);
  transition: background var(--dur), color var(--dur), opacity var(--dur);
  opacity: 0;
}
.sg-main:hover .sg-zoom,
.sg-main:focus-within .sg-zoom { opacity: 1; }
.sg-zoom:hover { background: var(--gold); color: var(--ink); }
.sg-zoom:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; opacity: 1; }

/* Légende */
.sg-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .4rem .75rem;
  font-family: var(--mono);
  font-size: .64rem;
  color: rgba(255,255,255,.75);
  background: linear-gradient(transparent, rgba(14,14,14,.75));
  pointer-events: none;
  letter-spacing: .04em;
}

/* Compteur numérique */
.sg-counter {
  position: absolute;
  bottom: .6rem;
  left: .6rem;
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .08em;
  color: rgba(255,255,255,.75);
  background: rgba(14,14,14,.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: .2rem .55rem;
  border-radius: 100px;
  pointer-events: none;
}
/* Si caption présente, remonter le compteur */
.sg-carousel .sg-caption ~ .sg-counter { bottom: 2.2rem; }

/* Boutons prev / next — dans sg-main */
.sg-nav {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  left: 0;
  right: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 0 .5rem;
  pointer-events: none;
  z-index: 2;
}
.sg-btn {
  pointer-events: all;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(14,14,14,.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--cream-dim);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  -webkit-transition: opacity var(--dur), background var(--dur), color var(--dur), -webkit-transform .2s;
  transition: opacity var(--dur), background var(--dur), color var(--dur), transform .2s;
}
/* Afficher au hover/focus du parent */
.sg-main:hover .sg-btn,
.sg-main:focus-within .sg-btn { opacity: 1; }
.sg-btn:hover { background: var(--gold); color: var(--ink); -webkit-transform: scale(1.1); transform: scale(1.1); }
.sg-btn:focus-visible { opacity: 1; outline: 3px solid var(--focus); outline-offset: 2px; }

/* Barre de progression */
.sg-progress {
  height: 3px;
  background: var(--line);
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.sg-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
  width: 0%;
  -webkit-transition: width .4s var(--ease);
  transition: width .4s var(--ease);
}

/* Miniatures */
.sg-thumbs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-top: 1px solid var(--line);
  -ms-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
}
.sg-thumbs::-webkit-scrollbar { display: none; }

.sg-thumb {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 72px;
  flex: 0 0 72px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border: none;
  border-right: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  opacity: .5;
  -webkit-transition: opacity var(--dur);
  transition: opacity var(--dur);
  scroll-snap-align: start;
}
.sg-thumb:last-child { border-right: none; }
.sg-thumb img,
.sg-thumb-fallback {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  display: block;
}
.sg-thumb-fallback {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 1.3rem;
}
.sg-thumb.is-active {
  opacity: 1;
  -webkit-box-shadow: inset 0 -3px 0 0 var(--gold);
  box-shadow: inset 0 -3px 0 0 var(--gold);
}
.sg-thumb:hover { opacity: .88; }
.sg-thumb:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  opacity: 1;
}

/* ── Badges démo hero ────────────────────────────── */
.demo-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  padding: .3rem .7rem;
  background: rgba(201,169,110,.18);
  border: 1px solid rgba(201,169,110,.35);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--gold);
  letter-spacing: .06em;
  pointer-events: none;
  z-index: 5;
}

/* Titre h1 dans fiche projet */
.projet-single h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.projet-main { min-width: 0; }

.projet-sidebar { position: -webkit-sticky; position: sticky; top: 110px; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.sidebar-title {
  font-size: .75rem;
  font-family: var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 400;
}

/* Boutons taille sm & block */
.btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .72rem; }
.btn--block {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin-bottom: .6rem;
}
.btn--block:last-child { margin-bottom: 0; }

/* Liens meta-bar */
.projet-meta-links { display: -webkit-box; display: -ms-flexbox; display: flex; gap: .6rem; -ms-flex-wrap: wrap; flex-wrap: wrap; align-items: center; margin-left: auto; }

/* Texte uniquement pour lecteurs d'écran — WCAG 2.4.3 */
.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;
}

/* ── Compatibilité navigateurs ─────────────────── */
@supports not (gap: 1rem) {
  .breadcrumb li + li  { margin-left: .5rem; }
  .project-tags li + li { margin-left: .4rem; }
}
@supports not (aspect-ratio: 16/9) {
  .project-thumb::before { content: ''; display: block; padding-top: 56.25%; }
  .project-thumb { position: relative; }
  .project-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; }
}
/* Fallback min() / clamp() pour vieux Safari */
@supports not (font-size: clamp(1rem, 2vw, 2rem)) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

/* ── Projet content typography ─────────────────────── */
.projet-content {
  color: var(--muted-lt);
  line-height: 1.8;
  font-size: 1.05rem;
}
.projet-content h2 {
  color: var(--white);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin: 2rem 0 .75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .5rem;
}
.projet-content p  { margin-bottom: 1rem; }
.projet-content ul { list-style: disc; padding-left: 1.5rem; }
.projet-content ul li { margin-bottom: .4rem; }
.projet-content strong { color: var(--cream); }

/* ── Focus visible global ─────────────────────────── */
.skip-link:focus-visible { top: 0; outline: 3px solid var(--focus); outline-offset: 0; }
.project-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE FICHE PROJET — tous écrans
═══════════════════════════════════════════════════ */

/* Tablette (≤ 1024px) — sidebar passe sous le texte */
@media (max-width: 1024px) {
  .projet-content-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .projet-sidebar {
    position: static;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0;
  }
  .sg-carousel { -webkit-box-flex: 1; -ms-flex: 1 1 320px; flex: 1 1 320px; margin-bottom: 0; }
  .sidebar-card { -webkit-box-flex: 1; -ms-flex: 1 1 200px; flex: 1 1 200px; }
  .sg-main { aspect-ratio: 16/9; }
}

/* Mobile large (≤ 768px) */
@media (max-width: 768px) {
  .projet-sidebar { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
  .sg-main { aspect-ratio: 4/3; }
  .sg-thumb { -webkit-box-flex: 0; -ms-flex: 0 0 64px; flex: 0 0 64px; height: 48px; min-height: 48px; }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
  .projet-meta-bar { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; gap: .75rem; }
  .projet-meta-links { margin-left: 0 !important; }
  .projet-nav { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
  .projet-nav-link--next { text-align: left; }
  .sg-thumb { -webkit-box-flex: 0; -ms-flex: 0 0 58px; flex: 0 0 58px; height: 44px; min-height: 44px; }
  .sg-btn { width: 40px; height: 40px; min-height: 40px; }
}

/* Responsive grid projets : 3 colonnes ≥ 1100px */
@media (min-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .about-photo { image-rendering: -webkit-optimize-contrast; }
}

/* ── Print : fiche projet ─────────────────────────── */
@media print {
  .projet-sidebar, .projet-nav, .breadcrumb,
  .hero-scroll, #site-header, .demo-badge { display: none !important; }
  .projet-content-wrap { display: block !important; }
  .projet-hero-img { max-height: 6cm; width: auto; }
  .projet-content { font-size: 11pt; color: black; }
  body { background: white; color: black; }
  a { color: black; }
}

/* ── Forced colors (Windows HC) ─────────────────── */
@media (forced-colors: active) {
  .sg-thumb.is-active { -webkit-box-shadow: inset 0 -3px 0 0 Highlight; box-shadow: inset 0 -3px 0 0 Highlight; }
  .sg-btn { border: 2px solid ButtonText; }
  .demo-badge { border: 1px solid ButtonText; }
}
