/* ==========================================================================
   HAP Audit & Conseil — feuille de style unique
   Couleurs et tailles : uniquement dans :root (voir README.md, « Personnaliser »).
   Mobile first. Points de rupture : 640px, 900px, 1200px.
   ========================================================================== */

/* --- Polices auto-hébergées ------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Variables : tout se règle ici ------------------------------------------ */

:root {
  /* Palette */
  --navy: #1E2460;
  --navy-0: #1E246000;
  --navy-deep: #0F1F44;
  --navy-deep-0: #0F1F4400;
  --navy-deep-voile: #0F1F44D9;
  --teal: #00A99D;
  --teal-btn: #00857B;
  --teal-btn-hover: #00796F;
  --teal-text: #00796F;
  --teal-light: #2EC4B6;
  --teal-soft: #E3F6F4;
  --teal-arc: #00A99D40;
  --arc-soft: #E3F6F480;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --border: #E3E8F0;
  --text: #1E2460;
  --text-muted: #4A5578;
  --error: #C0392B;
  --on-dark: #FFFFFF;
  --on-dark-muted: #D5DBEA;
  --line-on-dark: #FFFFFF40;
  --input-border: #7A86A3;
  --backdrop: #0F1F44B3;
  --shadow: #0F1F441F;

  /* Couleurs par balise (modifiables individuellement) */
  --h1-color: var(--navy);
  --h2-color: var(--navy);
  --h3-color: var(--navy);
  --h4-color: var(--navy);
  --h5-color: var(--navy);
  --h6-color: var(--navy);
  --text-color: var(--text-muted);
  --strong-color: var(--text);
  --link-color: var(--teal-text);
  --accent-color: var(--teal-text);
  --eyebrow-color: var(--teal-text);
  --rule-color: var(--teal);
  --label-color: var(--text);
  --input-color: var(--text);
  --focus-color: var(--teal-text);

  /* Tailles des titres (modifiables individuellement) */
  --h1-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  --h2-size: clamp(1.6rem, 2vw + 1rem, 2.5rem);
  --h3-size: clamp(1.2rem, .5vw + 1rem, 1.4rem);
  --h4-size: 1.125rem;
  --h5-size: 1rem;
  --h6-size: .875rem;

  /* Tailles des classes modificatrices .titre-xl et .titre-sm */
  --titre-xl-size: clamp(2.25rem, 4vw + 1.25rem, 4rem);
  --titre-sm-size: 1.125rem;

  /* Tailles du texte et des composants */
  --text-size: 1rem;
  --text-lg-size: 1.125rem;
  --text-sm-size: .875rem;
  --text-xs-size: .8125rem;
  --eyebrow-size: .8125rem;
  --logo-size: 1.25rem;
  --btn-size: 1rem;
  --label-size: .9375rem;
  --input-size: 1rem;
  --link-more-size: .8125rem;
  --quote-size: clamp(1.25rem, 1vw + 1rem, 1.75rem);
  --quote-mark-size: 4.5rem;
  --panneau-title-size: clamp(1.35rem, 1vw + 1rem, 1.6rem);

  /* Polices */
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Espacements */
  --largeur-max: 1100px; /* largeur maximale du contenu, marges comprises */
  --gutter: 16px;
  --section-space: clamp(3rem, 6vw, 5.5rem);
  --bandeau-space: clamp(2.5rem, 5vw, 4rem);
  --radius: 6px;
  --radius-lg: 12px;
}

/* --- Socle ------------------------------------------------------------------ */

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

html {
  /* Les ancres (#negoce…) s'arrêtent sous le menu collé, pas derrière. */
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Repère du bouton « Remonter en haut » (voir pied de page). */
body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text-color);
  font-family: var(--font-text);
  font-size: var(--text-size);
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .75rem;
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: var(--h1-size); color: var(--h1-color); }
h2 { font-size: var(--h2-size); color: var(--h2-color); }
h3 { font-size: var(--h3-size); color: var(--h3-color); }
h4 { font-size: var(--h4-size); color: var(--h4-color); }
h5 { font-size: var(--h5-size); color: var(--h5-color); }
h6 { font-size: var(--h6-size); color: var(--h6-color); }

p, ul, ol, dl, blockquote, figure {
  margin: 0 0 1rem;
}

p, li, dd, address {
  color: var(--text-color);
  font-style: normal;
}

/* Texte courant justifié : paragraphes sans classe (surtitres, accroches,
   notes et boutons gardent leur alignement). La césure (lang="fr") évite
   les grands blancs entre les mots. */
main p:where(:not([class])) {
  text-align: justify;
  hyphens: auto;
}

/* Blocs centrés : les paragraphes y restent centrés. */
.entete-section--centre p,
.bandeau-contact p,
.citation p,
.page-simple p {
  text-align: inherit;
}

/* Colonnes étroites et encarts : justifiés, les mots s'écarteraient trop. */
.card p,
.categorie p,
.encart p {
  text-align: start;
  hyphens: manual;
}

strong, b, dt {
  color: var(--strong-color);
  font-weight: 600;
}

a {
  color: var(--link-color);
  text-underline-offset: .15em;
}

img, picture, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
  border-radius: 2px;
}

[id] {
  scroll-margin-top: 1rem;
}

.icone {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

/* --- Classes modificatrices (niveau 3, voir README.md) ----------------------- */

.titre-xl { font-size: var(--titre-xl-size); }
.titre-sm { font-size: var(--titre-sm-size); }
.couleur-teal { color: var(--teal-text); }
.couleur-navy { color: var(--navy); }
.couleur-blanc { color: var(--on-dark); }

/* --- Utilitaires ------------------------------------------------------------ */

/* Mot composé à ne pas couper en fin de ligne (« start-up »).
   display: contents : dans un parent flex (titres de carte, tuiles), le span
   ne devient pas un bloc séparé et le texte reste d'un seul tenant. */
.insecable {
  display: contents;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.evitement {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 10;
  padding: .75rem 1rem;
  background: var(--surface);
  color: var(--navy);
  border-radius: var(--radius);
}

.evitement:focus {
  top: .5rem;
}

.conteneur {
  width: 100%;
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-space);
  overflow: hidden;
}

.section--blanche {
  background: var(--surface);
}

.section--arc::before {
  content: "";
  position: absolute;
  top: -12rem;
  right: -10rem;
  width: 26rem;
  height: 26rem;
  border: 4rem solid var(--arc-soft);
  border-radius: 50%;
}

.section > .conteneur {
  position: relative;
}

.sombre {
  --h1-color: var(--on-dark);
  --h2-color: var(--on-dark);
  --h3-color: var(--on-dark);
  --h4-color: var(--on-dark);
  --text-color: var(--on-dark-muted);
  --strong-color: var(--on-dark);
  --link-color: var(--teal-light);
  --accent-color: var(--teal-light);
  --eyebrow-color: var(--teal-light);
  --rule-color: var(--teal-light);
  --focus-color: var(--on-dark);
  background: var(--navy-deep);
  color: var(--text-color);
}

.navy {
  --fondu: var(--navy);
  --fondu-0: var(--navy-0);
  background: var(--navy);
}

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

.surtitre {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  color: var(--eyebrow-color);
  font-size: var(--eyebrow-size);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.surtitre::before,
.surtitre::after {
  content: "";
  flex: 0 1 3rem;
  min-width: .75rem;
  height: 1px;
  background: currentColor;
}

.surtitre--centre {
  justify-content: center;
}

.entete-section {
  max-width: 50rem;
  margin-bottom: 2.5rem;
}

.entete-section--centre {
  margin-inline: auto;
  text-align: center;
}

/* Centré sur mobile, à gauche dès 640px (texte de nouveau justifié). */
.entete-section--centre-mobile {
  text-align: center;
}

.entete-section--centre-mobile .surtitre {
  justify-content: center;
}

.entete-section--centre-mobile p {
  text-align: inherit;
  hyphens: manual;
}

.entete-section--centre-mobile .avec-filet::after {
  margin-inline: auto;
}

.entete-section--centre-mobile .pastilles {
  justify-content: center;
}

@media (min-width: 640px) {
  .entete-section--centre-mobile {
    text-align: start;
  }

  .entete-section--centre-mobile .surtitre,
  .entete-section--centre-mobile .pastilles {
    justify-content: flex-start;
  }

  .entete-section--centre-mobile .avec-filet::after {
    margin-inline: 0;
  }

  .entete-section--centre-mobile p:where(:not([class])) {
    text-align: justify;
    hyphens: auto;
  }
}

.avec-filet::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: .75rem;
  background: var(--rule-color);
}

.pastille-icone {
  display: grid;
  flex: none;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--teal-soft);
  color: var(--teal-text);
  border-radius: 50%;
}

.pastille-icone--carree {
  border-radius: var(--radius-lg);
}

.pastille-icone--petite {
  width: 2.75rem;
  height: 2.75rem;
}

/* --- Boutons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  min-height: 44px;
  padding: .75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: var(--btn-size);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}

.btn-primary {
  background: var(--teal-btn);
  color: var(--on-dark);
}

.btn-primary:hover {
  background: var(--teal-btn-hover);
}

.btn-secondary {
  border-color: currentColor;
  background: transparent;
  color: var(--navy);
}

.sombre .btn-secondary {
  color: var(--on-dark);
}

.btn-secondary:hover {
  background: var(--teal-soft);
  color: var(--navy);
}

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

.btn-navy:hover {
  background: var(--navy-deep);
}

/* Mobile : boutons empilés et centrés, tous à la largeur du plus long */
.groupe-boutons {
  display: grid;
  grid-template-columns: fit-content(100%);
  justify-content: center;
  gap: .75rem 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 640px) {
  .groupe-boutons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.lien-plus {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 24px;
  color: var(--link-color);
  font-size: var(--link-more-size);
  font-weight: 600;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}

.lien-plus:hover {
  text-decoration: underline;
}

/* --- En-tête et menu burger (popover natif, sans JS) ------------------------- */

/* Menu collé en haut de l'écran pendant le défilement. */
.site-header {
  --focus-color: var(--on-dark);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: .75rem var(--gutter);
  background: var(--navy);
  color: var(--on-dark);
}

.logo {
  color: var(--on-dark);
  font-size: var(--logo-size);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.logo span {
  color: var(--teal-light);
}

.burger,
.menu-fermer {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
}

#menu {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--on-dark);
}

#menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#menu li a {
  display: block;
  padding: .5rem 0;
  color: var(--on-dark);
  text-decoration: none;
}

#menu li a:hover,
#menu li a[aria-current="page"] {
  color: var(--teal-light);
}

#menu li a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .35em;
}

/* Sous-menus (expertises, secteurs) : en retrait dans le tiroir mobile, déroulants dès 900px. */
#menu .menu-deroulant:has([aria-current="page"]) > a {
  color: var(--teal-light);
}

#menu .sous-menu {
  padding-left: 1rem;
}

#menu .sous-menu a {
  font-size: var(--text-sm-size);
}

/* Panneau mobile : uniquement quand le popover est ouvert. */
#menu:popover-open {
  position: fixed;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: min(85vw, 22rem);
  height: 100dvh;
  margin: 0;
  padding: 1rem 1.5rem 1.5rem;
  overflow-y: auto;
  background: var(--navy);
}

#menu:popover-open ul {
  flex-direction: column;
}

/* Tiroir plus haut que l'écran : il défile, sans tasser la croix ni le bouton. */
#menu:popover-open > * {
  flex-shrink: 0;
}

#menu:popover-open li a {
  padding: .75rem 0;
  border-bottom: 1px solid var(--line-on-dark);
}

#menu:popover-open .menu-fermer {
  align-self: flex-end;
  order: -2;
}

/* Tiroir mobile : « Prendre rendez-vous » en tête, sous la croix. */
#menu:popover-open > .btn {
  order: -1;
}

/* Tiroir mobile : sous-menus fermés, dépliés en touchant leur libellé.
   Le libellé devient un summary (details vide ; :has() montre la liste voisine)
   et la page d'aperçu passe en tête de liste (« Toutes les expertises »).
   Sans :has(), les listes restent ouvertes sous le lien, comme sur ordinateur. */
.deplier,
.sous-menu-tout {
  display: none;
}

@media (max-width: 899.98px) {
  @supports selector(:has(a)) {
    #menu:popover-open .menu-deroulant > a {
      display: none;
    }

    #menu:popover-open .deplier,
    #menu:popover-open .sous-menu-tout {
      display: block;
    }

    #menu:popover-open .menu-deroulant > .sous-menu {
      display: none;
    }

    #menu:popover-open .menu-deroulant:has(> .deplier[open]) > .sous-menu {
      display: flex;
    }
  }
}

.deplier summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line-on-dark);
  color: var(--on-dark);
  list-style: none;
  cursor: pointer;
}

#menu .menu-deroulant:has([aria-current="page"]) .deplier summary {
  color: var(--teal-light);
}

.deplier summary::-webkit-details-marker {
  display: none;
}

/* Chevron dessiné en bordures, comme sur ordinateur, calé à droite. */
.deplier summary::after {
  content: "";
  width: .5rem;
  height: .5rem;
  margin-right: .5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform .2s;
}

.deplier[open] summary::after {
  transform: translateY(25%) rotate(225deg);
}

#menu::backdrop {
  background: var(--backdrop);
}

@media (prefers-reduced-motion: no-preference) {
  #menu:popover-open {
    animation: tiroir .2s ease-out;
  }
}

@keyframes tiroir {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Navigateurs sans popover : menu affiché en clair sous le logo,
   en-tête non collé (il occuperait une grande part de l'écran mobile). */
@supports not selector(:popover-open) {
  .site-header {
    position: static;
  }

  .burger,
  .menu-fermer {
    display: none;
  }

  #menu {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .site-header {
    flex-wrap: nowrap;
    padding-inline: max(1.5rem, calc((100% - var(--largeur-max)) / 2 + var(--gutter)));
  }

  .burger,
  .menu-fermer,
  #menu:popover-open .menu-fermer {
    display: none;
  }

  #menu,
  #menu:popover-open {
    position: static;
    inset: auto;
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    animation: none;
  }

  #menu ul,
  #menu:popover-open ul {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-inline: auto;
  }

  #menu:popover-open li a {
    padding: .5rem 0;
    border-bottom: 0;
  }

  #menu:popover-open > .btn {
    order: 0;
  }

  #menu::backdrop {
    display: none;
  }

  #menu .menu-deroulant {
    position: relative;
  }

  /* Chevron dessiné en bordures : suit la couleur du lien, hors soulignement. */
  #menu .menu-deroulant > a::after {
    content: "";
    display: inline-block;
    width: .4em;
    height: .4em;
    margin-left: .5rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    vertical-align: .25em;
    transform: rotate(45deg);
    transition: transform .2s;
  }

  #menu .menu-deroulant:hover > a::after,
  #menu .menu-deroulant:focus-within > a::after {
    vertical-align: .05em;
    transform: rotate(225deg);
  }

  /* Ouvert au survol et quand le focus clavier entre dans le sous-menu. */
  #menu .sous-menu,
  #menu:popover-open .sous-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    z-index: 5;
    flex-direction: column;
    gap: 0;
    min-width: 22rem;
    margin: 0;
    padding: .5rem 0;
    background: var(--navy);
    border: 1px solid var(--line-on-dark);
    border-radius: var(--radius);
    visibility: hidden;
    opacity: 0;
  }

  #menu .menu-deroulant:hover > .sous-menu,
  #menu .menu-deroulant:focus-within > .sous-menu {
    visibility: visible;
    opacity: 1;
  }

  #menu .sous-menu a,
  #menu:popover-open .sous-menu a {
    padding: .5rem 1rem;
  }
}

/* --- Bandeaux ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-contenu {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-citation {
  color: var(--on-dark);
  font-size: var(--text-lg-size);
  font-style: italic;
}

/* Mobile : photo en fond du hero, sous un voile navy qui garde le texte lisible.
   Dès 900px, elle passe à droite avec un dégradé (voir plus bas). */
.hero-visuel {
  position: absolute;
  inset: 0;
}

.hero-visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visuel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy-deep-voile);
}

.bandeau-page {
  padding-block: var(--bandeau-space);
}

.bandeau-page > .conteneur > * {
  max-width: 56rem;
}

.bandeau-page h1 {
  margin-bottom: 1rem;
}

.bandeau-page p:last-child {
  margin-bottom: 0;
}

.bandeau-contact {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.bandeau-contact p {
  max-width: 44rem;
  margin-inline: auto;
}

.bandeau-contact .groupe-boutons {
  justify-content: center;
}

@media (min-width: 900px) {
  .hero::before,
  .bandeau-contact::before {
    content: "";
    position: absolute;
    bottom: -9rem;
    left: -9rem;
    width: 20rem;
    height: 20rem;
    border: 1px solid var(--teal);
    border-radius: 50%;
    background: var(--teal-arc);
  }

  .hero-contenu {
    max-width: var(--largeur-max);
  }

  .hero-contenu > * {
    max-width: min(46rem, 56vw);
  }

  .hero-visuel {
    inset: 0 0 0 auto;
    width: 55%;
  }

  .hero-visuel::after {
    background: linear-gradient(90deg, var(--navy-deep) 8%, var(--navy-deep-0) 75%);
  }
}

/* --- Cartes et grilles ------------------------------------------------------- */

.grille {
  display: grid;
  gap: 1rem;
}

.card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card > div {
  min-width: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

/* « En savoir plus » calé en bas de la carte, aligné d'une carte à l'autre. */
.card > div:has(> .lien-plus) {
  display: flex;
  flex-direction: column;
}

.card .lien-plus {
  align-self: flex-start;
  margin-top: auto;
}

/* Liste à filets : lecture en colonnes (1 à 5, puis 6 à 10) dès 640px. */
.liste-secteurs {
  display: grid;
  column-gap: 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.liste-secteurs li {
  border-bottom: 1px solid var(--border);
}

.liste-secteurs li:first-child {
  border-top: 1px solid var(--border);
}

.liste-secteurs a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding-block: 1rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

/* Listes resserrées dans les cartes de secteurs.html. */
.categorie .liste-secteurs a {
  min-height: 3.75rem;
  padding-block: .75rem;
}

.liste-secteurs .icone {
  color: var(--teal-text);
}

.liste-secteurs .fleche {
  margin-left: auto;
  padding-left: .75rem;
  color: var(--text-muted);
}

/* Filet turquoise posé sur le filet gris au survol. */
.liste-secteurs a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
}

.liste-secteurs a:hover::after,
.liste-secteurs a:focus-visible::after {
  transform: scaleX(1);
}

.liste-secteurs a:hover .fleche,
.liste-secteurs a:focus-visible .fleche {
  color: var(--teal-text);
  transform: translateX(4px);
}

@media (prefers-reduced-motion: no-preference) {
  .liste-secteurs a::after {
    transition: transform .3s;
  }

  .liste-secteurs .fleche {
    transition: transform .2s, color .2s;
  }
}

@media (min-width: 640px) {
  .liste-secteurs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
  }

  .liste-secteurs li:nth-child(6) {
    border-top: 1px solid var(--border);
  }
}

/* Sur fond sombre (accueil). */
.sombre .liste-secteurs li {
  border-color: var(--line-on-dark);
}

.sombre .liste-secteurs a {
  color: var(--on-dark);
}

.sombre .liste-secteurs .icone,
.sombre .liste-secteurs a:hover .fleche,
.sombre .liste-secteurs a:focus-visible .fleche {
  color: var(--teal-light);
}

.sombre .liste-secteurs .fleche {
  color: var(--on-dark-muted);
}

.sombre .liste-secteurs a::after {
  background: var(--teal-light);
}
/* Contenu à gauche, photo à droite, sur toute la hauteur de la section
   et jusqu'au bord de l'écran (dès 1024px). */
.image-pleine {
  display: none;
}

@media (min-width: 1024px) {
  .colonnes-image {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 4rem;
  }

  /* Annule la marge de la section en haut et en bas, et celle du conteneur à droite. */
  .image-pleine {
    position: relative;
    display: block;
    max-width: none;
    margin-block: calc(-1 * var(--section-space));
    margin-right: calc(-1 * max(var(--gutter), (100vw - var(--largeur-max)) / 2 + var(--gutter)));
  }

  .image-pleine img,
  .image-pleine::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .image-pleine img {
    object-fit: cover;
  }

  /* Même dégradé que le hero : la photo se fond dans le fond navy de la section. */
  .image-pleine::after {
    content: "";
    background: linear-gradient(90deg, var(--fondu, var(--navy-deep)) 8%, var(--fondu-0, var(--navy-deep-0)) 75%);
  }
}

@media (min-width: 640px) {
  .grille--2,
  .grille--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grille--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Notre cabinet ------------------------------------------------------------ */

.pastilles {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.pastilles li {
  padding: .25rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  font-size: var(--text-sm-size);
}

.fondateur {
  display: grid;
  gap: 2rem;
}

.fondateur-photo img {
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
  border-radius: var(--radius-lg);
}

/* Photo centrée sur mobile, calée à gauche dès 640px. */
@media (min-width: 640px) {
  .fondateur-photo img {
    margin-inline: 0;
  }
}

/* Citation du fondateur, en bandeau navy sous sa présentation. */
.citation {
  --text-color: var(--on-dark);
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}

/* Guillemet décoratif ; texte alternatif vide pour les lecteurs d'écran. */
.citation::before {
  content: "«" / "";
  display: block;
  color: var(--teal-light);
  font-family: var(--font-title);
  font-size: var(--quote-mark-size);
  line-height: .8;
}

.citation p {
  margin-bottom: 1.5rem;
  font-family: var(--font-title);
  font-size: var(--quote-size);
  line-height: 1.45;
  text-wrap: balance;
}

.citation footer {
  color: var(--teal-light);
  font-size: var(--text-sm-size);
  font-weight: 600;
}

.valeur {
  --valeur-duree: .25s;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background-color var(--valeur-duree), border-color var(--valeur-duree);
}

.valeur h3,
.valeur p {
  transition: color var(--valeur-duree);
}

.valeur p:last-child {
  margin-bottom: 0;
}

/* Cartes de valeur : centrées sur mobile (une colonne), à gauche dès 640px. */
.valeur,
.valeur p {
  text-align: center;
  hyphens: manual;
}

.valeur .avec-filet::after {
  margin-inline: auto;
}

@media (min-width: 640px) {
  .valeur,
  .valeur p {
    text-align: start;
  }

  .valeur .avec-filet::after {
    margin-inline: 0;
  }
}

.valeur:hover,
.valeur:focus-within {
  --h3-color: var(--on-dark);
  --text-color: var(--on-dark);
  --rule-color: var(--teal-light);
  background: var(--navy);
  border-color: var(--navy);
}

@media (prefers-reduced-motion: reduce) {
  .valeur {
    --valeur-duree: 0s;
  }
}

@media (min-width: 640px) {
  .valeur:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .fondateur {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
}

/* --- Expertises et secteurs ---------------------------------------------------- */

/* Tuiles cliquables : sommaire de page (flèche ↓) ou liens vers d'autres pages (flèche →). */
.tuiles {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tuiles li {
  display: flex;
}

.tuiles a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 .75rem 2rem var(--shadow);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s;
}

.tuiles a::after {
  content: "↓";
  content: "↓" / "";
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--teal-text);
  transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}

.tuiles a:hover,
.tuiles a:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 1.25rem 2.5rem var(--shadow);
  color: var(--on-dark);
  transform: translateY(-4px);
}

.tuiles a:hover::after,
.tuiles a:focus-visible::after {
  background: var(--teal-btn);
  border-color: var(--teal-btn);
  color: var(--on-dark);
  transform: translateY(3px);
}

/* Contour intérieur : lisible sur fond navy comme sur fond clair. */
.tuiles a:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: -6px;
}

/* Liens vers d'autres pages : flèche →, tuiles centrées (une ligne incomplète reste au milieu). */
.tuiles--pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.tuiles--pages li {
  flex: 1 1 100%;
}

.tuiles--pages a::after {
  content: "→";
  content: "→" / "";
}

.tuiles--pages a:hover::after,
.tuiles--pages a:focus-visible::after {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .tuiles a,
  .tuiles a::after {
    transition: none;
  }

  .tuiles a:hover,
  .tuiles a:focus-visible,
  .tuiles a:hover::after,
  .tuiles a:focus-visible::after {
    transform: none;
  }
}

@media (min-width: 640px) {
  .tuiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tuiles:has(> li:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tuiles--pages li {
    flex: 0 1 calc((100% - 1rem) / 2);
  }
}

@media (min-width: 1024px) {
  .tuiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tuiles:has(> li:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tuiles--pages li {
    flex-basis: calc((100% - 2rem) / 3);
  }
}

.fil-ariane ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  margin: 0 0 1rem;
  padding: 0;
  font-size: var(--text-sm-size);
  list-style: none;
}

.fil-ariane li + li::before {
  content: "/";
  content: "/" / "";
  margin-right: .5rem;
}

/* Pages d'ensemble (expertises, secteurs) : une carte par entrée.
   Sous-grille (titre, texte, lien, plus la liste des secteurs) :
   chaque rangée est alignée d'une carte à l'autre. */
.categorie {
  --h2-size: var(--panneau-title-size);
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.categorie:has(> .categorie-image) {
  grid-row: span 4;
}

/* Image pleine largeur en haut de la carte, par-dessus la marge intérieure.
   Le cadre 16:9 porte la taille et l'image y est positionnée : sinon Firefox
   dimensionne la rangée sur la taille native de l'image (800×450). */
.categorie-image {
  position: relative;
  margin: -1.5rem -1.5rem 1.5rem;
  aspect-ratio: 16 / 9;
}

.categorie-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Filet calé en bas de la rangée du titre : même hauteur d'une carte à l'autre. */
.categorie h2 {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.categorie h2::after {
  margin-top: auto;
}

.categorie .liste-secteurs {
  grid-template-columns: none;
  grid-template-rows: none;
  grid-auto-flow: row;
}

.categorie .lien-plus {
  justify-self: start;
  align-self: end;
}

.titre-icone {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.titre-icone h2 {
  margin-bottom: 0;
}

.accroche {
  font-size: var(--text-lg-size);
}

.coches {
  display: grid;
  gap: .625rem 2rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.coches li {
  position: relative;
  padding-left: 1.75rem;
}

.coches li::before {
  content: "✓";
  content: "✓" / "";
  position: absolute;
  left: 0;
  color: var(--teal-text);
  font-weight: 600;
}

/* Sur les pages d'expertise, les sous-titres sont des h2 à la taille d'un h3. */
.sous-groupe {
  --h2-size: var(--h3-size);
  margin-top: 2rem;
}

.encart {
  --text-color: var(--on-dark);
  --eyebrow-color: var(--teal-light);
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--navy);
  border-radius: var(--radius-lg);
}

.encart p:last-child {
  margin-bottom: 0;
}

.encart-titre {
  margin-bottom: .5rem;
  color: var(--eyebrow-color);
  font-size: var(--eyebrow-size);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fin-section {
  margin: 1.75rem 0 0;
  text-align: center;
}

/* --- Contact ------------------------------------------------------------------- */

.contact-grille {
  display: grid;
  gap: 1.5rem;
}

.panneau {
  --h2-size: var(--panneau-title-size);
  min-width: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.coordonnees {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.coordonnees li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--navy);
}

.coordonnees-libelle {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-xs-size);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.carte {
  --h2-size: var(--h3-size);
  margin-top: 1.5rem;
}

.carte-lien {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s;
}

.carte-lien img {
  width: 100%;
}

.carte-cta {
  display: block;
  padding: .75rem 1rem;
  background: var(--teal-soft);
}

.carte-lien:hover {
  border-color: var(--teal-text);
}

.carte-lien:hover .carte-cta {
  text-decoration: underline;
}

.carte-note {
  margin: .5rem 0 0;
  color: var(--text-muted);
  font-size: var(--text-xs-size);
}

.whatsapp {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block: 1.25rem;
}

.whatsapp .titre-icone {
  align-items: center;
  margin-bottom: 0;
}

.whatsapp h3 {
  margin-bottom: 0;
}

.whatsapp p {
  margin-bottom: 0;
}

.whatsapp .btn {
  align-self: flex-start;
}

.separateur {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.25rem;
  color: var(--text-muted);
  font-size: var(--text-sm-size);
  font-weight: 600;
}

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

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form p {
  margin-bottom: 0;
}

.form-note,
.form-legal {
  font-size: var(--text-sm-size);
}

.champ {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: .375rem;
}

.champ label {
  color: var(--label-color);
  font-size: var(--label-size);
  font-weight: 600;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  min-height: 44px;
  padding: .625rem .75rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--input-color);
  font-family: var(--font-text);
  font-size: var(--input-size);
}

.champ textarea {
  resize: vertical;
}

.champ :user-invalid {
  border-color: var(--error);
  outline: 1px solid var(--error);
}

.piege {
  position: absolute;
  left: -9999px;
}

.msg-erreur {
  display: none;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--error);
  background: var(--bg);
  color: var(--error);
}

.msg-erreur:target {
  display: block;
}

.contact-form .btn {
  justify-self: start;
}

@media (min-width: 640px) {
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-form > .pleine-largeur,
  .contact-form > p,
  .contact-form > .btn {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .contact-grille {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    align-items: start;
  }
}

/* --- Pages simples -------------------------------------------------------------- */

.texte-long {
  max-width: 48rem;
}

.texte-long h2 {
  margin-top: 2rem;
}

.page-simple {
  text-align: center;
}

.page-simple .conteneur > * {
  margin-inline: auto;
}

.page-simple .groupe-boutons {
  justify-content: center;
}

/* --- Remonter en haut --------------------------------------------------------------
   Sans JavaScript : la zone commence un écran sous le haut de la page et descend
   jusqu'en bas ; le bouton y colle au bas de l'écran. Il n'apparaît donc qu'après
   avoir fait défiler la page, et jamais sur une page plus courte que l'écran. */

.remonter-zone {
  position: absolute;
  top: calc(100vh + 1.5rem); /* + 1.5rem : l'ombre ne dépasse pas avant défilement */
  right: var(--gutter);
  bottom: 0;
  z-index: 10;
  pointer-events: none;
}

.remonter {
  position: sticky;
  top: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  background: var(--teal-btn);
  box-shadow: 0 .25rem 1rem var(--shadow);
  color: var(--on-dark);
  pointer-events: auto;
}

.remonter:hover {
  background: var(--teal-btn-hover);
}

/* --- Pied de page ---------------------------------------------------------------- */

.site-footer {
  --text-color: var(--on-dark);
  --focus-color: var(--on-dark);
  padding-top: 3rem;
  background: var(--navy);
  color: var(--on-dark);
}

.footer-grille {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-grille a {
  color: var(--on-dark);
  text-decoration: none;
}

.footer-grille a:hover {
  text-decoration: underline;
}

.footer-titre {
  margin-bottom: .75rem;
  color: var(--teal-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: var(--text-sm-size);
}

.footer-liste,
.footer-contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-liste li {
  margin-bottom: .25rem;
}

.footer-liste a {
  display: inline-block;
  padding-block: .125rem;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  margin-bottom: .75rem;
}

.footer-contact .icone {
  color: var(--teal-light);
}

.footer-linkedin {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
}

.footer-grille .footer-linkedin {
  color: var(--teal-light);
}

.badges {
  display: flex;
  gap: .625rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  padding: .25rem .75rem;
  border: 1px solid var(--line-on-dark);
  font-size: var(--text-sm-size);
}

.footer-bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.25rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line-on-dark);
  font-size: var(--text-xs-size);
}

.footer-bas p {
  margin: 0;
}

.footer-bas ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bas a {
  display: inline-block;
  padding-block: .375rem;
  color: var(--on-dark);
  text-decoration: none;
}

.footer-bas a:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .footer-grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-grille {
    grid-template-columns: 1.2fr 1.4fr 1.1fr 1.1fr;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: 32px;
  }
}
