/* Point d'entrée des styles. Le build assemble ces fichiers, dans cet ordre, en un seul css/main.css. */

/* Base : polices, variables, remise à zéro, styles de texte et animations partagés */
/*
  Polices Inter (texte) et Anton (titres), hébergées sur le site (public/assets/fonts) au lieu de Google Fonts :
  premier affichage plus rapide et aucune requête vers Google. Mêmes plages de caractères que Google Fonts ;
  le navigateur ne télécharge que le fichier dont la page a besoin.
  Licences : Inter-LICENSE.txt et Anton-LICENSE.txt (SIL OFL 1.1).
*/
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-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: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/anton-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: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/anton-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;
}

/* Variables du site : couleurs, typographie, espacements, animations. Chaque valeur n'est écrite qu'ici. */
:root {
  /* Fonds */
  --color-bg: #0b0f1a;
  --color-bg-deep: #080b14;
  --color-panel: #111827;
  --color-surface: #0b0f1a;
  --color-surface-hover: #151d2e;
  --color-chip: #1c2333;
  --color-overlay: rgba(255, 255, 255, .08);

  /* Textes */
  --color-text: #ffffff;
  --color-title: #f2f5fa;
  --color-card-title: #d5dbe6;
  --color-text-light: #e6eaf2;
  --color-text-footer: #c9d1e0;
  --color-text-muted: #a3acbd;
  --color-text-soft: #8c95a8;
  --color-text-subtle: #8c95a8;
  --color-text-placeholder: #6b7489;

  /* Accents (couleurs du logo LH) et états */
  --color-accent: #00c8ff;
  --color-accent-hover: #4dd8ff;
  --color-accent-2: #a8e000;
  --color-danger: #ff8a6b;

  /* Traits et bordures, du plus discret au plus marqué */
  --line-footer: #1c2333;
  --line-header: #1c2333;
  --line-drawer: #1c2333;
  --line: #1c2333;
  --line-header-scrolled: #2a3346;
  --line-control: #2a3346;
  --line-button: #2a3346;
  --line-button-hover: #3a4458;
  --line-surface: #1c2333;

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --title-size: clamp(26px, 6vw, 34px);

  /* Mise en page : largeur maximale, marges et rayons */
  --page-width: 1360px;
  --gutter: 24px;
  --page-gap: 24px;
  --pad-panel: 32px;
  --pad-card: 24px;
  --pad-strip: 20px 32px;
  --radius-sm: 4px;
  --radius-field: 6px; /* champs de formulaire : angles plus nets pour contraster avec les cartes et boutons arrondis */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Contour des éléments atteints au clavier */
  --focus-ring: 2px solid var(--color-accent-hover);
  --focus-ring-offset: 2px;

  /* Animations : durée et courbe des changements d'état (survol, focus), apparitions au défilement */
  --ease-out: cubic-bezier(.25, .46, .45, .94);
  --ease-reveal: cubic-bezier(.4, 0, .6, 1);
  --ease-snap: cubic-bezier(.32, .72, 0, 1);
  --transition-fast: .1s var(--ease-out);
  --transition: .16s var(--ease-out);
  --transition-slide: .32s var(--ease-snap);
  --reveal-offset: 28px;
  --reveal-stagger: 110ms;
}

/* Petits écrans : marges intérieures plus serrées */
@media (max-width: 640px) {
  :root {
    --pad-panel: 24px;
    --pad-card: 20px;
    --pad-strip: 18px 24px;
    --gutter: 16px;
    --page-gap: 16px;
  }
}

/* Remise à zéro et règles globales. */
* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Colonne sur toute la hauteur de l'écran : main prend la place libre, le pied de page reste en bas sur les pages courtes (404) */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-feature-settings: 'cv01', 'ss03';
  line-height: 1.5;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--color-text);
}

ul {
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

a {
  color: var(--color-text-footer);
  text-decoration: none;
}

a:hover {
  color: var(--color-text);
}

/* L'attribut hidden l'emporte toujours, même sur un élément en display:flex */
[hidden] {
  display: none !important;
}

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

/* Styles de texte partagés par plusieurs blocs. Les tailles propres à un seul bloc restent dans son fichier. */

/* Texte courant : paragraphes des pages de contenu */
.text-body {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* Petit texte : description d'une carte, d'une étape du parcours ou d'un projet */
.text-small {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* Mot mis en couleur dans un titre */
.text-accent {
  color: var(--color-accent);
}

/* Mot en contour cyan dans un titre (Services, Contact) */
.text-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-accent);
}

/*
  Contour des éléments atteints au clavier (touche Tab), défini une seule fois pour tous les composants.
  Les autres liens gardent le contour par défaut du navigateur. Les champs de formulaire signalent
  le focus par leur bordure (components/form.css) et le bouton du menu mobile a son propre décalage
  (layout/header.css).
*/
.btn:focus-visible,
.pill-link:focus-visible,
a.lang-switch__item:focus-visible,
.lang-switch__item:focus-visible,
.project__media:focus-visible,
.lightbox button:focus-visible,
.logo-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/*
  Apparitions au défilement, pilotées par js/modules/reveal.js et js/modules/fade-images.js (images marquées data-fade-img).
  L'état de départ (décalé, transparent) n'est appliqué que si le JavaScript est actif (classe .js),
  pour que le contenu reste visible sans lui.
*/

/* data-reveal="1", "2", "3" : le bloc remonte à sa place, avec un léger décalage entre voisins */
[data-reveal] {
  position: relative;
}

.js [data-reveal] {
  top: var(--reveal-offset);
  transition: top .5s var(--ease-reveal);
}

.js [data-reveal="2"],
.js [data-reveal="2"] [data-fade-img="sync"] {
  transition-delay: var(--reveal-stagger);
}

.js [data-reveal="3"],
.js [data-reveal="3"] [data-fade-img="sync"] {
  transition-delay: calc(var(--reveal-stagger) * 2);
}

.js [data-reveal].is-revealed {
  top: 0;
}

/* data-fade-img : l'image apparaît en fondu une fois chargée */
.js [data-fade-img] {
  opacity: 0;
  transition: opacity 1.15s ease-out;
}

.js [data-fade-img].is-loaded {
  opacity: 1;
}


/* Layout : briques de mise en page et structure commune à toutes les pages */
/*
  Briques de mise en page. Elles s'ajoutent à la classe d'un bloc, qui règle leurs variables :
    <div class="stack contact__info">   avec   .contact__info { --stack-gap: 24px; }
  Un bloc qui utilise une brique règle toujours sa variable d'espacement : sans cela, il hériterait
  de celle d'un bloc parent.
*/

/* Empile ses enfants à la verticale, séparés par --stack-gap */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 16px);
}

/* Aligne ses enfants en ligne, avec retour à la ligne, séparés par --cluster-gap */
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cluster-gap, 16px);
}

/* Grille dont le nombre de colonnes suit la largeur : chaque colonne fait au moins --grid-min */
.auto-grid {
  display: grid;
  /* min(..., 100%) : sur un écran plus étroit que --grid-min, la colonne prend toute la largeur sans déborder */
  grid-template-columns: repeat(auto-fit, minmax(min(var(--grid-min, 300px), 100%), 1fr));
  gap: var(--grid-gap, 24px);
}

/* Colonne de contenu limitée en largeur et centrée dans la page, comme les autres blocs du site.
   --column-width est réglée par chaque page (css/pages) */
.column {
  max-width: var(--column-width);
  margin-inline: auto;
}

/* En-tête : barre fixe en haut de page, navigation, menu mobile. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--color-bg);
  border-bottom: 1px solid var(--line-header);
  transition: background-color .35s ease, border-color .35s ease;
}

/* Dès que la page défile, l'en-tête devient translucide (classe posée par js/modules/header.js) */
.site-header.is-scrolled {
  background-color: rgba(11, 15, 26, .78);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom-color: var(--line-header-scrolled);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 16px var(--gutter);
}

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

/* Liens du tiroir mobile : mêmes couleurs que les liens pastilles de la barre (components/pill-link.css) */
.drawer__link {
  color: var(--color-text-subtle);
}

.drawer__link:hover,
.drawer__link[aria-current="page"],
.site-nav__link[aria-current="page"] {
  color: var(--color-text);
}

.site-header .logo-link {
  --logo-height: 40px;
}

/* Navigation principale (écrans larges) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}

.site-nav__cta {
  margin-left: 12px;
}

/* Menu mobile : une case à cocher invisible ouvre le tiroir, sans JavaScript */
.site-header__toggle {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  cursor: pointer;
}

.burger__bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform .25s ease;
}

.burger__bar:nth-child(2) {
  transition: opacity .2s ease;
}

.site-header__toggle:focus-visible ~ .site-header__bar .burger {
  outline: var(--focus-ring);
  outline-offset: -4px;
  border-radius: var(--radius-lg);
}

.drawer {
  display: none;
  max-width: var(--page-width);
  margin: 0 auto;
  flex-direction: column;
  padding: 4px var(--gutter) 22px;
  background: var(--color-bg);
}

.drawer__link {
  padding: 15px 0;
  border-bottom: 1px solid var(--line-drawer);
  font-size: 16px;
  font-weight: 600;
}

.drawer__cta {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .site-header__toggle:checked ~ .drawer {
    display: flex;
  }

  /* Les trois barres se croisent pour former une croix */
  .site-header__toggle:checked ~ .site-header__bar .burger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header__toggle:checked ~ .site-header__bar .burger__bar:nth-child(2) {
    opacity: 0;
  }

  .site-header__toggle:checked ~ .site-header__bar .burger__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Pied de page (gabarit : templates/partials/footer.njk). */
.site-footer {
  --cluster-gap: 24px;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: var(--page-gap);
  /* Trait sur toute la largeur de l'écran, comme sous l'en-tête. Le contenu reste aligné sur les cartes :
     la marge intérieure s'agrandit au-delà de --page-width */
  padding: 40px max(var(--gutter), calc((100% - var(--page-width)) / 2 + var(--gutter)));
  border-top: 1px solid var(--line-header);
  color: var(--color-text-subtle);
  font-size: 13.5px;
}

.site-footer__nav {
  --cluster-gap: 14px 32px; /* lignes rapprochées quand les liens passent sur deux lignes (mobile) */
}

.site-footer__link {
  color: var(--color-text-footer);
  transition: color var(--transition-fast);
}

.site-footer__link:hover,
.site-footer__link[aria-current="page"] {
  color: var(--color-text);
}

/* Structures de page partagées. */

/* Contenu centré, limité en largeur, avec des marges sur les côtés */
.page-width {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--page-gap) var(--gutter) 0;
}

/* Sections empilées, séparées par le même espace que les marges de page */
.page-stack {
  --stack-gap: var(--page-gap);
}

/* Grandes sections : leurs blocs intérieurs sont espacés de façon régulière */
.panel.stack {
  --stack-gap: 28px;
}

/*
  En-tête d'une section (macro sectionHead) : titre à gauche, trait et numéro à droite.
  Le titre est aussi utilisé seul en haut des pages Services, Contact et Mentions légales.
*/
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-head__title {
  color: var(--color-title);
  font-family: var(--font-display);
  font-size: var(--title-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-head__num {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  color: var(--color-accent-2);
  font-size: 16px;
  font-weight: 600;
}

.section-head__line {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--color-text-light);
}

/* Haut de page : titre, puis chapeau sur toute la largeur (Services) */
.page-head {
  --stack-gap: 20px;
}

.page-head__lead {
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.7;
}


/* Composants réutilisables */
/* Logo LH (macro logo). Sa hauteur se règle avec --logo-height sur le bloc qui le contient. */
.logo {
  display: block;
  width: auto;
  height: var(--logo-height, 32px);
}

/* Lien vers l'accueil autour du logo (macro logoLink) : pas d'espace sous l'image */
.logo-link {
  display: flex;
  align-items: center;
}

/* Lien gris en forme de pastille, qui s'éclaire au survol : liens du menu. */
.pill-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--color-text-subtle);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.pill-link:hover {
  background: var(--color-overlay);
  color: var(--color-text);
}

/* Boutons : .btn avec une variante de couleur (--primary, --ghost, --dark) et de taille (--sm, --lg). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn[disabled] {
  opacity: .6;
  cursor: default;
}

/* Tailles */
.btn--sm {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--lg {
  height: 50px;
  font-size: 16px;
}

/* Couleurs */
.btn--primary,
.btn--primary:hover {
  color: var(--color-bg);
}

.btn--primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.btn--primary:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
}

.btn--ghost,
.btn--ghost:hover {
  color: var(--color-text);
}

.btn--ghost {
  border-color: var(--line-button);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--line-button-hover);
  background: var(--color-overlay);
}

/* Bouton foncé, posé sur le bandeau cyan de fin de page */
.btn--dark,
.btn--dark:hover {
  color: var(--color-text);
}

.btn--dark {
  background: var(--color-bg);
}

.btn--dark:hover {
  background: var(--color-chip);
}

/* Lien suivi d'une flèche qui glisse vers la droite au survol (lien texte, ou bouton avec .btn) */
.arrow-link:not(.btn),
.arrow-link:not(.btn):hover {
  color: var(--color-text);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.arrow-link__icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .2s var(--ease-out);
}

.arrow-link:hover .arrow-link__icon,
.arrow-link:focus-visible .arrow-link__icon {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .arrow-link__icon {
    transition: none;
  }
}

/*
  Sélecteur de langue FR / EN : deux cases de même largeur et une pastille qui marque la langue affichée.
  Au survol (ou au focus clavier) de l'autre langue, la pastille glisse vers elle et les couleurs s'échangent.
*/
.lang-switch {
  --lang-switch-pad: 3px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--lang-switch-pad);
  border: 1px solid var(--line-button);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  transition: border-color var(--transition);
}

/* Même bordure que les boutons secondaires (.btn--ghost), qui s'éclaircit au survol de l'autre langue */
.lang-switch:has(a.lang-switch__item:is(:hover, :focus-visible)) {
  border-color: var(--line-button-hover);
}

/* Pastille : occupe une case, placée sur la première par défaut */
.lang-switch::before {
  content: "";
  position: absolute;
  inset: var(--lang-switch-pad) auto var(--lang-switch-pad) var(--lang-switch-pad);
  width: calc(50% - var(--lang-switch-pad));
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: translate var(--transition-slide);
}

/* Langue affichée en seconde position, ou seconde case survolée : la pastille passe à droite */
.lang-switch:has(.lang-switch__item:nth-child(2)[aria-current])::before,
.lang-switch:has(a.lang-switch__item:nth-child(2):is(:hover, :focus-visible))::before {
  translate: 100% 0;
}

/* Première case survolée : la pastille revient à gauche */
.lang-switch:has(a.lang-switch__item:first-child:is(:hover, :focus-visible))::before {
  translate: 0 0;
}

.lang-switch__item {
  position: relative;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  text-align: center;
  color: var(--color-text-subtle);
  transition: color var(--transition-slide); /* même durée et même courbe que la pastille */
}

/* Le texte blanc suit la pastille */
.lang-switch__item[aria-current],
a.lang-switch__item:is(:hover, :focus-visible) {
  color: var(--color-text);
}

.lang-switch:has(a.lang-switch__item:is(:hover, :focus-visible)) .lang-switch__item[aria-current] {
  color: var(--color-text-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch::before,
  .lang-switch__item {
    transition: none;
  }
}

/*
  Grandes cartes (.panel) : chaque section de page. Petites cartes (.card) : compétences, projets, offres.
  Les marges intérieures viennent des variables --pad-panel et --pad-card (base/variables.css).
*/
.panel {
  border: 1px solid var(--line-surface);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  padding: var(--pad-panel);
}

.card {
  position: relative;
  border: 1px solid var(--line-surface);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--pad-card);
}

/* Halo au survol, posé au-dessus de la bordure (même effet que sur le site DOT) */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: background-color var(--transition), border-color var(--transition);
}

.card:hover::before {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
}

/* Titre d'une carte : gris clair au repos, blanc au survol de la carte */
.card__title {
  color: var(--color-card-title);
  font-size: 16px;
  font-weight: 700;
  transition: color var(--transition);
}

.card:hover .card__title {
  color: var(--color-text);
}

/* Étiquette d'une technologie */
.tags {
  --cluster-gap: 8px;
  list-style: none;
}

.tag {
  padding: 4px 12px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  font-size: 13px;
}

/* Bandeau de fin de page (macro cta) : fond cyan, titre et bouton foncé. */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: var(--pad-strip);
  border-radius: var(--radius-xl);
  background: var(--color-accent);
}

.cta__title {
  color: var(--color-bg);
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Champs de formulaire. */

/* Un libellé au-dessus de son champ. S'ajoute à .stack. */
.field {
  --stack-gap: 6px;
  min-width: 0;
}

.field__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
}

/* Habillage commun aux champs de saisie (.input) et au bouton accolé à un champ (.input-addon) */
.input,
.input-addon {
  border: 1px solid var(--line-control);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14.5px;
}

.input {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius-field);
}

.input::placeholder {
  color: var(--color-text-placeholder);
}

.input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.input--sm {
  padding: 10px 12px;
  font-size: 14px;
}

/* Zone de texte : sa hauteur suit le contenu (js/utils/dom.js, autoGrow) */
.input--area {
  min-height: 132px;
  overflow: hidden;
  line-height: 1.55;
  resize: none;
}

.form-error {
  color: var(--color-danger);
  font-size: 13.5px;
}

.form-error--sm {
  font-size: 13px;
}

/* Visionneuse d'image plein écran, avec flèches pour les projets à plusieurs images (js/modules/lightbox.js). */
[data-lightbox] {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: rgba(0, 0, 0, .94);
  cursor: zoom-out;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lightbox__caption {
  color: var(--color-text-footer);
  font-size: 14px;
  text-align: center;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8vw - 40px);
  border-radius: var(--radius-sm);
  object-fit: contain;
  opacity: 0;
  transition: opacity .45s ease-out;
}

.lightbox__image.is-loaded {
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-button);
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: var(--color-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Flèches et compteur des projets à plusieurs images */
.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-button);
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: var(--color-text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 24px;
}

.lightbox__nav--next {
  right: 24px;
}

.lightbox__count {
  position: absolute;
  top: 36px;
  left: 28px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}


/* Styles propres à chaque page */
/* Page d'accueil (le portfolio). */

/*
  01 Grand titre : "PORT" plein passe derrière la photo, "FOLIO" en contour passe devant.
  Les deux couches de mots (.hero__words) ont la même mise en page pour se superposer exactement.
*/
.hero {
  --hero-word: clamp(72px, 13vw, 190px);
  position: relative;
  height: 540px;
  padding: 0;
  overflow: hidden;
}

.hero__words {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px 70px;
}

.hero__words--front {
  z-index: 3;
  pointer-events: none;
}

.hero__word {
  color: var(--color-title);
  font-family: var(--font-display);
  font-size: var(--hero-word);
  line-height: 1;
}

.hero__word--ghost,
.hero__word--hidden {
  color: transparent;
}

.hero__word--outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-accent);
}

.hero__photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: auto;
  height: 95%;
  transform: translateX(-50%);
}

.hero__id,
.hero__link {
  position: absolute;
  bottom: 44px;
  z-index: 4;
}

.hero__id {
  left: 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: inherit;
  letter-spacing: 0;
}

.hero__name {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
}

.hero__role {
  color: var(--color-accent-2);
  font-size: 16px;
  font-weight: 500;
}

.hero__link {
  right: 48px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 600;
}

/*
  Animation d'arrivée du hero, au chargement de la page :
  PORT glisse depuis la gauche, FOLIO depuis la droite (les deux couches de mots bougent ensemble pour rester superposées),
  puis la photo monte, puis le nom et le lien apparaissent. "translate" est utilisé plutôt que "transform"
  pour ne pas écraser le centrage de la photo (transform: translateX(-50%)).
*/
@keyframes hero-from-left {
  from { opacity: 0; translate: -80px 0; filter: blur(6px); }
}

@keyframes hero-from-right {
  from { opacity: 0; translate: 80px 0; filter: blur(6px); }
}

@keyframes hero-rise {
  from { opacity: 0; translate: 0 40px; }
}

.hero__words .hero__word:first-child {
  animation: hero-from-left .9s cubic-bezier(.2, .8, .2, 1) .1s both;
}

.hero__words .hero__word:last-child {
  animation: hero-from-right .9s cubic-bezier(.2, .8, .2, 1) .1s both;
}

.hero__photo {
  animation: hero-rise 1s cubic-bezier(.2, .8, .2, 1) .3s both;
}

.hero__id,
.hero__link {
  animation: hero-rise .7s cubic-bezier(.2, .8, .2, 1) .8s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero__words .hero__word,
  .hero__photo,
  .hero__id,
  .hero__link {
    animation: none;
  }
}

@media (max-width: 640px) {
  /* Sur mobile, PORTFOLIO passe au-dessus de la tête et un dégradé sombre rend le nom lisible sur la photo */
  .hero {
    --hero-word: 18vw; /* PORTFOLIO remplit la largeur et tient même sur les petits écrans (320 px) */
  }

  .hero__words {
    align-items: flex-start;
    padding: 36px 24px 0;
  }

  .hero__photo {
    height: 74%;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    height: 45%;
    background: linear-gradient(to top, rgba(11, 15, 26, .92) 15%, rgba(11, 15, 26, 0));
    pointer-events: none;
  }

  .hero__id {
    left: 24px;
    right: 24px;
    bottom: 32px;
  }

  .hero__link {
    display: none;
  }
}

/* 02 À propos */
.about__text {
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.7;
}

.stats {
  --grid-min: 200px;
  --grid-gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__value {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}

.stat__value--alt {
  color: var(--color-accent-2);
}

.stat__label {
  color: var(--color-text-footer);
  font-size: 15px;
}

/* 03 Parcours et 05 Expérience : étapes en colonnes, alignées sur le titre de la section (sans trait) */
.timeline {
  --grid-min: 240px;
  --grid-gap: 40px;
}

.timeline__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Dates du parcours et de l'expérience, en vert */
.timeline__date {
  color: var(--color-accent-2);
  font-size: 14px;
  font-weight: 600;
}

.timeline__title {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.timeline__place {
  color: var(--color-text-footer);
  font-size: 15px;
}

.timeline__item .text-small {
  margin-top: 8px;
}

/* 04 Compétences : icône à gauche du titre */
.skills {
  --grid-min: 300px;
  --grid-gap: 24px;
}

.skill__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: inherit;
}

.icon {
  display: block;
  flex: none;
}

.skill__icon {
  color: var(--color-accent);
}

.skill__icon--alt {
  color: var(--color-accent-2);
}

/* 06 Projets personnels */
.projects {
  --grid-min: 300px;
  --grid-gap: 24px;
}

.project {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

/* L'image ouvre la visionneuse : bouton sans habillage, loupe au survol */
.project__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--color-text);
  cursor: zoom-in;
}

.project__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(11, 15, 26, .85);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}

.project__body {
  --stack-gap: 12px;
  flex: 1;
  padding: var(--pad-card);
}

.project__meta {
  color: var(--color-text-soft);
  font-size: 13px;
  font-weight: 600;
}

.project__title {
  font-size: 17px;
}

.project__link.arrow-link,
.project__link.arrow-link:hover {
  color: var(--color-accent-2);
}

.project__link,
.project__private {
  margin-top: auto;
  padding-top: 4px;
}

.project__private {
  color: var(--color-text-soft);
  font-size: 15px;
  font-weight: 600;
}

/*
  Page "Services". Même présentation des offres que la page "Besoin d'un site ?" du site DOT :
  deux formules de création côte à côte, un "+", puis l'abonnement obligatoire en bandeau ;
  ensuite les autres prestations (formation, logiciel) avec le détail de leurs prix.
*/
.pricing__head {
  --stack-gap: 8px;
}

.pricing__packs {
  --grid-min: 320px;
  --grid-gap: 20px;
}

/* Séparateur "+" entre les formules et l'abonnement.
   Le signe est dessiné par deux dégradés, pour être centré au pixel près (un caractère "+" ne l'est pas) */
.pricing__plus {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pricing__plus::before,
.pricing__plus::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.pricing__plus-icon {
  --plus-color: var(--color-text-soft);
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--plus-color), var(--plus-color)) center / 12px 2px no-repeat,
    linear-gradient(var(--plus-color), var(--plus-color)) center / 2px 12px no-repeat;
}

.pricing__note {
  margin-top: 4px;
}

.vat {
  color: var(--color-text-soft);
  font-size: 13px;
  text-align: center;
}

/* Carte d'une offre */
.pack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 28px 30px;
}

.pack--featured {
  border-color: color-mix(in srgb, var(--color-accent) 55%, transparent);
}

.pack__head {
  --stack-gap: 8px;
}

.pack__tags {
  --cluster-gap: 8px 10px;
  align-items: center;
}

.pack__label {
  color: var(--color-text-subtle);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pack__badge {
  margin-block: -4px; /* le badge ne rend pas sa ligne plus haute : les titres des cartes restent alignés */
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-chip);
  color: var(--color-text-light);
  font-size: 12.5px;
  font-weight: 600;
}

.pack--featured .pack__badge {
  background: var(--color-accent);
  color: var(--color-bg);
}

.pack__name {
  font-size: 21px;
}

.pack__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 10px;
}

/* Un prix ne se coupe jamais entre le nombre et le symbole € */
.pack__amount {
  color: var(--color-text);
  font-size: clamp(36px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.pack__unit {
  color: var(--color-text-soft);
  font-size: 15px;
  font-weight: 600;
}

/* Détail des prix (formation, logiciel) */
.pack__rows {
  margin: 12px 0 0;
}

.pack__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pack__row dt {
  color: var(--color-text-footer);
  font-size: 14px;
  line-height: 1.5;
}

.pack__row dd {
  margin: 0;
  color: var(--color-accent-2);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* Liste de ce qui est inclus, une coche cyan devant chaque ligne */
.pack__features {
  display: grid;
  gap: 10px;
  align-content: start;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--color-text-muted);
  font-size: 15px;
  list-style: none;
}

.pack__features li {
  position: relative;
  padding-left: 24px;
}

.pack__features li::before {
  content: "";
  position: absolute;
  top: .45em;
  left: 2px;
  width: 10px;
  height: 5px;
  border-bottom: 2px solid var(--color-accent);
  border-left: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* Abonnement : présentation à gauche, inclus à droite (empilés sur mobile) */
@media (min-width: 820px) {
  .pack--care {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
  }

  .pack--care .pack__features {
    padding-top: 0;
    padding-left: 36px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

/* Page "Contact" : coordonnées à gauche, formulaire à droite (empilés sur mobile). */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--page-gap);
}

.contact > * {
  flex: 1 1 320px;
  min-width: 0;
}

.contact__info {
  --stack-gap: 24px;
}

.contact__lead {
  max-width: 460px;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.7;
}

.contact__rows {
  --stack-gap: 20px;
  margin-top: 8px;
}

/* Délai de réponse, en bas de la carte sous un trait fin */
.contact__delay {
  display: flex;
  align-items: center;
  gap: 16px; /* même alignement que les lignes de coordonnées */
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--color-chip);
  color: var(--color-title);
  font-size: 16px;
}

.contact__delay-icon {
  color: var(--color-accent);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-row__icon {
  color: var(--color-accent);
}

.info-row__body {
  --stack-gap: 2px;
  min-width: 0;
}

.info-row__label {
  color: var(--color-text-soft);
  font-size: 13px;
}

.info-row__value {
  overflow-wrap: anywhere;
  color: var(--color-title);
  font-size: 16px;
}

a.info-row__value:hover {
  color: var(--color-accent);
}

/* Formulaire */
.contact-form {
  --stack-gap: 20px;
}

.contact-form__row {
  --grid-min: 200px;
  --grid-gap: 20px;
}

.contact-form__submit {
  align-self: flex-start;
}

.contact-form__notice {
  color: var(--color-text-soft);
  font-size: 12.5px;
}

.contact-form__notice a,
.form-error a {
  color: var(--color-accent);
}

/* Message de confirmation après l'envoi */
.contact-success {
  --stack-gap: 16px;
  align-items: center;
  padding: 40px 0;
  text-align: center;
}

.contact-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 26px;
  font-weight: 700;
}

.contact-success__title {
  font-size: 22px;
}

.contact-success__text {
  max-width: 380px;
  color: var(--color-text-muted);
}

/* Page "Mentions légales". */
.legal__section {
  --stack-gap: 12px;
  max-width: 860px;
}

.legal__title {
  color: var(--color-card-title);
  font-size: 18px;
  font-weight: 700;
}

.legal a {
  color: var(--color-accent);
}

/* Page 404. */
.not-found {
  --stack-gap: 18px;
  align-items: center;
  padding-block: 72px;
  text-align: center;
}

.not-found__code {
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(90px, 18vw, 160px);
  line-height: 1;
  -webkit-text-stroke: 2px var(--color-accent);
}

.not-found__actions {
  --cluster-gap: 16px;
  justify-content: center;
  margin-top: 8px;
}

