/* ── Polices auto-hébergées ──────────────────────────────────────
   Servies depuis le domaine plutôt que depuis fonts.gstatic.com : aucune
   adresse IP de visiteur ne part chez un tiers, et le site n'a plus aucune
   dépendance externe. DM Sans et Nunito sont variables — un seul fichier
   couvre toute la plage de graisses. Sous-ensembles latin et latin-ext
   (les accents du français et du portugais vivent dans latin-ext).
   font-display: swap — le texte reste lisible pendant le chargement. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
  --bg:       #F7F7F6;
  --bg2:      #FFFFFF;
  --bg3:      #F0EFED;
  --border:   #E4E3DF;
  --border2:  #D0CFC9;
  --text:     #1A1917;
  --text2:    #6B6860;
  --text3:    #A8A69F;
  --green:    #1A7A55;
  --green-bg: #EAF4EF;
  --green-bd: #B8DECA;
  --amber:    #A85C00;
  --amber-bg: #FEF3E2;
  --amber-bd: #F5D08A;
  --blue:     #1A5CA8;
  --blue-bg:  #EBF2FE;
  --blue-bd:  #AECBF5;
  --li:       #0A66C2;
  --li-dark:  #004182;
  --r:  6px;
  --r2: 10px;
  --r3: 14px;

  /* Fond de page. --grid-dot: transparent pour désactiver la trame partout. */
  --grid-dot:  rgba(168, 166, 159, 0.30);
  --grid-step: 26px;
}

html {
  scroll-behavior: smooth;
  /* le halo du hero déborde volontairement de la colonne : on le coupe aux bords de
     l'écran, sinon il ouvre une barre de défilement horizontale entre 800 et 1200px.
     Sur html et non sur body : le débordement de body est propagé à la fenêtre.
     `clip` et non `hidden` : pas de conteneur de défilement, la nav sticky survit. */
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Trame de points : même vocabulaire que les schémas d'architecture.
   Fixe et non animée — le fond habille la page, il ne la fait pas bouger.
   position:fixed la sort du flux : sans ça elle deviendrait un item du flex body. */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: var(--grid-step) var(--grid-step);
  /* s'efface vers le bas : présente derrière l'en-tête, absente sous le corps de texte */
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 62%);
  mask-image: linear-gradient(to bottom, #000, transparent 62%);
}
/* Sur petit écran l'écran est déjà dense : on rend le fond au texte. */
@media (max-width: 760px) { body::before { display: none; } }

/* NAV */
nav {
  background: rgba(247,247,246,0.92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  line-height: 1;
}
.nav-cta-inner { display: flex; align-items: center; gap: 6px; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: navDotPulse 2s ease-in-out infinite; }
@keyframes navDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 122, 85, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(26, 122, 85, 0); }
}
@media (prefers-reduced-motion: reduce) { .nav-dot { animation: none; } }
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links a {
  font-size: 13.5px; font-weight: 400; color: var(--text2);
  text-decoration: none; padding: 6px 14px;
  border-radius: 0; transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-cta {
  font-size: 13.5px; font-weight: 500;
  color: var(--text); background: var(--bg2);
  border: 1px solid var(--border);
  text-decoration: none; padding: 6px 15px;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  margin-left: 8px;
}
.nav-cta:hover {
  background: var(--text); color: var(--bg2); border-color: var(--text);
  transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.nav-cta svg { width: 14px; height: 14px; }

/* Sélecteur de langue — segmented control.
   Angles vifs : il est présent sur les 29 pages, il suit donc la charte du site
   plutôt que sa propre forme. */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  margin: 0 0 0 1.25rem; padding: 2px;   /* collé au bord droit, détaché des liens */
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 0;
}
.lang-switch a {
  font-family: 'DM Mono', monospace; font-size: 11px;
  font-weight: 500; line-height: 1; letter-spacing: 0.02em;
  color: var(--text3); text-decoration: none;
  padding: 5px 9px; border-radius: 0;
  transition: color 0.15s, background 0.15s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.on {
  color: var(--text); background: var(--bg2);
  box-shadow: 0 1px 2px rgba(26, 25, 23, 0.06);
}

/* LAYOUT */
main { flex: 1; max-width: 960px; margin: 0 auto; padding: 0 2rem; width: 100%; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

/* SECTIONS */
.section { padding: 4rem 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section-label {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text3); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 500;
  letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 0.75rem;
}
.section-sub {
  font-size: 15px; color: var(--text2); line-height: 1.75;
  max-width: 540px; margin-bottom: 2.5rem; font-weight: 300;
}

/* SCROLL-REVEAL (activé par reveal.js via <html class="reveal-on">) */
html.reveal-on :where(.door, .post-card, .pf-card, .tl-entry, .svc, .about-solo, .pf-section-head, #projets .mission) {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.reveal-on .reveal-in { opacity: 1; transform: none; }
/* Signature : H1 mot-à-mot */
html.reveal-on h1[data-words] { animation: none; }
h1[data-words] .rw { display: inline-block; }
html.reveal-on h1[data-words] .rw {
  opacity: 0; transform: translateY(0.4em);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.reveal-on h1[data-words].rw-in .rw { opacity: 1; transform: none; }

/* BUTTONS — angles vifs, comme les boutons du portfolio. Seul .pill garde
   sa forme arrondie : ce sont des étiquettes de contenu, pas des actions. */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 10px 20px; border-radius: 0;
  transition: opacity 0.15s, background 0.15s;
}
.btn-dark { background: var(--text); color: var(--bg2); }
.btn-dark:hover { opacity: 0.82; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-outline:hover { background: var(--bg3); color: var(--text); }
.btn-li { background: var(--li); color: #FFFFFF; }
.btn-li:hover { background: var(--li-dark); }

/* PILLS */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: 'DM Mono', monospace; font-size: 11px;
  padding: 4px 11px; background: var(--bg2);
  border: 1px solid var(--border2); border-radius: var(--r); color: var(--text2);
}
.pill.hi { color: var(--text); background: var(--bg3); font-weight: 500; }

/* LANG TAGS */
.lang {
  font-family: 'DM Mono', monospace; font-size: 10px;
  padding: 2px 8px; border: 1px solid var(--border);
  border-radius: 3px; color: var(--text3); background: var(--bg3);
}

/* ABOUT LINKS */
.about-links { display: flex; flex-direction: column; gap: 7px; }
.about-link {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text3); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.15s; white-space: nowrap;
}
.about-link:hover { color: var(--text); }
.about-link svg { width: 13px; height: 13px; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: auto; }
.footer-inner {
  max-width: 960px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: 'Nunito', sans-serif;
  color: var(--text2); text-decoration: none;
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1; gap: 2px;
}
.footer-logo .logo-top { font-size: 13px; font-weight: 900; letter-spacing: -0.02em; }
.footer-logo .logo-top .p { color: var(--green); }
.footer-logo .logo-bot { font-size: 6.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.22em; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { font-size: 13px; color: var(--text3); text-decoration: none; transition: color 0.15s; }
.footer-nav a:hover { color: var(--text); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-family: 'DM Mono', monospace; font-size: 11.5px; color: var(--text3); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .footer-nav { display: none; }
}
