/* ==========================================================================
   julienguerin.dev — dark, sober portfolio
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* deep navy base — the page itself paints the gradient (see body) */
  --bg:          #08142b;
  --bg-deep:     #050e1f;
  --bg-top:      #0e1e3c;
  --panel:       rgba(130, 185, 255, .045);
  --panel-hover: rgba(130, 185, 255, .075);
  --line:        rgba(130, 185, 255, .12);
  --line-strong: rgba(130, 185, 255, .24);

  --text:        #e7ebf3;
  --text-dim:    #a3acbd;
  --text-faint:  #6d7789;

  /* identité du logo : bleu électrique, bleu profond, blanc */
  --accent:      #0090ff;   /* bleu de marque      */
  --accent-2:    #0070f0;   /* bleu profond        */
  --accent-3:    #66c4ff;   /* bleu clair (texte)  */
  --accent-4:    #c8e1ff;   /* bleu blanchi        */
  --accent-dim:  rgba(0, 144, 255, .16);
  --grad: linear-gradient(100deg, #66c4ff 0%, #0090ff 48%, #0060e0 100%);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --radius:    14px;
  --radius-sm: 10px;

  --pad: clamp(20px, 4vw, 72px);
  --maxw: none;          /* pleine largeur : le contenu suit la fenêtre */

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

/* --- Base ----------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--text);
  /* one continuous gradient over the whole document: navy at the top,
     deeper as you scroll down */
  background-color: var(--bg-deep);
  background-image: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 42%, var(--bg-deep) 100%);
  background-repeat: no-repeat;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

/* nappes de couleur diffuses, fixées au viewport */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(680px 480px at 10% 6%,   rgba(0, 144, 255, .20), transparent 66%),
    radial-gradient(720px 520px at 90% 16%,  rgba(0, 112, 240, .16), transparent 66%),
    radial-gradient(820px 560px at 50% 104%, rgba(102, 196, 255, .12),  transparent 66%);
}

::selection { background: rgba(0, 144, 255, .28); }

/* texte en dégradé */
.grad {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }

:where(a, button, .card):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* --- Small type helpers --------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
/* keeps product names such as iOS or SwiftUI correctly cased */
.mono--cased { text-transform: none; letter-spacing: .1em; }

/* --- Header --------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--bg-top);           /* barre opaque, aucune transparence */
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header.is-stuck { box-shadow: 0 12px 32px -22px rgba(0, 0, 0, .95); }
.header.is-stuck::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(0, 144, 255, .55), rgba(0, 112, 240, .5), rgba(102, 196, 255, .45));
}
.header__inner {
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { height: 36px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 8px 12px; border-radius: 8px;
  font-size: .875rem; color: var(--text-dim); text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--panel); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px;
  height: 1px; background: var(--accent);
}

.header__actions { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px;
  background: var(--panel);
}
.lang__btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--text-faint);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { color: var(--text); background: rgba(130, 185, 255, .12); }

.burger {
  display: none; width: 38px; height: 38px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.burger span { display: block; width: 16px; height: 1px; background: var(--text); position: relative; transition: background .2s var(--ease); }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--text);
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.burger span::before { top: -5px; }
.burger span::after  { top: 5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: min(940px, 90vh);
  padding-top: 132px; padding-bottom: clamp(64px, 8vw, 108px);
}
.hero > .wrap { width: 100%; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -2;
  background: radial-gradient(58% 62% at 62% 0%, rgba(0, 130, 240, .20), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(130, 185, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(130, 185, 255, .05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 60% at 40% 20%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 40% 20%, #000, transparent 75%);
}

.hero__grid {
  display: grid; grid-template-columns: minmax(300px, 34%) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px); align-items: center;
}
/* le portrait passe à gauche sans toucher à l'ordre du HTML */
.hero__figure { order: -1; max-width: 560px; justify-self: start; width: 100%; }

/* le texte est centré dans la colonne qui lui reste */
.hero__text { text-align: center; }
.hero__text .hero__eyebrow,
.hero__text .hero__meta,
.hero__text .actions { justify-content: center; }
.hero__text .hero__lead { margin-inline: auto; }

.hero__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); flex: none;
  box-shadow: 0 0 0 4px rgba(102, 196, 255, .18);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(102, 196, 255, .18); }
  50%      { box-shadow: 0 0 0 9px rgba(102, 196, 255, .04); }
}

/* frappe façon terminal sur la ligne d'accroche */
.type::after {
  content: ""; display: inline-block;
  width: .5em; height: 1.05em; margin-left: .3em; vertical-align: -.2em;
  background: var(--accent);
}
.type.is-done::after { animation: caret 1.05s steps(1) infinite; }
@keyframes caret {
  0%, 50%      { opacity: .95; }
  50.01%, 100% { opacity: 0; }
}
/* sans JS ou en mouvement réduit, la ligne s'affiche telle quelle */
html:not(.js) .type::after { display: none; }
@media (prefers-reduced-motion: reduce) { .type::after { display: none; } }

.hero h1 {
  font-size: clamp(2.3rem, 4.9vw, 5.2rem);
  font-weight: 600; letter-spacing: -.045em; margin-bottom: 24px;
}
.hero h1 span { display: block; }

.hero__lead {
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  color: var(--text-dim); max-width: 52ch; margin-bottom: 34px;
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 38px;
  font-size: .9rem; color: var(--text-faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }

/* portrait détouré : il repose directement sur le fond, sans cadre */
.hero__figure {
  position: relative;
  background: radial-gradient(58% 48% at 52% 42%, rgba(0, 144, 255, .22), transparent 72%);
}
.hero__figure img {
  width: 100%; height: auto; max-height: min(660px, 70vh);
  object-fit: contain; object-position: bottom;
  /* le buste est coupé par les bords de la photo : on le fond dans l'arrière-plan,
     en bas et sur les côtés (les épaules touchent le cadre d'origine) */
  -webkit-mask-image:
    linear-gradient(180deg, #000 56%, transparent 97%),
    linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image:
    linear-gradient(180deg, #000 56%, transparent 97%),
    linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* --- Buttons -------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 10px;
  font-size: .9rem; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  /* sans cela, le dégradé se répète dans la bordure transparente et laisse
     un liseré clair sur le bord droit du bouton */
  background-origin: border-box;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; transition: transform .25s var(--ease); }

.btn--primary {
  background-image: var(--grad); color: #061024; font-weight: 600;
  box-shadow: 0 12px 30px -14px rgba(0, 144, 255, .75);
}
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 14px 34px -12px rgba(0, 144, 255, .85); }
.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { background: var(--panel-hover); border-color: var(--accent); color: var(--text); }
.btn--ghost:hover svg { transform: translateY(2px); }

/* --- Logo strip ----------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 144, 255, .07), rgba(0, 112, 240, .05) 50%, rgba(102, 196, 255, .06)),
    rgba(5, 14, 31, .3);
}
.strip__inner { padding-block: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.strip__label { flex: none; color: var(--accent-3); }
.strip__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; }

/* logos détourés, en blanc, posés directement sur le fond */
.logo-mono {
  height: 30px; width: auto; opacity: .6;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.logo-mono:hover { opacity: .95; transform: translateY(-2px); }
.strip__logos .logo-mono:nth-child(1) { height: 34px; }  /* Crédit Agricole */
.strip__logos .logo-mono:nth-child(2) { height: 32px; }  /* LCL */
.strip__logos .logo-mono:nth-child(3) { height: 26px; }  /* Meritis */
.strip__logos .logo-mono:nth-child(4) { height: 32px; }  /* Frog */
.strip__logos .logo-mono:nth-child(5) { height: 34px; }  /* AITEC */
.strip__logos .logo-mono:nth-child(6) { height: 34px; }  /* Institut du Mouvement */

.logo-chip {
  display: flex; align-items: center; justify-content: center;
  background: #f2f6fc; border-radius: var(--radius-sm);
  padding: 8px 12px; height: 44px; width: 96px;
  opacity: .8;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.logo-chip img { height: 100%; width: 100%; object-fit: contain; }

/* --- Sections ------------------------------------------------------------- */
.section { padding-block: clamp(72px, 10vw, 132px); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }

.section__head { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); flex: none; }
#profil     { --section-accent: var(--accent); }
#projets    { --section-accent: var(--accent-2); }
#experience { --section-accent: var(--accent-3); }
#formation  { --section-accent: var(--accent-4); }
#contact    { --section-accent: var(--accent); }
.section__head::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, var(--section-accent, var(--accent)), rgba(0, 112, 240, .25), transparent 92%);
  opacity: .55;
}

.lede { font-size: 1.05rem; color: var(--text-dim); max-width: 62ch; }
.lede + .lede { margin-top: 18px; }

/* --- About ---------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); }

.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cards article {
  background: var(--panel); padding: 26px 24px 26px 22px;
  box-shadow: inset 3px 0 0 var(--card-hue, var(--accent));
  transition: background .25s var(--ease);
}
.cards article:nth-child(1) { --card-hue: rgba(0, 144, 255, .75); }
.cards article:nth-child(2) { --card-hue: rgba(0, 112, 240, .75); }
.cards article:nth-child(3) { --card-hue: rgba(102, 196, 255, .7); }
.cards article:hover { background: var(--panel-hover); }
.cards h3 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.cards h3 svg { width: 17px; height: 17px; flex: none; }
.cards article:nth-child(1) h3 svg { color: var(--accent); }
.cards article:nth-child(2) h3 svg { color: var(--accent-2); }
.cards article:nth-child(3) h3 svg { color: var(--accent-3); }
.cards p { font-size: .92rem; color: var(--text-dim); max-width: 68ch; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tag {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--text-dim); padding: 6px 11px;
  border: 1px solid; border-radius: 999px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.tag:nth-child(3n+1) { border-color: rgba(0, 144, 255, .3); background: rgba(0, 144, 255, .06); }
.tag:nth-child(3n+2) { border-color: rgba(0, 112, 240, .3); background: rgba(0, 112, 240, .06); }
.tag:nth-child(3n)   { border-color: rgba(102, 196, 255, .28); background: rgba(102, 196, 255, .06); }
.tag:nth-child(3n+1):hover { color: #a8d6ff; border-color: var(--accent); }
.tag:nth-child(3n+2):hover { color: #8fc8ff; border-color: var(--accent-2); }
.tag:nth-child(3n):hover   { color: #ffffff; border-color: var(--accent-3); }

/* --- Timeline ------------------------------------------------------------- */
.timeline { display: grid; gap: 0; }

.entry {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 32px; padding-block: 30px;
  border-top: 1px solid var(--line);
}
.entry:first-child { border-top: 0; padding-top: 0; }

.entry__period { padding-top: 4px; color: #7fc0ff; }
.entry__head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.entry h3 { font-size: 1.12rem; }
.entry__org { font-size: .92rem; color: var(--text); display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.entry__org a { color: var(--entry-accent, var(--accent)); text-decoration-color: rgba(255, 255, 255, .25); }
.entry__org .logo-chip { height: 28px; width: 62px; padding: 4px 8px; opacity: 1; }

.entry ul { list-style: none; padding: 0; display: grid; gap: 7px; max-width: 108ch; }
.entry li { position: relative; padding-left: 18px; font-size: .92rem; color: var(--text-dim); }
.entry li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--entry-accent, var(--accent));
}
.timeline .entry:nth-child(4n+1) { --entry-accent: var(--accent); }
.timeline .entry:nth-child(4n+2) { --entry-accent: var(--accent-3); }
.timeline .entry:nth-child(4n+3) { --entry-accent: var(--accent-2); }
.timeline .entry:nth-child(4n)   { --entry-accent: var(--accent-4); }
.entry li b { color: var(--text); font-weight: 500; }

/* --- Frise horizontale (expérience) --------------------------------------- */
.timeline--h {
  display: flex; gap: 26px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 10px; margin: -4px -4px -10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.timeline--h::-webkit-scrollbar { display: none; }

.timeline--h .entry {
  flex: 0 0 clamp(300px, 30%, 400px);
  display: block; position: relative;
  border-top: 0; padding: 46px 0 0;
  scroll-snap-align: start;
}

/* le rail : chaque entrée porte son segment, prolongé sur la gouttière */
.timeline--h .entry::before {
  content: ""; position: absolute; left: 0; right: -26px; top: 10px;
  height: 1px; background: var(--line);
}
.timeline--h .entry:last-child::before { right: 0; }

/* la pastille, à la couleur de l'entrée */
.timeline--h .entry::after {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--entry-accent, var(--accent));
  box-shadow: 0 0 0 4px rgba(0, 144, 255, .14);
}

.timeline--h .entry__period { padding-top: 0; margin-bottom: 12px; }
.timeline--h .entry h3 { font-size: 1.05rem; }
.timeline--h .entry ul { max-width: none; }

/* --- Projects ------------------------------------------------------------- */
/* --- Carrousel de projets ------------------------------------------------ */
.projects {
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;   /* le défilement animé est piloté par le JS */
  padding: 4px 4px 6px;  /* laisse respirer l'ombre et le focus */
  margin: -4px -4px -6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.projects::-webkit-scrollbar { display: none; }
.projects > .card { flex: 0 0 calc((100% - 16px) / 2); scroll-snap-align: start; }
@media (min-width: 1360px) { .projects > .card { flex-basis: calc((100% - 32px) / 3); } }

.carousel__nav { display: flex; gap: 8px; order: 1; flex: none; }
.carousel__btn {
  width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
.carousel__btn svg { width: 16px; height: 16px; }
.carousel__btn:hover:not(:disabled) { background: var(--panel-hover); border-color: var(--accent-2); }
.carousel__btn:disabled { opacity: .3; cursor: default; }

.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.carousel__dots[hidden] { display: none; }
.carousel__dot {
  width: 22px; height: 3px; padding: 0; border: 0; border-radius: 2px;
  background: var(--line-strong); cursor: pointer;
  transition: background .25s var(--ease), width .25s var(--ease);
}
.carousel__dot:hover { background: var(--text-faint); }
.carousel__dot.is-active { background: var(--accent-2); width: 34px; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.projects .card:nth-child(1) { --card-accent: var(--accent-3); }
.projects .card:nth-child(2) { --card-accent: var(--accent); }
.projects .card:nth-child(3) { --card-accent: var(--accent-2); }
.projects .card:nth-child(4) { --card-accent: var(--accent-3); }
.projects .card:nth-child(5) { --card-accent: var(--accent-4); }
.card:hover {
  transform: translateY(-3px); background: var(--panel-hover);
  border-color: var(--card-accent, var(--accent));
  box-shadow: 0 22px 46px -30px var(--card-accent, var(--accent));
}
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card__top .logo-chip { opacity: 1; height: 56px; width: 96px; padding: 8px 10px; }
.card__arrow { color: var(--card-accent, var(--accent)); opacity: .7; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.card__arrow svg { width: 16px; height: 16px; }
.card:hover .card__arrow { transform: translate(3px, -3px); opacity: 1; }
.card h3 { font-size: 1.1rem; }
.card p { font-size: .92rem; color: var(--text-dim); max-width: 62ch; }
.card__tag { margin-top: auto; color: var(--card-accent, var(--accent)); }

.app-icon {
  flex: none; width: 104px; height: 104px; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9);
  transition: transform .3s var(--ease);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
/* même gabarit que les pastilles de logo dans une carte simple */
.card__top .app-icon { width: 56px; height: 56px; border-radius: 15px; }
.card:hover .app-icon { transform: scale(1.03); }

/* --- Contact -------------------------------------------------------------- */
.contact { text-align: center; }
.contact h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.04em; margin-bottom: 20px; }
.contact p { font-size: 1.05rem; color: var(--text-dim); max-width: 52ch; margin: 0 auto 34px; }

/* l'en-tête suit : le filet encadre le titre au lieu de le suivre */
.contact .section__head { justify-content: center; }
.contact .section__head::before {
  content: ""; height: 1px; flex: 1; opacity: .55;
  background: linear-gradient(270deg, var(--section-accent, var(--accent)), rgba(0, 112, 240, .25), transparent 92%);
}

.contact__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.mailto {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: clamp(.9rem, 2.2vw, 1.05rem);
  letter-spacing: -.01em; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 4px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.mailto:hover { color: var(--accent-3); border-color: var(--accent-3); }

/* --- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 30px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer a { color: var(--text-faint); text-decoration: none; transition: color .2s var(--ease); }
.footer a:hover { color: var(--accent-3); }
.footer__links { display: flex; gap: 20px; }

/* --- Reveal --------------------------------------------------------------- */
/* only hidden when JS can bring them back */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .timeline--h .entry { flex-basis: 86%; }
  .hero { min-height: 0; display: block; padding-top: 116px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { order: -1; max-width: 260px; justify-self: center; }
  .about__grid { grid-template-columns: 1fr; }
  .projects > .card { flex-basis: 86%; }
}

@media (max-width: 760px) {
  .brand__logo { height: 30px; }
  .burger { display: inline-flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px var(--pad) 26px;
    background: var(--bg-top);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 12px 8px; font-size: 1rem; }
  .nav__link.is-active::after { display: none; }

  .entry { grid-template-columns: 1fr; gap: 10px; }
  .entry__period { padding-top: 0; }
  .section__head { flex-wrap: wrap; gap: 10px 14px; }
}

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