/* ftml.fr – page de présentation personnelle. Volontairement basique : une colonne, polices du système, aucune image décorative.
   Le thème (clair ou sombre) suit le réglage de l'appareil du visiteur. */

:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }   /* choix fait avec le bouton (js/theme.js) */
:root[data-theme="dark"]  { color-scheme: dark; }

:root {
  /* Palette propre à ftml.fr (« Sauge » : échelle Sage 50 à 900, vert sauge). Contrastes mesurés le 30/11/2026 (WCAG AA) :
     clair : texte 15,0:1, secondaire 7,5:1, liens 5,9:1 (5,1:1 sur le fond de page), contour des champs 3,7:1 ; sombre : texte 13,8:1, liens 8,4:1.
     Échelle d'origine : 50 #EBFDE8, 100 #DEF2DB, 200 #CADFC6, 300 #AEC5AB, 400 #90AA8D, 500 #6E8A6A (3,8:1 sur blanc : jamais pour du texte),
     600 #5B7457, 700 #445941, 800 #2E402C, 900 #1A2818. Lien clair = #4F6A4B (entre 600 et 700, pour tenir 4,5:1 sur le fond de page).
     Palette précédente « Sapin » : bg #ece7da/#111a15, card #fffdf8/#18241d, soft #f4efe2/#1f2f27, ink #1b2a23/#ebe8dd, muted #566a5f/#a2b4a9,
     line #d9d1bd/#2b3e34, accent #1d6a4c/#6fcf9d, accent-ink #fff/#07140d, field-border #7a8a7e/#7f9487.
     Palette d'origine (celle de fabvideo.fr) : bg #e4edef/#0a1a20, card #fff/#0f242b, soft #eef4f5/#143039, ink #0e2329/#e9f1f2,
     muted #46636b/#9db6bb, line #d1e0e3/#1f3d47, accent #b83c0a/#f08a3c, accent-ink #fff/#1b1008, field-border #6b8a92/#7a979e. */
  --bg:           light-dark(#DEF2DB, #111A10);
  --card:         light-dark(#FAFDF9, #1A2818);
  --soft:         light-dark(#EBF5E8, #25362A);
  --ink:          light-dark(#1A2818, #EBF5E8);
  --muted:        light-dark(#445941, #AEC5AB);
  --line:         light-dark(#CADFC6, #34493A);
  --accent:       light-dark(#4F6A4B, #AEC5AB);
  --accent-ink:   light-dark(#FFFFFF, #1A2818);
  --field-border: light-dark(#6E8A6A, #90AA8D);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; font-size: 112.5%; }

body {
  margin: 0;
  font: 1rem/1.65 var(--font);
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--accent); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 5; padding: .5rem 1rem; background: var(--card); border-radius: 6px; }
.skip:focus { left: .5rem; }

.wrap {
  width: min(62rem, 100%);
  margin: clamp(0rem, 4vw, 2.5rem) auto;
  padding: clamp(1.25rem, 5vw, 3rem) max(1rem, env(safe-area-inset-left, 0px)) clamp(1.25rem, 5vw, 3rem) max(1rem, env(safe-area-inset-right, 0px));
  background: var(--card);
}
@media (min-width: 46rem) { .wrap { border-radius: 14px; padding-inline: 3rem; box-shadow: 0 1px 2px rgb(26 40 24 / .07), 0 12px 40px rgb(26 40 24 / .12); } }

/* En-tête */
.profile { display: flex; align-items: center; gap: 1.25rem; }
.profile > div { flex: 1; min-width: 0; }

.theme-toggle {
  flex: none; align-self: flex-start; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  color: var(--ink); background: var(--soft); border: 1px solid var(--field-border); border-radius: 50%; cursor: pointer;
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle .ico { width: 1.3rem; height: 1.3rem; }

/* Icônes (inline, issues de Lucide, licence ISC) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { flex: none; width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo { flex: none; width: 5.5rem; height: 5.5rem; object-fit: cover; object-position: 50% 30%; border-radius: 50%; }
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.headline { margin-top: .35rem; color: var(--muted); }
/* Très petit écran (iPhone SE...) : photo et bouton clair/sombre sur une ligne, le texte dessous sur toute la largeur */
@media (max-width: 26rem) {
  .profile { flex-wrap: wrap; row-gap: 1rem; }
  .profile .photo { order: 1; }
  .profile .theme-toggle { order: 2; margin-left: auto; }
  .profile > div { order: 3; flex: 1 0 100%; }
}
.intro { margin-top: 1.5rem; max-width: 38rem; }
.actions { margin-top: 1.25rem; }

.btn {
  display: inline-block; padding: .65rem 1.25rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--accent-ink); background: var(--accent);
  border: 2px solid var(--accent); border-radius: 999px;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); filter: brightness(.92); }
.btn.ghost { color: var(--accent); background: transparent; }

/* Sections */
section { margin-top: 2.75rem; }
h2 { display: flex; align-items: center; gap: .6rem; padding-bottom: .4rem; margin-bottom: 1.25rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; border-bottom: 1px solid var(--line); }
h2 .ico { color: var(--accent); }
h3 { font-size: 1.05rem; line-height: 1.3; }
.small { font-size: .9rem; color: var(--muted); }

/* Projets */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.project { padding: 1.1rem 1.25rem; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.project p { margin-top: .4rem; }
.project .more { font-weight: 600; }
.project .small { margin-top: .6rem; }

/* Parcours */
.job { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .25rem 1.25rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.when { color: var(--muted); font-size: .9rem; }
.where { color: var(--muted); font-size: .95rem; }
.job p + p, .job ul { margin-top: .4rem; }
.job ul { list-style: disc; padding-left: 1.15rem; }
.job li + li { margin-top: .3rem; }
@media (max-width: 36rem) { .job { grid-template-columns: 1fr; } }

.plain li + li { margin-top: .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips a { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--field-border); border-radius: 999px; text-decoration: none; font-weight: 600; }
.chips a:hover { background: var(--soft); }

/* Logos des marques : toujours sur une pastille blanche, en clair comme en sombre, pour rester lisibles et homogènes */
.logos { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.logo {
  display: block; height: 1.9rem; width: auto; max-width: 100%; padding: .3rem .5rem; box-sizing: border-box;
  object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.job .side { min-width: 0; }
.job .side .when { margin-top: .15rem; }
.job .side .logos { margin-top: .5rem; }

/* Distinctions et presse : plus d'air, même présentation partout (logo à gauche, texte à droite) */
.presse-bloc + .presse-bloc { margin-top: 2.5rem; }
.presse-bloc > h3 { margin-bottom: .35rem; }
.presse-bloc > .small { max-width: 40rem; }
.entries { margin-top: 1.25rem; display: grid; gap: 1.5rem; }
.entry { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.entry .logos { margin-top: .1rem; }
.entry p + p { margin-top: .3rem; }
.entry .what { font-weight: 700; line-height: 1.35; }
.entries.compact .entry { grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; }   /* presse : petites icônes, texte plus proche */
@media (max-width: 36rem) { .entry, .entries.compact .entry { grid-template-columns: 1fr; gap: .5rem; } }

/* Mentions */
.legal h3 { margin: 1.25rem 0 .35rem; }
.legal p + p { margin-top: .6rem; }
#stats-status { margin-top: .75rem; font-weight: 600; }

.foot { padding: 0 1rem 2rem; text-align: center; font-size: .85rem; color: var(--muted); }
.foot a { display: inline-block; padding: .7rem .5rem; }

/* Grands écrans : page plus large, photo plus grande, colonne des dates plus aérée (placé en fin de fichier pour l'emporter) */
@media (min-width: 64rem) {
  .wrap { padding-inline: 4.5rem; }
  .photo { width: 7.5rem; height: 7.5rem; }
  .profile { gap: 2rem; }
  .intro { max-width: 46rem; font-size: 1.05rem; }
  .job { grid-template-columns: 11rem minmax(0, 1fr); gap: .25rem 2rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
