/* Jetons de design repris de la maquette (maquette/accueil-rendu.html). */
:root {
  --encre: #14110d;
  --papier: #f3efe6;
  --accent: #ff7d29;
  --accent-clair: #ffa05e;
  --gris: #8f877a;
  --gris-clair: #b8b0a2;

  /* Nuances complémentaires relevées dans la maquette. */
  --surface: #1b1712;            /* fond des cartes / panneaux (survol, projets, contact) */
  --texte-doux: #a89f90;         /* liens de nav, textes de carte */
  --vert: #5fd08a;               /* pastille « disponible » / état de succès */
  --bordure: rgba(243, 239, 230, 0.09);
  --bordure-forte: rgba(243, 239, 230, 0.18);

  /* Plaque de la légende des cartes projet : le fond qui rend le titre lisible SUR LA CAPTURE,
     quelle que soit sa clarté. Alpha choisi par le calcul, pas à l'œil : composée sur du blanc
     pur (le pire visuel possible), elle laisse --texte-doux — la couleur la moins contrastée de
     la légende — à 5,5:1, au-dessus du seuil AA de 4,5:1. Vérifié par tests/styles-test.php. */
  --legende-plaque: rgba(20, 17, 13, 0.9);

  --police-corps: 'Instrument Sans', system-ui, sans-serif;
  --police-titre: 'Space Grotesk', var(--police-corps);
  --police-mono: 'JetBrains Mono', ui-monospace, monospace;

  --largeur: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--encre);
  color: var(--papier);
  font-family: var(--police-corps);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-clair); }

h1, h2, h3 {
  font-family: var(--police-titre);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.contenu {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 32px;
}

/*
 * Skip-link caché par le motif « visuellement caché » BORNÉ (1×1px + clip-path), et non plus
 * par `left:-9999px` : la technique historique étendait la boîte de défilement (scrollWidth
 * 360→480px sur mobile, scroll horizontal parasite dans le rendu brut). Le motif borné sort
 * l'élément du flux visible sans agrandir le document. Au focus il redevient un vrai bouton.
 */
.lien-evitement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.lien-evitement:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  white-space: normal;
  z-index: 100;
  background: var(--encre);
  color: var(--papier);
  padding: 12px 16px;
}

/*
 * Le honeypot doit rester invisible sans être display:none (certains robots l'ignorent alors).
 * Motif borné 1×1px + clip-path plutôt que `left:-9999px` (qui débordait le viewport mobile).
 */
.champ--piege {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
}

/* =========================================================================
   En-tête — header collant translucide (maquette : NAV)
   ========================================================================= */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(20, 17, 13, 0.72);
  border-bottom: 1px solid var(--bordure);
}
.entete__interieur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.entete__marque {
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--papier);
}
.entete__marque::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--accent);
}
/* Menu = nav + CTA. En ligne à droite au grand écran ; panneau déroulant en mobile (média). */
.entete__menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.entete__nav { display: flex; align-items: center; }
.entete__nav .nav-principale {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.entete__nav .nav-principale a {
  color: var(--texte-doux);
  font-size: 14px;
  letter-spacing: 0.01em;
}
.entete__nav .nav-principale a:hover { color: var(--papier); }

/* Bouton hamburger : masqué au grand écran (la nav est en ligne), révélé par la média mobile.
   Cible tactile ≥44px, icône dessinée en CSS (3 barres → croix quand aria-expanded="true"). */
.entete__bascule {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  color: var(--papier);
  border: 1px solid var(--bordure-forte);
  border-radius: 10px;
  cursor: pointer;
}
.entete__bascule:hover { border-color: var(--accent); }
.entete__bascule:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.entete__bascule-icone,
.entete__bascule-icone::before,
.entete__bascule-icone::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.entete__bascule-icone { position: relative; }
.entete__bascule-icone::before { position: absolute; left: 0; top: -6px; }
.entete__bascule-icone::after { position: absolute; left: 0; top: 6px; }
.entete__bascule[aria-expanded="true"] .entete__bascule-icone { background: transparent; }
.entete__bascule[aria-expanded="true"] .entete__bascule-icone::before { transform: translateY(6px) rotate(45deg); }
.entete__bascule[aria-expanded="true"] .entete__bascule-icone::after { transform: translateY(-6px) rotate(-45deg); }

/* CTA d'en-tête : pilule outline accent (maquette), compacte, à droite de la nav. */
.entete__cta {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--accent);
  border-color: rgba(255, 125, 41, 0.5);
  box-shadow: none;
}
.entete__cta:hover {
  background: var(--accent);
  color: var(--encre);
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}

/* Section générique */
/*
 * `overflow-x: clip` (et non `hidden`) : borne l'échappée HORIZONTALE des décorations posées en
 * `right`/`left` négatif (ex. `.section--hero::before`, une lueur à right:-120px), tout en
 * laissant la bave VERTICALE (top négatif) intacte et sans créer de conteneur de défilement.
 * Sans ce clip, le -120px devient un scroll horizontal parasite qui, sur mobile, fait dézoomer
 * la fenêtre de mise en page (viewport 390→510px). `clip` autorise `overflow-y:visible`.
 */
.section { position: relative; overflow-x: clip; }
.section > .contenu { padding-top: 80px; padding-bottom: 80px; }

.section__kicker {
  font-family: var(--police-mono);
  font-size: 13px;
  color: var(--gris);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.section__kicker::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--accent);
}

/* =========================================================================
   Hero
   ========================================================================= */
.section--hero > .contenu { padding-top: 120px; padding-bottom: 96px; }
.section--hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -120px;
  width: 620px;
  height: 620px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(255, 125, 41, 0.16), transparent 68%);
  pointer-events: none;
  filter: blur(10px);
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--police-mono);
  font-size: 12.5px;
  color: var(--texte-doux);
  letter-spacing: 0.02em;
  border: 1px solid var(--bordure-forte);
  border-radius: 100px;
  padding: 7px 15px;
  margin: 0 0 36px;
}
.hero__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vert);
  animation: af-pulse 2.4s ease-in-out infinite;
}
@keyframes af-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__titre {
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin: 0;
}
/*
 * Emphase d'un mot dans un titre (maquette : « indépendant » en orange). La seule classe qu'un
 * champ ACF peut porter — cf. inc/emphase.php, qui réduit tout le reste.
 */
.accent { color: var(--accent); }
.hero__texte {
  margin: 32px 0 0;
  max-width: 52ch;
  font-size: 19px;
  line-height: 1.6;
  color: var(--gris-clair);
}
.hero__actions {
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Bande de preuve : 3 stats sous le hero, séparées, sur une border-top (maquette). */
.hero__stats {
  margin: 72px 0 0;
  padding: 34px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  list-style: none;
  border-top: 1px solid var(--bordure);
}
.hero__stat { margin: 0; }
.hero__stat-valeur {
  display: block;
  font-family: var(--police-titre);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero__stat-libelle {
  display: block;
  margin-top: 4px;
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--gris);
}

/* =========================================================================
   Boutons (pilule)
   ========================================================================= */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 100px;
  border: 1px solid transparent;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.25s, border-color 0.25s, color 0.25s;
}
.bouton--primaire {
  background: var(--accent);
  color: var(--encre);
  box-shadow: 0 8px 30px rgba(255, 125, 41, 0.28);
}
.bouton--primaire:hover {
  color: var(--encre);
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(255, 125, 41, 0.42);
}
.bouton--secondaire {
  background: transparent;
  color: var(--papier);
  border-color: var(--bordure-forte);
}
.bouton--secondaire:hover {
  color: var(--papier);
  border-color: rgba(243, 239, 230, 0.45);
  background: rgba(243, 239, 230, 0.04);
}

/* =========================================================================
   Approche — grille de cartes
   ========================================================================= */
.section--approche h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 20ch;
  margin: 0 0 56px;
}
.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bordure);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  overflow: hidden;
}
.carte {
  background: var(--encre);
  padding: 34px 30px;
  transition: background 0.3s;
}
.carte:hover { background: var(--surface); }
.carte__numero {
  display: block;
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
}
.carte__titre {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.carte__texte {
  margin: 0;
  color: var(--texte-doux);
  font-size: 15px;
  line-height: 1.6;
}

/* =========================================================================
   Réalisations — grille de projets
   ========================================================================= */
.section--realisations h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 20ch;
  margin: 0 0 56px;
}
.projets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.projet { margin: 0; }
.projet__carte {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--bordure);
  aspect-ratio: 4 / 3;
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s;
}
.projet__carte:hover {
  border-color: rgba(255, 125, 41, 0.4);
  transform: translateY(-3px);
}
.projet__lien {
  display: block;
  height: 100%;
  color: var(--papier);
}
.projet__visuel {
  position: absolute;
  inset: 0;
}
.projet__visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Une PLAQUE, pas un simple dégradé : le texte repose sur un palier d'opacité constante
   (0 → 78 % de la hauteur), et le fondu vers la transparence se fait AU-DESSUS de lui, dans le
   padding haut. Un dégradé seul faisait varier le fond sous le texte lui-même : sur une capture
   claire, le titre passait sous le seuil de lisibilité. */
.projet__legende {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 56px 22px 22px;
  background: linear-gradient(
    to top,
    var(--legende-plaque) 0%,
    var(--legende-plaque) 78%,
    rgba(20, 17, 13, 0.55) 90%,
    rgba(20, 17, 13, 0) 100%
  );
}
.projet__titre {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}
.projet__categorie {
  margin-top: 3px;
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--texte-doux);
}
.projets__vide { color: var(--texte-doux); }

/* =========================================================================
   Avis — preuve sociale nommée (répéteur ACF)
   ========================================================================= */
.section--avis h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 20ch;
  margin: 0 0 56px;
}
.avis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.avis__item { margin: 0; }
.avis__carte {
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  margin: 0;
  padding: 34px 30px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  transition: border-color 0.25s, transform 0.25s;
}
.avis__carte:hover {
  border-color: rgba(255, 125, 41, 0.4);
  transform: translateY(-3px);
}
/* Guillemet ouvrant en filigrane, dans l'accent — repère visuel du bloc de citation. */
.avis__verbatim {
  position: relative;
  margin: 0;
  padding-top: 26px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--papier);
}
.avis__verbatim::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: -4px;
  font-family: var(--police-titre);
  font-size: 54px;
  line-height: 1;
  color: var(--accent);
}
.avis__source {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: auto;
}
.avis__auteur {
  font-family: var(--police-titre);
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  color: var(--papier);
}
.avis__role {
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--texte-doux);
}
.avis__tous {
  margin: 40px 0 0;
}
.avis__lien {
  font-family: var(--police-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--bordure-forte);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.avis__lien:hover { border-color: var(--accent); }

/* =========================================================================
   Contact — panneau + formulaire
   ========================================================================= */
.section--contact > .contenu { padding-bottom: 40px; }
.contact__panneau {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 64px);
  position: relative;
  z-index: 1;
}
.contact__infos,
.contact__form-col { min-width: 0; }
.section--contact .section__kicker,
.section--contact h2,
.section--contact .contact__texte,
.section--contact .contact__coordonnees,
.section--contact .formulaire {
  position: relative;
  z-index: 1;
}
.section--contact h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 20px;
}
.contact__texte {
  color: var(--texte-doux);
  font-size: 16px;
  line-height: 1.6;
  max-width: 38ch;
  margin: 0 0 32px;
}
.contact__coordonnees {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}
.contact__coordonnee {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.contact__coordonnees dt {
  font-family: var(--police-mono);
  font-size: 11px;
  color: var(--gris);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 70px;
  flex: 0 0 auto;
}
.contact__coordonnees dd {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 17px;
}
.contact__coordonnees dd a { color: var(--papier); }
.contact__coordonnees dd a:hover { color: var(--accent); }

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* NOM + EMAIL côte à côte (maquette) ; repassent l'un sous l'autre sur petit écran. */
.champ--paire {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 520px) {
  .champ--paire { grid-template-columns: 1fr; }
}
/* Mention discrète en tête du formulaire : les quatre champs sont obligatoires. */
.formulaire__mention {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--texte-doux);
}
.champ {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.champ label {
  font-family: var(--police-mono);
  font-size: 11px;
  color: var(--gris);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.champ input,
.champ textarea {
  background: var(--encre);
  border: 1px solid var(--bordure-forte);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--papier);
  font-family: var(--police-corps);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.champ textarea { resize: vertical; min-height: 120px; }
.champ input:focus,
.champ textarea:focus { border-color: var(--accent); }

/* Case de consentement RGPD : libellé cliquable, aligné sur la case. */
.champ--consentement { margin: 0; }
.champ__consentement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--police-corps);
  font-size: 13px;
  line-height: 1.5;
  color: var(--texte-doux);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.champ__consentement input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.formulaire .bouton--primaire { align-self: flex-start; }

.contact__etat {
  font-family: var(--police-titre);
  font-size: 17px;
  margin: 0 0 20px;
}
.contact__etat--succes { color: var(--vert); }
.contact__etat--erreur { color: #e5735f; }

/* =========================================================================
   Pied de page
   ========================================================================= */
.pied {
  border-top: 1px solid var(--bordure);
  margin-top: 40px;
}
.pied__interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 56px;
}
.pied__nav .nav-pied {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied__nav .nav-pied a { color: var(--texte-doux); font-size: 13px; }
.pied__nav .nav-pied a:hover { color: var(--accent); }
.pied__mention {
  font-family: var(--police-mono);
  font-size: 12px;
  color: var(--gris);
  margin: 0;
}
.pied__signature { color: var(--gris); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .section--hero > .contenu { padding-top: 96px; padding-bottom: 72px; }
}

/* Mobile / tablette étroite : la nav en ligne déborderait — elle se replie en hamburger.
   Le panneau déroulant tombe pleine largeur sous l'en-tête, la nav passe en colonne. */
@media (max-width: 768px) {
  .entete__interieur { flex-wrap: nowrap; }
  .entete__bascule { display: inline-flex; }
  .entete__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    background: rgba(20, 17, 13, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bordure);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
  }
  .entete__menu.est-ouvert { display: flex; }
  .entete__nav { width: 100%; }
  .entete__nav .nav-principale {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .entete__nav .nav-principale li { width: 100%; }
  .entete__nav .nav-principale a {
    display: block;
    padding: 13px 2px;
    font-size: 16px;
    border-bottom: 1px solid var(--bordure);
  }
  .entete__cta {
    margin-top: 14px;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .contenu { padding: 0 20px; }
  .section > .contenu { padding-top: 56px; padding-bottom: 56px; }
  .section--hero > .contenu { padding-top: 72px; padding-bottom: 56px; }
  .hero__actions .bouton { flex: 1 1 auto; }
  .pied__interieur { flex-direction: column; align-items: flex-start; }
}

/* Badge Codeur au pied : discret, s'aligne à droite, s'éclaircit au survol. */
.pied__badge {
  display: inline-flex;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.pied__badge:hover { opacity: 1; }
.pied__badge img { display: block; height: auto; }
