/* ==========================================================================
   Tom Riese — Portfolio
   1. Tokens & thèmes      5. Compétences
   2. Base & utilitaires   6. Timeline & Infos
   3. Navbar               7. Contact & Footer
   4. Hero                 8. Responsive & préférences système
   ========================================================================== */

/* ============ 1. TOKENS & THÈMES ============ */

:root {
  /* Accent — identique aux deux thèmes pour l'identité de marque */
  --accent:        #10b981;
  --accent-2:      #34d399;
  --accent-3:      #059669;

  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head:  'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --header-h: 72px;
  --ease:     cubic-bezier(.22, 1, .36, 1);
  --dur:      .45s;

  --container-max: 1200px;
}

/* --- Thème sombre (défaut) --- */
:root,
:root[data-theme="dark"] {
  --bg:          #060b0a;
  --bg-alt:      #0a1211;
  --surface:     #0e1817;
  --surface-2:   #121f1d;
  --glass:       rgba(10, 18, 17, .72);
  --border:      rgba(255, 255, 255, .09);
  --border-soft: rgba(255, 255, 255, .05);

  --text:        #e9f3ef;
  --text-muted:  #9aada7;
  --text-dim:    #7a8d87;              /* ≥ 4.5:1 sur --bg et --surface */

  --accent-ink:  #34d399;              /* accent lisible en texte */
  --accent-soft: rgba(16, 185, 129, .14);
  --accent-line: rgba(16, 185, 129, .32);

  --btn-bg:      #10b981;
  --btn-fg:      #04231c;
  --btn-bg-hover:#34d399;

  --shadow-sm:   0 2px 8px rgba(0, 0, 0, .35);
  --shadow:      0 12px 34px rgba(0, 0, 0, .48);
  --shadow-lg:   0 26px 60px rgba(0, 0, 0, .58);

  color-scheme: dark;
}

/* --- Thème clair --- */
:root[data-theme="light"] {
  --bg:          #f7faf9;
  --bg-alt:      #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f1f6f4;
  --glass:       rgba(255, 255, 255, .78);
  --border:      rgba(9, 30, 25, .12);
  --border-soft: rgba(9, 30, 25, .07);

  --text:        #0c1a16;
  --text-muted:  #47605a;
  --text-dim:    #5f7570;              /* ≥ 4.5:1 sur --bg (petits textes) */

  --accent-ink:  #047857;              /* ratio ≥ 4.5:1 sur fond clair */
  --accent-soft: rgba(5, 150, 105, .10);
  --accent-line: rgba(5, 150, 105, .28);

  --btn-bg:      #047857;
  --btn-fg:      #ffffff;
  --btn-bg-hover:#065f46;

  --shadow-sm:   0 2px 8px rgba(9, 30, 25, .06);
  --shadow:      0 12px 30px rgba(9, 30, 25, .08);
  --shadow-lg:   0 24px 54px rgba(9, 30, 25, .12);

  color-scheme: light;
}

/* ============ 2. BASE ============ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }

a { color: var(--accent-ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

img, svg, canvas { max-width: 100%; }

::selection { background: var(--accent); color: var(--btn-fg); }

/* Focus visible homogène et conforme */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: var(--container-max); }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 2000;
  padding: .7rem 1.1rem; border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 600;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 14px; color: var(--btn-fg); }

/* --- Sections --- */
.section { position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-alt::before,
.section-alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section-alt::before { top: 0; }
.section-alt::after  { bottom: 0; }

.section-head { max-width: 780px; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); scroll-margin-top: calc(var(--header-h) + 24px); }
.section-head-second { margin-top: clamp(3.5rem, 6vw, 5.5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 .6rem;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title { margin: 0; font-size: clamp(2rem, 4.6vw, 3.1rem); }
.section-sub   { margin: .9rem 0 0; color: var(--text-muted); font-size: 1.05rem; max-width: 62ch; }

.lead-text { font-size: 1.12rem; color: var(--text); margin-bottom: 1.1rem; }
.body-text { color: var(--text-muted); margin-bottom: 1.6rem; }

/* --- Boutons --- */
.btn {
  --bs-btn-focus-box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.55rem;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-sans); font-size: .95rem; font-weight: 600; line-height: 1.2;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, color .25s, box-shadow .25s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .58rem 1.15rem; font-size: .88rem; }

/* Indicateur « ouvre un nouvel onglet » */
.btn-ext { font-size: .68em; opacity: .6; transition: transform .25s var(--ease), opacity .25s; }
.btn:hover .btn-ext { opacity: 1; transform: translate(2px, -2px); }

.btn-accent {
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: 0 8px 24px -10px var(--accent);
}
.btn-accent:hover, .btn-accent:focus-visible {
  background: var(--btn-bg-hover); color: var(--btn-fg);
  transform: translateY(-2px); box-shadow: 0 14px 32px -10px var(--accent);
}

.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  color: var(--accent-ink); border-color: var(--accent-line);
  background: var(--accent-soft); transform: translateY(-2px);
}

/* --- Apparition au scroll --- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ 3. NAVBAR ============ */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1030;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .navbar { padding: 0; min-height: var(--header-h); }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); flex-wrap: wrap; }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); font-family: var(--font-head); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #04231c; font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.brand-text { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-dot { color: var(--accent-ink); font-style: normal; }

.navbar-nav { gap: .15rem; align-items: center; }
.site-header .nav-link {
  position: relative;
  padding: .5rem .85rem;
  color: var(--text-muted); font-size: .93rem; font-weight: 500;
  border-radius: 999px;
  transition: color .22s, background-color .22s;
}
.site-header .nav-link:hover { color: var(--text); }
.site-header .nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; translate: -50% 0;
  width: 0; height: 2px; border-radius: 2px; background: var(--accent);
  transition: width .3s var(--ease);
}
.site-header .nav-link.is-active { color: var(--accent-ink); }
.site-header .nav-link.is-active::after { width: 18px; }

.nav-tools { display: flex; align-items: center; gap: .55rem; margin-left: auto; }

.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
}
.lang-btn {
  border: 0; background: transparent; color: var(--text-muted);
  padding: .3rem .62rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .06em;
  cursor: pointer; transition: background-color .25s, color .25s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }

.theme-toggle { border: 0; background: transparent; padding: 0; cursor: pointer; line-height: 0; }
.theme-toggle-track {
  display: block; position: relative; width: 56px; height: 30px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
  transition: background-color .3s, border-color .3s;
}
.theme-toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg);
  transition: transform .4s var(--ease), background-color .3s;
}
.theme-toggle-thumb svg { position: absolute; transition: opacity .25s, transform .35s var(--ease); }
:root[data-theme="dark"]  .icon-sun  { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"]  .icon-moon { opacity: 1; }
:root[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
:root[data-theme="light"] .icon-sun  { opacity: 1; }
:root[data-theme="light"] .theme-toggle-thumb { transform: translateX(26px); }
.theme-toggle:focus-visible .theme-toggle-track { outline: 2px solid var(--accent); outline-offset: 3px; }

.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2);
}
.burger span { display: block; width: 18px; height: 2px; margin: 0 auto; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.burger:focus { box-shadow: none; }

.scroll-progress {
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  transition: width .1s linear;
}

/* ============ 4. HERO ============ */

.hero {
  position: relative; display: flex; align-items: center;
  min-height: 100svh; padding: calc(var(--header-h) + 2rem) 0 3.5rem;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 40%, transparent 0%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
  opacity: .92;
}
.hero-inner { position: relative; z-index: 2; }

.hero-status {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .38rem .95rem .38rem .7rem; margin-bottom: 1.2rem;
  border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: .82rem; font-weight: 600;
}
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent); animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.5); } }

.hero-title { margin: 0; font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.02; }
.hero-title span { display: block; }
.hero-title-accent {
  background: linear-gradient(100deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .hero-title-accent { background: linear-gradient(100deg, #059669, #047857); -webkit-background-clip: text; background-clip: text; }

.hero-typed {
  margin: 1rem 0 0; min-height: 1.7em;
  font-family: var(--font-mono); font-size: clamp(.85rem, 2.2vw, 1rem);
  color: var(--text-muted); letter-spacing: .01em;
}
.hero-typed .prompt { color: var(--accent-ink); margin-right: .55rem; }
.caret {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 3px;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.hero-lead { max-width: 58ch; margin: 1.2rem 0 0; font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--text-muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

.hero-social {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  list-style: none; padding: 0; margin: 1.9rem 0 0;
}
.hero-social a {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--border); border-radius: 13px;
  background: var(--surface); color: var(--text-muted); font-size: 1.02rem;
  transition: transform .25s var(--ease), color .25s, border-color .25s, background-color .25s;
}
.hero-social a:hover {
  transform: translateY(-3px); color: var(--accent-ink);
  border-color: var(--accent-line); background: var(--accent-soft);
}
.hero-location { margin-left: .4rem; color: var(--text-dim); font-size: .9rem; }
.hero-location i { color: var(--accent-ink); margin-right: .25rem; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 2;
  color: var(--text-dim);
}
.mouse {
  display: block; width: 24px; height: 38px;
  border: 1.5px solid currentColor; border-radius: 999px; opacity: .55;
}
.mouse span {
  display: block; width: 3px; height: 7px; margin: 7px auto 0;
  border-radius: 2px; background: var(--accent);
  animation: wheel 1.9s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ============ 5. À PROPOS & COMPÉTENCES ============ */

.about-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.expertise-grid { display: grid; gap: 1rem; }
.expertise-card {
  position: relative; padding: 1.5rem 1.6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.expertise-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.expertise-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1rem;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.05rem;
}
.expertise-card h3 { margin: 0 0 .35rem; font-size: 1.13rem; }
.expertise-card p  { margin: 0; color: var(--text-muted); font-size: .95rem; }
.expertise-stack {
  margin-top: .75rem !important; padding-top: .75rem; border-top: 1px dashed var(--border-soft);
  font-family: var(--font-mono); font-size: .78rem !important; color: var(--text-dim) !important;
  line-height: 1.75;
}

/* --- Filtres --- */
.skill-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.2rem; }
.filter-btn {
  padding: .45rem 1rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text-muted); font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: color .25s, background-color .25s, border-color .25s, transform .2s;
}
.filter-btn:hover { color: var(--text); transform: translateY(-2px); }
.filter-btn[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }

/* --- Groupes de compétences --- */
.skill-group { margin-bottom: 2.6rem; }
.skill-group[hidden] { display: none; }
.skill-group-title {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 1.1rem; font-size: .95rem; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: .04em; color: var(--text-muted);
}
.skill-group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.skill-group-count { font-size: .75rem; color: var(--text-dim); }

.skill-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.skill-chip {
  display: flex; align-items: center; gap: .65rem;
  padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-size: .87rem; font-weight: 500;
  transition: transform .28s var(--ease), border-color .28s, background-color .28s, box-shadow .28s;
}
.skill-chip:hover {
  transform: translateY(-4px); border-color: var(--accent-line);
  background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.skill-chip img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.skill-chip .fa-solid { width: 24px; text-align: center; color: var(--accent-ink); font-size: 1.05rem; flex: none; }
/* Certaines icônes Devicon sont noires : on les éclaircit en thème sombre. */
:root[data-theme="dark"] .skill-chip img[data-invert="1"] { filter: invert(1) brightness(1.6); }
/* Les noms de technologies ne sont jamais tronqués : ils passent à la ligne. */
.skill-name { line-height: 1.3; overflow-wrap: anywhere; }

.skill-extra {
  margin: .9rem 0 0; padding-left: 0; list-style: none;
  font-size: .84rem; color: var(--text-dim);
}
.skill-extra li { display: inline-block; margin: 0 .9rem .2rem 0; }
.skill-extra li::before { content: "▸ "; color: var(--accent-ink); }

.method-card {
  height: 100%; padding: 1.6rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.method-card h3 { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; font-size: 1.05rem; }
.method-card h3 i { color: var(--accent-ink); }

.pill-list, .tag-list {
  display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0;
}
.pill-list li {
  padding: .38rem .85rem; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-ink); font-size: .82rem; font-weight: 500;
}
.tag-list li {
  padding: .26rem .68rem; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  color: var(--text-muted); font-family: var(--font-mono); font-size: .74rem;
}

/* ============ 6. TIMELINE / PROJETS / INFOS ============ */

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-line) 45%, transparent);
}
.timeline-item { position: relative; padding-bottom: 1.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: calc(-2rem + 1px); top: 1.7rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.section-alt .timeline-dot { background: var(--bg-alt); }

.timeline-card {
  padding: 1.5rem 1.7rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.timeline-card:hover { transform: translateX(5px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.timeline-date {
  margin: 0 0 .3rem; font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .06em; color: var(--accent-ink);
}
.timeline-title { margin: 0 0 .15rem; font-size: 1.24rem; }
.timeline-org   { margin: 0 0 .8rem; color: var(--text-dim); font-size: .92rem; font-weight: 500; }
.timeline-desc  { margin: 0 0 1rem; color: var(--text-muted); font-size: .96rem; }
.timeline-card .tag-list { margin-bottom: .9rem; }

.link-out {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .88rem; font-weight: 600; color: var(--accent-ink);
}
.link-out i { font-size: .75em; transition: transform .25s var(--ease); }
.link-out:hover i { transform: translate(2px, -2px); }

/* --- Infos --- */
.info-card {
  height: 100%; padding: 1.7rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: transform .35s var(--ease), border-color .3s;
}
.info-card:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.info-card h3 { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.3rem; font-size: 1.08rem; }
.info-card h3 i { color: var(--accent-ink); }

.lang-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.15rem; }
.lang-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .45rem; font-size: .95rem; font-weight: 500; }
.lang-level { font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-soft); overflow: hidden; }
.meter > span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  transition: width 1.1s var(--ease) .15s;
}
.reveal.is-visible .meter > span,
.is-visible .meter > span,
.meter.is-visible > span { width: var(--w, 0%); }

.icon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.icon-list li { display: flex; align-items: center; gap: .8rem; color: var(--text-muted); font-size: .96rem; }
.icon-list i {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: .85rem;
}
/* ============ 7. CONTACT & FOOTER ============ */

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.contact-list a, .contact-static {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--text);
  transition: transform .28s var(--ease), border-color .28s, background-color .28s;
}
.contact-list a:hover { transform: translateX(5px); border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.contact-ico {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 1rem;
}
.contact-txt { display: flex; flex-direction: column; min-width: 0; font-size: .93rem; overflow-wrap: anywhere; }
.contact-txt strong { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }

.contact-form {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.form-label { margin-bottom: .4rem; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.captcha-q { font-family: var(--font-mono); color: var(--accent-ink); }

.contact-form .form-control {
  padding: .8rem 1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .95rem;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.contact-form .form-control::placeholder { color: var(--text-dim); }
.contact-form .form-control:focus {
  background: var(--bg); color: var(--text);
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.captcha-input { max-width: 220px; }

.field-error {
  display: none; margin: .4rem 0 0;
  font-size: .82rem; color: #ef6a6a;
}
:root[data-theme="light"] .field-error { color: #b91c1c; }
.contact-form .is-invalid { border-color: #ef6a6a; }
.contact-form .is-invalid ~ .field-error { display: block; }
.contact-form .is-valid { border-color: var(--accent); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-note { margin: 0; font-size: .82rem; color: var(--text-dim); }

.form-status { margin: 1.1rem 0 0; font-size: .9rem; font-weight: 500; }
.form-status.is-ok    { color: var(--accent-ink); }
.form-status.is-error { color: #ef6a6a; }
:root[data-theme="light"] .form-status.is-error { color: #b91c1c; }

.site-footer { padding: 2.6rem 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer-social { display: flex; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.footer-social a {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 11px; color: var(--text-muted);
  transition: color .25s, border-color .25s, transform .25s var(--ease);
}
.footer-social a:hover { color: var(--accent-ink); border-color: var(--accent-line); transform: translateY(-3px); }
.footer-copy { margin: 0; color: var(--text-dim); font-size: .86rem; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 1020;
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--text); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, visibility .3s, transform .3s var(--ease), color .25s, border-color .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent-ink); border-color: var(--accent-line); }

/* ============ 8. RESPONSIVE ============ */

@media (max-width: 991.98px) {
  .burger { display: flex; }
  .site-header .container { flex-wrap: wrap; row-gap: 0; }
  .navbar-collapse { flex-basis: 100%; order: 3; }
  .navbar-nav {
    align-items: stretch; gap: .1rem;
    padding: .6rem 0 1.2rem; margin: 0 0 0 !important;
  }
  .site-header .nav-link { padding: .75rem .5rem; font-size: 1rem; }
  .site-header .nav-link::after { left: 4px; translate: 0 0; bottom: 8px; }
  .site-header .nav-link.is-active::after { width: 14px; }
  /* Le menu déroulé doit rester lisible même si l'en-tête n'est pas encore "scrollé" */
  .site-header:has(.navbar-collapse.show),
  .site-header:has(.navbar-collapse.collapsing) {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom-color: var(--border);
  }
}

@media (max-width: 575.98px) {
  :root { --header-h: 64px; }
  .hero { min-height: 92svh; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-social { gap: .5rem; }
  .hero-location { flex-basis: 100%; margin-left: 0; margin-top: .4rem; }
  .brand-text { display: none; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: calc(-1.5rem + 1px); }
  .timeline-card { padding: 1.25rem 1.2rem; }
  .skill-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); }
  .footer-inner { flex-direction: column; text-align: center; }
  .scroll-cue { display: none; }
  .captcha-input { max-width: 100%; }
}

/* Un menu ouvert ne doit pas laisser défiler l'arrière-plan */
body.nav-open { overflow: hidden; }

/* --- Préférence : mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .meter > span { width: var(--w, 0%); }
}

/* --- Impression --- */
@media print {
  .site-header, .to-top, .hero-canvas, .scroll-cue, .skill-filters, .contact-form { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1.2rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
