/* ==========================================================================
   gabinfremin.fr - feuille de style principale
   Aucune dependance externe (pas de Google Fonts) : chargement instantane,
   aucune requete tierce, pas de probleme RGPD.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de design
   -------------------------------------------------------------------------- */
:root {
  --bg:            #f7f8fa;
  --bg-elevated:   #ffffff;
  --bg-subtle:     #eef1f6;
  --text:          #10131a;
  --text-muted:    #59616f;
  --text-faint:    #838b99;
  --border:        #e2e6ed;
  --border-strong: #cdd4df;
  --accent:        #2f5fe0;
  --accent-hover:  #234bc0;
  --accent-soft:   #e8eeff;
  --accent-text:   #1f47b8;

  --shadow-sm: 0 1px 2px rgba(16, 19, 26, .05), 0 1px 3px rgba(16, 19, 26, .06);
  --shadow-md: 0 4px 12px rgba(16, 19, 26, .07), 0 2px 4px rgba(16, 19, 26, .04);
  --shadow-lg: 0 12px 32px rgba(16, 19, 26, .10), 0 4px 8px rgba(16, 19, 26, .04);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;

  --wrap: 1080px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --bg:            #0d1017;
  --bg-elevated:   #151a22;
  --bg-subtle:     #1b212b;
  --text:          #e7eaf0;
  --text-muted:    #9aa4b4;
  --text-faint:    #6f7887;
  --border:        #242b36;
  --border-strong: #333c4a;
  --accent:        #6c9bff;
  --accent-hover:  #8bb0ff;
  --accent-soft:   #17233d;
  --accent-text:   #a7c3ff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
}

/* --------------------------------------------------------------------------
   2. Reinitialisation et base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}

p      { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

/* La regle ci-dessus l emporte sur le display:none que le navigateur applique
   a l attribut hidden : on le retablit explicitement, sans quoi les icones
   masquees et les blocs conditionnels resteraient visibles. */
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { left: 12px; color: #fff; }

.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;
}

/* --------------------------------------------------------------------------
   3. En-tete / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  font-size: 1rem;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

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

.nav-links a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav-links a:hover     { color: var(--text); background: var(--bg-subtle); }
.nav-links a.is-active { color: var(--accent-text); background: var(--accent-soft); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease),
              transform .15s var(--ease);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.icon-btn svg { width: 17px; height: 17px; }

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.lang-switch button {
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   4. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   5. Sections
   -------------------------------------------------------------------------- */
.section { padding: 84px 0; }
.section + .section { padding-top: 0; }

.section-head { margin-bottom: 40px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.section-title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }

.section-sub {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 76px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%; left: 50%;
  width: min(920px, 120%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 13%, transparent) 0%,
    transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
  50%      { box-shadow: 0 0 0 6px rgba(22, 163, 74, .04); }
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4rem);
  letter-spacing: -.035em;
  margin-bottom: 14px;
}

.hero-role {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 18px;
}

.hero-pitch {
  max-width: 56ch;
  font-size: 1.03rem;
  color: var(--text-muted);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-muted);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta svg {
  width: 15px; height: 15px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.hero-portrait {
  position: relative;
  width: 232px; height: 232px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-lg);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

.portrait-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%; height: 100%;
  gap: 6px;
  padding: 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: .76rem;
  line-height: 1.4;
}
.portrait-placeholder strong {
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   7. Chiffres cles
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.stat { padding: 22px 24px; background: var(--bg-elevated); }
.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
}
.stat-label { margin-top: 2px; font-size: .82rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   8. Frise (parcours)
   -------------------------------------------------------------------------- */
.timeline-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
}

.timeline-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 1.05rem;
  font-weight: 700;
}
.timeline-title svg { width: 18px; height: 18px; color: var(--accent); }

.timeline {
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom,
    var(--border-strong), var(--border) 85%, transparent);
}

.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -26px; top: 6px;
  width: 12px; height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--border-strong);
}
.tl-item.is-current::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.tl-date {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-faint);
}
.tl-role { margin: 3px 0 2px; font-size: 1.02rem; font-weight: 700; }
.tl-org  { font-size: .9rem; font-weight: 500; color: var(--accent-text); }

.tl-desc { margin: 9px 0 0; font-size: .91rem; color: var(--text-muted); }
.tl-desc li { position: relative; padding-left: 16px; margin-bottom: 4px; }
.tl-desc li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.tag-current {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* --------------------------------------------------------------------------
   9. Competences
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.card-icon svg { width: 20px; height: 20px; }

.card-title { font-size: 1.02rem; margin-bottom: 14px; }

.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  font-size: .81rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color .15s var(--ease);
}
.card:hover .pill { border-color: var(--border-strong); }

.lang-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.lang-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lang-level { font-family: var(--mono); font-size: .76rem; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 52px;
  align-items: center;
  padding: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.contact-list li + li { margin-top: 6px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.contact-link:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border);
}
.contact-link svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.contact-label {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-value {
  font-size: .95rem;
  font-weight: 500;
  /* L'adresse email est longue : sur un ecran etroit elle doit pouvoir se
     couper plutot que d'elargir la page. */
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   10 bis. Formulaire de contact
   -------------------------------------------------------------------------- */
.contact-form { display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }

/* Libelles en chasse fixe, comme les autres surtitres du site. */
.field label {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.req {
  margin-left: 5px;
  color: var(--accent);
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  line-height: 1.55;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease),
              background-color .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); opacity: 1; }

.field input:hover,
.field textarea:hover { border-color: var(--border-strong); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* Champ signale en erreur apres une tentative d envoi invalide. */
.field.has-error input,
.field.has-error textarea,
.field.has-error .captcha-box { border-color: #dc2626; }
[data-theme="dark"] .field.has-error input,
[data-theme="dark"] .field.has-error textarea,
[data-theme="dark"] .field.has-error .captcha-box { border-color: #f87171; }

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 500;
  color: #dc2626;
}
.field-error::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
[data-theme="dark"] .field-error { color: #f87171; }

/* --- Bloc anti-robot ------------------------------------------------------
   Presente comme un composant a part entiere plutot que comme un champ de
   plus : le visiteur comprend au premier coup d oeil ce qu on lui demande. */
.captcha-field { gap: 8px; }

.captcha-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color .15s var(--ease);
}
.captcha-box:hover { border-color: var(--border-strong); }
.captcha-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.captcha-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.captcha-mark svg { width: 19px; height: 19px; }

.captcha-text { display: grid; gap: 1px; flex: 1; min-width: 0; }

.captcha-title {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.captcha-question {
  font-family: var(--mono);
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  cursor: pointer;
}

/* Selecteur a deux classes : il doit l'emporter sur « .field input », qui
   impose width:100% a tous les champs du formulaire. */
.captcha-box .captcha-input {
  width: 74px;
  flex-shrink: 0;
  padding: 9px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.captcha-box .captcha-input:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: none;
}

/* Piege a robots : retire de l affichage sans display:none, sinon beaucoup de
   robots le detectent et l ignorent. Reste inaccessible au clavier. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: .97rem;
}
.contact-form .btn { margin-top: 2px; }
.contact-form .btn[disabled] {
  opacity: .6;
  cursor: progress;
  transform: none;
}

.form-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: .88rem;
}
.form-status svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }

.form-status.is-success {
  border-color: color-mix(in srgb, #16a34a 45%, var(--border));
  background: color-mix(in srgb, #16a34a 10%, var(--bg-elevated));
  color: var(--text);
}
.form-status.is-success svg { color: #16a34a; }

.form-status.is-error {
  border-color: color-mix(in srgb, #dc2626 45%, var(--border));
  background: color-mix(in srgb, #dc2626 9%, var(--bg-elevated));
  color: var(--text);
}
.form-status.is-error svg { color: #dc2626; }

.form-legal {
  margin: 0;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   11. Portfolio
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease);
}
.project:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.project-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.project:hover .project-thumb img { transform: scale(1.04); }

.thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(45deg, var(--border) 25%, transparent 25%),
    linear-gradient(-45deg, var(--border) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--border) 75%),
    linear-gradient(-45deg, transparent 75%, var(--border) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: .78rem;
}
.thumb-placeholder span {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: .73rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.project-meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.project-title { font-size: 1.1rem; margin-bottom: 9px; }

.project-desc {
  flex: 1;
  margin-bottom: 16px;
  font-size: .92rem;
  color: var(--text-muted);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.project-stack .pill { font-size: .76rem; padding: 3px 9px; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  font-weight: 600;
}
.project-links svg { width: 14px; height: 14px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}
.filter {
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.empty-state {
  padding: 60px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
}

/* Encadre de rappel, a supprimer une fois les vrais projets renseignes. */
.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 30px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: .9rem;
  color: var(--text);
}
.notice svg {
  width: 19px; height: 19px;
  margin-top: 2px;
  color: var(--accent);
  flex-shrink: 0;
}
.notice p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 84px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  font-size: .87rem;
  color: var(--text-faint);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   13. Animations d apparition
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Pendant un redimensionnement, les regles qui basculent d une media query a
   l autre declencheraient leurs transitions : le menu mobile se verrait
   disparaitre en fondu au moment ou la fenetre franchit 760px. On les coupe
   le temps du redimensionnement. */
.is-resizing *,
.is-resizing *::before,
.is-resizing *::after { transition: none !important; }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait { width: 168px; height: 168px; order: -1; }
  .contact-panel { grid-template-columns: 1fr; gap: 30px; padding: 30px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .section { padding: 60px 0; }
  .site-header { border-bottom: 1px solid var(--border); }

  .nav-toggle { display: grid; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease),
                visibility .2s var(--ease);
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 11px 14px; font-size: .95rem; }

  .nav-tools { margin-left: auto; }
  .hero { padding: 48px 0 52px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .wrap { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   15. Impression : Ctrl+P sur le CV produit un document propre
   -------------------------------------------------------------------------- */
@media print {
  :root {
    --bg: #fff; --bg-elevated: #fff; --bg-subtle: #fff;
    --text: #000; --text-muted: #333; --text-faint: #555;
    --border: #ccc; --border-strong: #999;
    --accent: #000; --accent-text: #000; --accent-soft: #f0f0f0;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  }
  body { font-size: 11pt; }
  .site-header, .hero-actions, .nav-tools, .site-footer,
  .status-badge, .skip-link, .notice, .filters,
  .contact-form { display: none !important; }
  .hero::before { display: none; }
  .section { padding: 14pt 0; page-break-inside: avoid; }
  .card, .project, .contact-panel { box-shadow: none; break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000 !important; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
  }
}
