/*
Theme Name: Franckv
Theme URI: https://franckv.fr
Author: Franck Viator
Description: Thème bloc sur mesure pour franckv.fr, direction « éditorial suisse » : blanc, encre, un seul rouge, Inter Tight.
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: franckv
Tags: block-theme, full-site-editing, business, one-column
*/

:root {
  --blanc: #ffffff;
  --encre: #111111;
  --rouge: #e63312;
  --gris: #6b6b6b;
  --filet: #e4e4e4;
  --filet-fort: #111111;
  --police: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --largeur: 1320px;
  --gouttiere: 32px;
  --lh-corps: 26.35px; /* interligne du texte courant : 17 px × 1,55 */
  /* Courbes fortes : sortie franche pour l'interface, entrée-sortie pour les déplacements */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --fleche-sortie: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 17px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; } /* height:auto obligatoire : sinon l'attribut height des blocs image l'emporte */
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.04em; hyphens: none; text-wrap: balance; }
::selection { background: var(--rouge); color: var(--blanc); }

/* Neutralisation de l'espacement automatique : d'abord theme.json (blockGap 0),
   puis ce filet de sécurité À SPÉCIFICITÉ NULLE (jamais .wp-block-group > *). */
:where(.wp-block-group) > :where(*), :where(.wp-block-buttons) { margin-block: 0; }
figure.wp-block-image { margin: 0; }

.enveloppe { width: min(var(--largeur), 100% - 2 * var(--gouttiere)); margin-inline: auto; }

/* Index de section : (01), (02)… */
.index { font-size: 14px; font-weight: 500; color: var(--gris); font-variant-numeric: tabular-nums; }

/* Le point carré rouge, porté par un pseudo-élément : le texte du titre reste simple à éditer */
.carre-fin::after {
  content: "";
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.04em;
  background: var(--rouge);
}

/* ---------- Boutons et liens ---------- */
/* La classe passée à core/button atterrit sur le conteneur : on le neutralise,
   les styles se portent sur le lien. */
.wp-block-button.bouton { display: inline-block; background: none; border: 0; padding: 0; border-radius: 0; }
.bouton .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--encre);
  color: var(--blanc);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.55;
  border-radius: 0;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms var(--ease-out);
}
/* Le rouge remplit le bouton de gauche à droite */
.bouton .wp-block-button__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rouge);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 260ms var(--ease-out);
}
.bouton .wp-block-button__link::after {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--fleche) center / contain no-repeat;
  mask: var(--fleche) center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
.bouton .wp-block-button__link:active { transform: scale(0.97); }
.bouton-grand .wp-block-button__link { padding: 20px 28px; font-size: 17px; }
.entete .bouton .wp-block-button__link::after { content: none; }
.fiche-projet-texte .bouton .wp-block-button__link::after {
  -webkit-mask-image: var(--fleche-sortie);
  mask-image: var(--fleche-sortie);
}

/* Lien souligné : le paragraphe porte la classe, le lien porte le style */
.lien a {
  display: inline-block;
  font-weight: 600;
  background: linear-gradient(var(--encre), var(--encre)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 3px;
  transition: color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .bouton .wp-block-button__link:hover::before { clip-path: inset(0 0 0 0); }
  .bouton .wp-block-button__link:hover::after { transform: translateX(4px); }
  .lien a:hover { color: var(--rouge); background-image: linear-gradient(var(--rouge), var(--rouge)); }
}

/* ---------- Bandeau et en-tête ---------- */
/* La pièce d'en-tête entière colle en haut ; le bandeau (38 px) sort par le haut au défilement. */
header.wp-block-template-part { position: sticky; top: -38px; z-index: 30; background: var(--blanc); }
.admin-bar header.wp-block-template-part { top: -6px; }
.bandeau { height: 38px; border-bottom: 1px solid var(--filet); font-size: 13px; color: var(--gris); }
.bandeau .enveloppe { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.dispo { display: inline-flex; align-items: center; gap: 8px; color: var(--encre); font-weight: 500; }
.dispo::before { content: ""; width: 7px; height: 7px; background: var(--rouge); animation: pouls 2.4s var(--ease-in-out) infinite; }
@keyframes pouls { 50% { opacity: 0.25; } }

.entete { background: var(--blanc); border-bottom: 1px solid var(--filet-fort); }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.55; }
.logo a { display: inline-flex; align-items: baseline; }
.logo a::after { content: ""; width: 7px; height: 7px; background: var(--rouge); margin-left: 2px; }

/* core/navigation : le menu reste éditable dans l'éditeur */
.nav.wp-block-navigation { font-size: 15px; font-weight: 500; }
.nav .wp-block-navigation__container { gap: 36px; }
.nav .wp-block-navigation-item__content { position: relative; padding-block: 6px; }
.nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--rouge);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-out);
}
.nav .current-menu-item > .wp-block-navigation-item__content::after,
.nav .wp-block-navigation-item__content.actif::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav .wp-block-navigation-item__content:hover::after { transform: scaleX(1); transform-origin: left; }
}
/* Le panneau mobile s'ouvre blanc sur blanc sans ceci (le CSS du bloc est imprimé APRÈS cette feuille) */
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--blanc) !important;
  color: var(--encre) !important;
}
.nav .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch; }
.nav .is-menu-open .wp-block-navigation__container { gap: 0; align-items: stretch; width: 100%; }
.nav .is-menu-open .wp-block-navigation-item { width: 100%; }
.nav .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--filet); font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.nav .is-menu-open .wp-block-navigation-item__content::after { display: none; }
.nav .is-menu-open .wp-block-navigation-item__content.actif { color: var(--rouge); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--filet-fort); position: relative; }
/* la grille de douze colonnes reste visible en filigrane */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: min(var(--largeur), 100% - 2 * var(--gouttiere));
  margin-inline: auto;
  background: repeating-linear-gradient(90deg, var(--filet) 0 1px, transparent 1px calc(100% / 12));
  border-right: 1px solid var(--filet);
  pointer-events: none;
}
.hero .enveloppe { position: relative; display: grid; grid-template-columns: 8fr 4fr; column-gap: var(--gouttiere); padding-block: 56px 0; }
.hero .index, .hero-pied { grid-column: 1 / -1; }
.hero-titre {
  grid-row: 2;
  grid-column: 1 / 2;
  margin-top: calc(28px - 0.03em);
  padding-bottom: 0.03em;
  font-size: clamp(76px, 14.2vw, 212px);
  line-height: 0.92;
  letter-spacing: -0.052em;
  font-weight: 800;
  white-space: nowrap;
}
.hero-sommaire {
  grid-row: 2;
  grid-column: 2;
  align-self: end;
  list-style: none;
  counter-reset: som;
  margin: 0 0 0.6em;
  padding: 0;
  border-top: 1px solid var(--filet-fort);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-sommaire li { counter-increment: som; display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--filet); background: var(--blanc); }
.hero-sommaire li::before { content: counter(som, decimal-leading-zero); font-weight: 500; color: var(--gris); font-variant-numeric: tabular-nums; }
.hero-sommaire a { transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .hero-sommaire a:hover { color: var(--rouge); } }
.hero-pied {
  grid-row: 3;
  display: grid;
  grid-template-columns: 5fr 3fr 4fr;
  gap: 0 var(--gouttiere);
  margin-top: 56px;
  border-top: 1px solid var(--filet-fort);
  background: var(--blanc);
}
.hero-intro { font-size: 20px; line-height: 1.5; padding-block: 32px 48px; max-width: 520px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 32px 48px; }
figure.hero-photo { height: 340px; overflow: hidden; border-left: 1px solid var(--filet-fort); }
figure.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Indicateurs ---------- */
.indicateurs { border-bottom: 1px solid var(--filet-fort); }
.indicateurs .enveloppe { display: grid; grid-template-columns: repeat(4, 1fr); }
.indicateur { padding: 44px var(--gouttiere) 48px; border-left: 1px solid var(--filet); }
.indicateur:first-child { border-left: 0; padding-left: 0; }
.indicateur-chiffre { display: flex; align-items: flex-start; }
.indicateur-valeur {
  font-size: clamp(56px, 6.4vw, 104px);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.indicateur-unite { font-size: clamp(20px, 2.3vw, 37px); font-weight: 800; line-height: 1; padding-top: 0.2em; margin-left: 0.06em; letter-spacing: -0.02em; color: var(--rouge); }
.indicateur-texte { margin-top: 18px; font-size: 15px; color: var(--gris); max-width: 220px; }

/* ---------- Têtes de section ---------- */
.tete-section { display: grid; grid-template-columns: 3fr 9fr; gap: var(--gouttiere); align-items: start; margin-bottom: 64px; }
.tete-section .index { padding-top: 14px; }
.tete-section h2 { font-size: clamp(40px, 5vw, 76px); line-height: 0.96; letter-spacing: -0.05em; }

/* ---------- Services ---------- */
.services { padding-block: 128px 0; }
.liste-services { border-top: 1px solid var(--filet-fort); }
.service {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 3fr 4fr 4fr 1fr;
  gap: var(--gouttiere);
  align-items: baseline;
  padding: 36px 0;
  border-bottom: 1px solid var(--filet-fort);
  transition: color 200ms ease;
}
/* La ligne se remplit en rouge, du haut vers le bas */
.service::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gouttiere));
  z-index: -1;
  background: var(--rouge);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 260ms var(--ease-out);
}
/* La flèche est le 4e élément de la grille, dessinée par un masque */
.service::after {
  content: "";
  justify-self: end;
  width: 32px;
  height: 32px;
  background: currentColor;
  -webkit-mask: var(--fleche) center / contain no-repeat;
  mask: var(--fleche) center / contain no-repeat;
  transition: transform 220ms var(--ease-out);
}
.service .numero { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.service .nom { font-size: clamp(30px, 3.2vw, 48px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.service .desc { font-size: 16px; color: var(--gris); transition: color 200ms ease; }
/* Lien étiré : toute la ligne est cliquable via le titre */
.service .nom a::after, .projet h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .service:hover { color: var(--blanc); }
  .service:hover .desc { color: rgba(255, 255, 255, 0.85); }
  .service:hover::before { clip-path: inset(0 0 0 0); }
  .service:hover::after { transform: translateX(6px); }
}

/* ---------- Méthode ---------- */
.methode { padding-block: 128px; }
.etapes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--filet); }
.etapes::before {
  content: "";
  position: absolute;
  top: -2px; left: 0;
  width: 100%; height: 3px;
  background: var(--rouge);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1200ms var(--ease-in-out);
}
.etapes.visible::before { transform: scaleX(1); }
.etape { padding: 36px var(--gouttiere) 0; border-left: 1px solid var(--filet); }
.etape:first-of-type { border-left: 0; padding-left: 0; }
.etape .numero { font-size: 15px; font-weight: 500; color: var(--rouge); }
.etape h3 { font-size: 34px; margin-top: 56px; letter-spacing: -0.045em; }
.etape p:not(.numero) { margin-top: 14px; font-size: 16px; color: var(--gris); max-width: 280px; }

/* ---------- Projets (accueil) ---------- */
.projets { padding-block: 128px; border-top: 1px solid var(--filet-fort); }
.grille-projets { display: grid; grid-template-columns: 1fr 1fr; gap: 80px var(--gouttiere); }
.projet { position: relative; }
.projet-visuel { position: relative; overflow: hidden; background: #f2f2f2; height: 440px; }
.projet-visuel figure.wp-block-image { height: 100%; }
.projet-visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 300ms ease, transform 600ms var(--ease-out);
}
.projet-vedette { grid-column: 1 / -1; display: grid; grid-template-columns: 8fr 4fr; gap: var(--gouttiere); }
.projet-vedette .projet-visuel { height: 600px; }
.legende { padding-top: 22px; border-top: 1px solid var(--filet-fort); margin-top: 18px; display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
.projet-vedette .legende { margin-top: 0; align-self: end; grid-template-columns: 1fr; }
.legende .numero { font-size: 15px; font-weight: 500; padding-top: 8px; }
.legende h3 { font-size: 34px; letter-spacing: -0.045em; line-height: 1.05; transition: color 200ms ease; }
.projet-vedette .legende h3 { font-size: clamp(44px, 4.6vw, 68px); line-height: 0.95; margin-top: 10px; }
.legende p:not(.numero):not(.fiche-cle):not(.fiche-val) { grid-column: 2; margin-top: 10px; font-size: 16px; color: var(--gris); }
.projet-vedette .legende p:not(.numero):not(.fiche-cle):not(.fiche-val) { grid-column: 1; font-size: 18px; margin-top: 16px; }
.legende .fiche { margin-top: 28px; border-top: 1px solid var(--filet); }
.legende .fiche-ligne { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--filet); font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .projet:hover .projet-visuel img { filter: grayscale(0); transform: scale(1.03); }
  .projet:hover h3 { color: var(--rouge); }
}

/* Captures d'écran de sites : le cadre prend les proportions de l'image (1440 × 800) */
.projet-visuel.capture { height: auto; aspect-ratio: 9 / 5; align-self: center; }
.projet-visuel.capture img { object-position: left top; }
.projet-visuel.entiere { background: #ffffff; }
.projet-visuel.entiere img { object-fit: contain; object-position: center; }
.projet-visuel.capture.entiere img { object-position: center; }
.projet-visuel.fond-gris { background: #e6e6e8; }
.projet-visuel.fond-noir { background: #050806; }

/* Frise « En cours » : bande rouge qui défile en bas de l'image d'un projet non terminé */
.frise {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  overflow: hidden;
  background: var(--rouge);
  color: var(--blanc);
  border-top: 1px solid var(--encre);
}
.frise-texte {
  display: block;
  width: max-content;
  padding-block: 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: defile 22s linear infinite;
}
@keyframes defile { to { transform: translateX(-50%); } }

/* Dernier projet resté seul sur sa ligne : il prend toute la largeur */
@media (min-width: 821px) {
  .grille-projets > .projet:last-child:nth-child(even) { grid-column: 1 / -1; display: grid; grid-template-columns: 7fr 5fr; gap: var(--gouttiere); }
  .grille-projets > .projet:last-child:nth-child(even) .legende { margin-top: 0; align-self: end; grid-template-columns: 1fr; }
  .grille-projets > .projet:last-child:nth-child(even) .legende h3 { font-size: clamp(34px, 3.4vw, 50px); margin-top: 8px; }
  .grille-projets > .projet:last-child:nth-child(even) .legende p:not(.numero):not(.fiche-cle):not(.fiche-val) { grid-column: 1; font-size: 17px; }
}

/* ---------- À propos (accueil) ---------- */
.apropos { border-top: 1px solid var(--filet-fort); }
.apropos .enveloppe { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gouttiere); }
figure.apropos-photo { height: 640px; overflow: hidden; border-right: 1px solid var(--filet-fort); }
figure.apropos-photo img { width: 100%; height: 100%; object-fit: cover; }
.apropos-texte { padding: 56px 0 56px 24px; display: flex; flex-direction: column; }
.citation {
  margin-top: auto;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.signature { margin-top: 28px; color: var(--gris); font-size: 16px; }
.apropos-texte .lien { margin-top: 32px; align-self: flex-start; }

/* ---------- Appel à l'action ---------- */
.appel { background: var(--encre); color: var(--blanc); padding-block: 96px 88px; }
.appel .index { color: #9a9a9a; }
.appel-titre {
  margin-top: calc(20px - 0.03em);
  padding-bottom: 0.03em;
  font-size: clamp(84px, 17vw, 260px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.appel-pied {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--gouttiere);
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #3a3a3a;
  align-items: start;
}
.appel-pied > p { font-size: 19px; color: #c9c9c9; max-width: 460px; }
.appel-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 20px; }
.appel-contacts .courriel a {
  font-size: clamp(30px, 3.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  background: linear-gradient(var(--rouge), var(--rouge)) 0 100% / 0 3px no-repeat;
  transition: background-size 260ms var(--ease-out);
}
.appel-contacts .courriel { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.1; }
@media (hover: hover) and (pointer: fine) {
  .appel-contacts .courriel a:hover { background-size: 100% 3px; }
}

/* ---------- Pied de page ---------- */
.pied { font-size: 15px; }
.pied-grille { display: grid; grid-template-columns: 6fr 2fr 2fr 2fr; gap: var(--gouttiere); padding-block: 64px 56px; }
.pied-grille p:not(.logo) { margin-top: 12px; color: var(--gris); max-width: 300px; }
.pied h4 { font-size: 14px; font-weight: 500; color: var(--gris); margin-bottom: 14px; letter-spacing: 0; }
.pied .wp-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 500; }
.pied .wp-block-list li { padding: 0; }
@media (hover: hover) and (pointer: fine) { .pied a:hover { color: var(--rouge); } }
.pied-bas { display: flex; justify-content: space-between; border-top: 1px solid var(--filet-fort); padding-block: 18px 24px; font-size: 13px; color: var(--gris); }

/* =========================================================
   Pages internes
   ========================================================= */
.sous-titre { font-size: 14px; font-weight: 500; color: var(--gris); letter-spacing: 0; margin-bottom: 12px; }
.chapo { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; }

.fiche { margin: 0; border-top: 1px solid var(--filet-fort); }
.fiche-ligne { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--filet); font-size: 16px; }
.fiche-cle { color: var(--gris); }
.fiche-val { font-weight: 600; }
.fiche-val.resultat { color: var(--rouge); }
.fiche-val a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .courriel-grand a:hover, .fiche-val a:hover { color: var(--rouge); } }

/* Hero de page */
.page-hero { border-bottom: 1px solid var(--filet-fort); }
.page-hero .enveloppe { padding-block: 56px 0; }
.page-titre {
  margin-top: calc(28px - 0.03em);
  padding-bottom: 0.03em;
  font-size: clamp(64px, 10.4vw, 156px);
  line-height: 0.94;
  letter-spacing: -0.052em;
}
.page-intro {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--gouttiere);
  align-items: end;
  margin-top: 48px;
  padding-block: 32px 48px;
  border-top: 1px solid var(--filet-fort);
}
.page-intro > p { font-size: 20px; line-height: 1.5; max-width: 620px; }
.page-intro .wp-block-buttons { justify-self: start; }

/* À propos */
.portrait { border-bottom: 1px solid var(--filet-fort); }
.portrait .enveloppe { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gouttiere); }
figure.portrait-photo { height: 620px; overflow: hidden; border-right: 1px solid var(--filet-fort); }
figure.portrait-photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait-texte { padding: 56px 0 56px 24px; display: flex; flex-direction: column; gap: 22px; }
.portrait-texte .chapo { margin-top: auto; }
.portrait-texte p:not(.index):not(.chapo) { color: var(--gris); max-width: 620px; }

.chronologie, .competences, .formations, .questions, .deroule { padding-block: 128px; }
.competences, .formations { border-top: 1px solid var(--filet-fort); }
.liste-chrono { border-top: 1px solid var(--filet-fort); }
.chrono-ligne { display: grid; grid-template-columns: 3fr 4fr 5fr; gap: var(--gouttiere); padding: 28px 0; border-bottom: 1px solid var(--filet-fort); align-items: baseline; }
.chrono-ligne .dates { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.chrono-ligne .role { font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.chrono-ligne .lieu { color: var(--gris); font-size: 16px; }
.chrono-ligne:first-child .dates { color: var(--rouge); }

.grille-competences { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--filet-fort); }
.competence { padding: 32px var(--gouttiere) 0; border-left: 1px solid var(--filet); }
.competence:first-child { border-left: 0; padding-left: 0; }
.competence .numero { font-size: 15px; font-weight: 500; color: var(--rouge); }
.competence h3 { font-size: 30px; margin-top: 40px; letter-spacing: -0.045em; }
.competence .wp-block-list, .liste-filets { list-style: none; margin: 18px 0 0; padding: 0; }
.competence .wp-block-list li, .liste-filets li { padding: 10px 0; border-bottom: 1px solid var(--filet); font-size: 16px; }

.deux-listes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gouttiere); }

/* Services */
.liste-blocs { padding-block: 32px 0; }
.bloc-service { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gouttiere); padding-block: 72px; border-bottom: 1px solid var(--filet-fort); scroll-margin-top: 90px; }
.bloc-service:last-child { border-bottom: 0; }
.bloc-service-tete .numero { font-size: 15px; font-weight: 500; color: var(--rouge); }
.bloc-service-tete h2 { margin-top: 14px; font-size: clamp(44px, 5.2vw, 80px); line-height: 0.95; letter-spacing: -0.05em; }
.bloc-service-details { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gouttiere); margin-top: 40px; align-items: start; }
.bloc-service-details .liste-filets { margin-top: 0; border-top: 1px solid var(--filet-fort); }
.bloc-service-details .fiche-ligne { grid-template-columns: 90px 1fr; }

.questions { border-top: 1px solid var(--filet-fort); }
.liste-questions { border-top: 1px solid var(--filet-fort); }
.liste-questions .wp-block-details { border-bottom: 1px solid var(--filet-fort); }
.liste-questions summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.liste-questions summary::-webkit-details-marker { display: none; }
/* Le « + » devient « − » à l'ouverture : deux traits dessinés en dégradés */
.liste-questions summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background:
    linear-gradient(var(--encre), var(--encre)) center / 100% 2px no-repeat,
    linear-gradient(var(--encre), var(--encre)) center / 2px 100% no-repeat;
}
.liste-questions .wp-block-details[open] summary::after {
  background:
    linear-gradient(var(--rouge), var(--rouge)) center / 100% 2px no-repeat;
}
.liste-questions .wp-block-details > p { padding: 0 0 28px; max-width: 720px; color: var(--gris); font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .liste-questions summary:hover { color: var(--rouge); } }

/* Projets (page) */
.liste-projets { padding-block: 32px 64px; }
.fiche-projet { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gouttiere); padding-block: 72px; border-bottom: 1px solid var(--filet-fort); scroll-margin-top: 90px; }
.fiche-projet:nth-child(even) { grid-template-columns: 5fr 7fr; }
.fiche-projet:nth-child(even) .projet-visuel { order: 2; }
.fiche-projet .projet-visuel { height: 560px; }
.fiche-projet .projet-visuel.capture { height: auto; }
.fiche-projet .projet-visuel img { transition: filter 300ms ease; }
@media (hover: hover) and (pointer: fine) { .fiche-projet:hover .projet-visuel img { filter: grayscale(0); } }
.fiche-projet-texte { display: flex; flex-direction: column; gap: 28px; }
.fiche-projet-texte .numero { font-size: 15px; font-weight: 500; color: var(--rouge); }
.fiche-projet-texte h2 { margin-top: 10px; font-size: clamp(40px, 4.4vw, 64px); line-height: 0.95; letter-spacing: -0.05em; }
.fiche-projet-texte p:not(.numero):not(.fiche-cle):not(.fiche-val) { color: var(--gris); font-size: 16px; }
.fiche-projet-texte .fiche-ligne { grid-template-columns: 100px 1fr; }
.fiche-projet-texte .wp-block-buttons { align-self: flex-start; }
.fiche-en-cours .projet-visuel img { filter: grayscale(1); }

.projet-texte { background: var(--encre); color: var(--blanc); padding-block: 96px; }
.projet-texte .index { color: #9a9a9a; }
.projet-texte-grille { display: grid; grid-template-columns: 6fr 6fr; gap: var(--gouttiere); align-items: end; margin-top: 24px; }
.chiffre-geant-bloc { display: flex; align-items: flex-start; }
.chiffre-geant { font-size: clamp(120px, 20vw, 300px); font-weight: 800; letter-spacing: -0.07em; line-height: 0.82; font-variant-numeric: tabular-nums; color: var(--blanc); }
.chiffre-geant-unite { font-size: clamp(36px, 6vw, 90px); font-weight: 800; line-height: 1; padding-top: 0.2em; color: var(--rouge); }
.projet-texte h2 { font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.04em; }
.projet-texte-grille p { margin-top: 16px; color: #c9c9c9; font-size: 18px; max-width: 520px; }
.projet-texte-grille .chiffre-geant, .projet-texte-grille .chiffre-geant-unite { margin-top: 0; max-width: none; }
.projet-texte-grille .chiffre-geant { font-size: clamp(120px, 20vw, 300px); color: var(--blanc); }
.projet-texte-grille .chiffre-geant-unite { color: var(--rouge); font-size: clamp(36px, 6vw, 90px); }
.projet-texte + .appel { border-top: 1px solid #3a3a3a; }

/* Contact */
.contact { border-bottom: 1px solid var(--filet-fort); }
.contact .enveloppe { display: grid; grid-template-columns: 7fr 5fr; gap: calc(var(--gouttiere) * 2); padding-block: 80px; }
/* Formulaire Contact Form 7 : les classes du gabarit CF7 reprennent celles de la maquette */
.formulaire .wpcf7-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gouttiere); align-content: start; }
.formulaire .wpcf7-form-control-wrap { display: block; } /* sinon le <span> d'enrobage ajoute 5 à 13 px sous chaque champ */
.champ { display: flex; flex-direction: column; gap: 6px; padding-block: 14px; }
.champ-large { grid-column: 1 / -1; }
.champ label { font-size: 14px; font-weight: 500; color: var(--gris); }
.formulaire input[type="text"], .formulaire input[type="email"], .formulaire select, .formulaire textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--encre);
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--filet-fort);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  transition: border-color 160ms ease;
}
.formulaire textarea { resize: vertical; min-height: 150px; }
.formulaire select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--encre) 50%), linear-gradient(-45deg, transparent 50%, var(--encre) 50%);
  background-position: calc(100% - 6px) 55%, 100% 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { border-bottom: 2px solid var(--rouge); padding-bottom: 9px; }
.formulaire .wpcf7-submit {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 24px;
  padding: 20px 28px;
  border: 0;
  border-radius: 0;
  background: var(--encre);
  color: var(--blanc);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: normal; /* un <button> n'hérite pas de l'interligne du texte */
  cursor: pointer;
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.formulaire .wpcf7-submit:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .formulaire .wpcf7-submit:hover { background: var(--rouge); } }
.formulaire .wpcf7-not-valid-tip { color: var(--rouge); font-size: 14px; margin-top: 6px; }
.formulaire .wpcf7-response-output { grid-column: 1 / -1; margin: 20px 0 0; padding: 14px 0; border: 0; border-top: 1px solid var(--filet-fort); font-size: 15px; }
.formulaire .wpcf7-spinner { display: none; }
.coordonnees { display: flex; flex-direction: column; gap: 28px; padding-left: var(--gouttiere); border-left: 1px solid var(--filet-fort); }
.courriel-grand { font-size: clamp(28px, 2.9vw, 42px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; word-break: break-word; }
.coordonnees .fiche-ligne { grid-template-columns: 110px 1fr; }
.deroule .etapes-trois { grid-template-columns: repeat(3, 1fr); }

/* ---------- Mouvement d'entrée (actif seulement si le script a posé la classe .js) ---------- */
/* Titres géants : ils se dévoilent du haut vers le bas, derrière un masque */
.js .titre-masque {
  clip-path: inset(-0.15em -0.1em 100% -0.1em);
  transform: translateY(0.18em);
  transition: clip-path 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.js .titre-masque.visible { clip-path: inset(-0.15em -0.1em -0.15em -0.1em); transform: none; }

.js .revele { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.js .revele.visible { opacity: 1; transform: none; }
.d-1 { --d: 1; } .d-2 { --d: 2; } .d-3 { --d: 3; } .d-4 { --d: 4; }

/* Images : dévoilées du bas vers le haut */
.js .revele-image { clip-path: inset(100% 0 0 0); transition: clip-path 1000ms var(--ease-in-out); }
.js .revele-image.visible { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  .js .titre-masque, .js .revele, .js .revele-image { transform: none; clip-path: none; opacity: 1; transition: opacity 200ms ease; }
  .etapes::before { transition: none; }
  .dispo::before, .frise-texte { animation: none; }
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav .wp-block-navigation__container { gap: 22px; }
  .hero .enveloppe { grid-template-columns: 1fr; }
  .hero-titre { grid-column: 1; }
  .hero-sommaire { display: none; }
  .hero-pied { grid-template-columns: 1fr 1fr; }
  figure.hero-photo { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--filet-fort); height: 300px; }
  .indicateurs .enveloppe { grid-template-columns: 1fr 1fr; }
  .indicateur:nth-child(3) { border-left: 0; padding-left: 0; }
  .indicateur:nth-child(n+3) { border-top: 1px solid var(--filet); }
  .service { grid-template-columns: 1fr 4fr 6fr 1fr; }
  .grille-competences { grid-template-columns: 1fr 1fr; }
  .competence:nth-child(3) { border-left: 0; padding-left: 0; }
  .competence:nth-child(n+3) { margin-top: 40px; }
  .bloc-service, .fiche-projet, .fiche-projet:nth-child(even) { grid-template-columns: 1fr; }
  .fiche-projet:nth-child(even) .projet-visuel { order: 0; }
  .fiche-projet .projet-visuel { height: 440px; }
  .fiche-projet .projet-visuel.capture { height: auto; }
}
@media (max-width: 900px) {
  .entete .wp-block-buttons { display: none; }
}

@media (max-width: 820px) {
  :root { --gouttiere: 20px; --lh-corps: 24.8px; }
  .projet-texte-grille .chiffre-geant { font-size: 38vw; }
  body { font-size: 16px; }
  .bandeau .enveloppe > p:first-child { display: none; }
  .bandeau .enveloppe { justify-content: flex-start; }
  .entete .enveloppe { height: 64px; }

  .hero::before { display: none; }
  .hero .enveloppe { padding-top: 36px; }
  .hero-titre { font-size: clamp(64px, 21vw, 120px); }
  .hero-pied { grid-template-columns: 1fr; margin-top: 36px; }
  .hero-intro { font-size: 18px; padding-block: 24px 8px; }
  .hero-actions { padding-block: 16px 32px; }
  figure.hero-photo { height: 240px; }

  .indicateur { padding: 28px 16px 30px; }
  .indicateur:nth-child(odd) { padding-left: 0; }
  .indicateur-texte { font-size: 13px; }

  .tete-section { grid-template-columns: 1fr; gap: 14px; margin-bottom: 40px; }
  .tete-section .index { padding-top: 0; }
  .services, .methode, .projets { padding-block: 80px; }
  .services { padding-bottom: 0; }
  .service { grid-template-columns: 40px 1fr 28px; gap: 12px; padding: 24px 0; }
  .service .desc { grid-column: 2 / 3; grid-row: 2; font-size: 15px; }
  .service::after { grid-column: 3; grid-row: 1; width: 24px; height: 24px; }

  .etapes { grid-template-columns: 1fr 1fr; }
  .etape { padding: 28px 14px 32px; }
  .etape:nth-of-type(odd) { border-left: 0; padding-left: 0; }
  .etape:nth-of-type(n+3) { border-top: 1px solid var(--filet); }
  .etape h3 { margin-top: 28px; font-size: 26px; }
  .etape p:not(.numero) { font-size: 14px; }

  .grille-projets { grid-template-columns: 1fr; gap: 56px; }
  .projet-vedette { grid-template-columns: 1fr; }
  .projet-visuel, .projet-vedette .projet-visuel { height: auto; aspect-ratio: 4 / 3; }
  .projet-visuel.capture { aspect-ratio: 9 / 5; }
  .projet-vedette .legende { margin-top: 18px; }
  .legende h3 { font-size: 28px; }

  .apropos .enveloppe { grid-template-columns: 1fr; width: 100%; }
  figure.apropos-photo { height: 300px; border-right: 0; border-bottom: 1px solid var(--filet-fort); }
  .apropos-texte { padding: 40px var(--gouttiere) 64px; }
  .citation { margin-top: 24px; font-size: 28px; }

  .appel { padding-block: 72px 64px; }
  .appel-titre { font-size: 18vw; }
  .appel-pied { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .appel-pied > p { font-size: 17px; }

  .pied-grille { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-block: 48px 40px; }
  .pied-grille > div:first-child { grid-column: 1 / -1; }
  .pied-bas { flex-direction: column; gap: 4px; }

  .page-hero .enveloppe { padding-top: 36px; }
  .page-titre { font-size: clamp(48px, 15vw, 96px); line-height: 1; }
  .page-intro { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; padding-block: 24px 40px; }
  .page-intro > p { font-size: 18px; }
  .portrait .enveloppe { grid-template-columns: 1fr; width: 100%; }
  figure.portrait-photo { height: 300px; border-right: 0; border-bottom: 1px solid var(--filet-fort); }
  .portrait-texte { padding: 40px var(--gouttiere) 56px; }
  .chronologie, .competences, .formations, .questions, .deroule { padding-block: 72px; }
  .chrono-ligne { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .grille-competences { grid-template-columns: 1fr; }
  .competence { border-left: 0; padding: 28px 0 0; }
  .competence:nth-child(n+2) { margin-top: 24px; border-top: 1px solid var(--filet); }
  .competence h3 { margin-top: 16px; }
  .deux-listes { grid-template-columns: 1fr; gap: 48px; }
  .fiche-ligne { grid-template-columns: 110px 1fr; font-size: 15px; }
  .bloc-service { padding-block: 56px; gap: 20px; }
  .bloc-service-details { grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
  .fiche-projet { padding-block: 48px; gap: 24px; }
  .fiche-projet .projet-visuel { height: auto; aspect-ratio: 4 / 3; }
  .fiche-projet .projet-visuel.capture { aspect-ratio: 9 / 5; }
  .projet-texte { padding-block: 72px; }
  .projet-texte-grille { grid-template-columns: 1fr; }
  .chiffre-geant { font-size: 38vw; }
  .contact .enveloppe { grid-template-columns: 1fr; gap: 48px; padding-block: 48px; }
  .formulaire .wpcf7-form { grid-template-columns: 1fr; }
  .coordonnees { padding-left: 0; border-left: 0; border-top: 1px solid var(--filet-fort); padding-top: 32px; }
  .deroule .etapes-trois { grid-template-columns: 1fr; }
  .deroule .etape { border-left: 0; padding-left: 0; }
  .deroule .etape:nth-of-type(n+2) { border-top: 1px solid var(--filet); }
}

/* Les numéros de section étaient des <span> en ligne dans la maquette : leur ligne suivait
   l'interligne du parent (17 px × 1,55). Devenus des paragraphes, on le leur rend. */
.etape .numero, .competence .numero, .bloc-service-tete .numero, .fiche-projet-texte .numero { line-height: var(--lh-corps); }
