/* =====================================================================
   Alpages : compléments au style Webflow d'origine (alpages.css)
   - équivalents "classes" des placements de grille liés aux identifiants
     Webflow, pour que les listes générées par la base de données
     gardent exactement la même mise en page ;
   - animations auparavant gérées par webflow.js ;
   - nouveaux éléments (coordonnées protégées, fenêtre stage,
     légendes, page de texte…).
   ===================================================================== */

html { scroll-behavior: smooth; }

/* Nohemi partout par défaut (sur Webflow, les textes sans style propre
   retombaient sur la police système) */
body { font-family: Nohemi, Arial, sans-serif; }
button, .button, .badge-static { font-family: Nohemi, Arial, sans-serif; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

figure { margin: 0; }
/* Les attributs width/height servent à réserver la place : la hauteur suit la largeur */
:where(img[width][height]) { height: auto; }
dl, dd { margin: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--thierry-bleu); color: #fff; padding: .6rem 1rem; border-radius: 6px;
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--thierry-bleu); outline-offset: 3px; }
button.button { border: 0; font: inherit; cursor: pointer; }

/* --- Badge « DEPUIS 1998 » : purement informatif ------------------- */
.badge-static { cursor: default; }

/* --- Catégories (boutons dans un conteneur neutre) ------------------ */
.cat_buttons { display: contents; }
button.fs-styleguide_cat_button {
  border: 0; text-align: right; font-family: Mango Grotesque, Arial, sans-serif;
  transition: background-color .15s, color .15s;
}
.fs-styleguide_cat_button.is-active,
.fs-styleguide_cat_button[aria-pressed="true"] { background-color: var(--thierry-bleu); color: var(--white); }
.img_cat { transition: opacity .35s ease; }
.img_cat.is-active { opacity: 1; }
.img_cat.sample:not(.is-active) { opacity: 0; }
.text_cat.is-active { display: block; }
.text_cat.sample.is-hidden { display: none; }

/* --- Cartes projets : équivalents des règles #w-node ---------------- */
.pc { grid-area: span 1 / span 7 / span 1 / span 7; }
.pc-title { justify-self: start; }
.pc-list { grid-area: span 1 / span 1 / span 1 / span 1; place-self: center start; }
.pc-list dt, .pc-list dd { margin: 0; }
a.pc { text-decoration: none; }
@media screen and (max-width: 991px) {
  .pc { grid-column: span 7 / span 7; }
}
@media screen and (max-width: 767px) {
  .pc--detail .pc-title { grid-area: 1 / 1 / 2 / 3; }
  .pc--detail .pc-list { grid-area: 2 / 1 / 3 / 3; }
  .pc-thumb { grid-area: 1 / 3 / 3 / 4; justify-self: end; }
  .pc--list .pc-list { width: 100%; }
}
@media screen and (max-width: 479px) {
  .pc-title, .pc--detail .pc-title { grid-area: span 1 / span 3 / span 1 / span 3; }
  .pc-list, .pc--detail .pc-list { grid-area: span 1 / span 3 / span 1 / span 3; }
  .pc-thumb { grid-area: span 2 / span 3 / span 2 / span 3; width: 100%; }
  .pc .div_project_thumb_in { aspect-ratio: 16 / 9; width: 100%; opacity: 1; }
  .pc .img_project_thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
  .pc, .div_project.sans { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding-left: 1.25rem; padding-right: 1.25rem; }
  .main_projectlist_grid2 { min-width: 0; max-width: 100%; }
  .pc .no-wrap { white-space: normal; }
  .pc dd { overflow-wrap: anywhere; min-width: 0; }
  .pc .pc-list { width: 100%; max-width: 100%; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; }
}

/* Survol des cartes (souris uniquement), comme l'animation Webflow */
@media (min-width: 992px) and (hover: hover) {
  .pc--detail .plusbtn { opacity: 1; transform: scale(1); transition: opacity .2s cubic-bezier(.165,.84,.44,1), transform .2s cubic-bezier(.165,.84,.44,1); }
  .pc--detail .div_project_thumb_in { opacity: 0; transform: scale(.9); transition: opacity .2s cubic-bezier(.165,.84,.44,1), transform .2s cubic-bezier(.165,.84,.44,1); }
  .pc--detail .button.project { opacity: 0; transform: translateX(-10px); transition: opacity .4s cubic-bezier(.165,.84,.44,1), transform .4s cubic-bezier(.165,.84,.44,1); }
  .pc--detail:hover .plusbtn, .pc--detail:focus-visible .plusbtn { opacity: 0; transform: scale(.8); }
  .pc--detail:hover .div_project_thumb_in, .pc--detail:focus-visible .div_project_thumb_in { opacity: 1; transform: scale(1); }
  .pc--detail:hover .button.project, .pc--detail:focus-visible .button.project { opacity: 1; transform: translateX(0); }
}
.img_project_thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

/* Cartes des projets listés : pas de survol « cliquable », colonnes régulières */
.pc--list { cursor: default; }
@media screen and (min-width: 768px) {
  .pc--list .div_project_in.sans { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .pc--list .pc-list { grid-template-columns: auto 1fr; column-gap: 1.25rem; }
}

/* --- Galerie des fiches projets ------------------------------------- */
.gal-item { grid-area: span 1 / span 4 / span 1 / span 4; }
.gal-filler { grid-area: span 1 / span 1 / span 1 / span 1; }
@media screen and (max-width: 767px) {
  .gal-item { grid-column: span 5 / span 5; }
}
.img_legende {
  margin-top: .5rem; font-size: .85rem; line-height: 1.4; color: var(--thierry-vert);
  font-family: Nohemi, Arial, sans-serif; font-weight: 200;
}
.project_main_fig { display: block; }
.project_main_fig .project_main_img { width: 100%; height: auto; display: block; }
.project_chapeau { margin-bottom: 1rem; }
.projet_chapeau_wrapper p + p { margin-top: .75rem; }

/* Photo seule en pleine largeur (option « avant / après » désactivée) */
.project_hero { overflow: hidden; border-radius: 6px; }
.project_hero_img { display: block; width: 100%; aspect-ratio: 2; object-fit: cover; }
@media screen and (max-width: 767px) { .project_hero_img { aspect-ratio: 4 / 3; } }

/* --- Comparateur avant / après --------------------------------------- */
.js-splitter { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.js-splitter img { pointer-events: none; -webkit-user-drag: none; }
.js-splitter .splitter_handle-component { transform: translateX(-50%); cursor: ew-resize; }
.js-splitter .splitter_handle-component:focus-visible { outline: none; }
.js-splitter .splitter_handle-component:focus-visible .splitter_handle-circle { box-shadow: 0 0 0 3px var(--thierry-bleu); }
.js-splitter.is-dragging { cursor: ew-resize; }
.js-splitter .spliter_after .splitter_image.is-after { max-width: none; right: 0; left: auto; height: 100%; }

/* --- Menu de l'accueil : apparaît en quittant le premier écran ------- */
.section_menu.is-home .div_menu { transition: opacity .25s linear; }
.section_menu.is-home .div_menu { opacity: 0; pointer-events: none; }
.section_menu.is-home .div_menu.is-visible { pointer-events: auto; }
@media screen and (max-width: 991px) {
  .section_menu.is-home .div_menu { opacity: 1; pointer-events: auto; }
}

/* --- Séparateur animé (« growIn ») ----------------------------------- */

.js-grow { opacity: 0; transform: scale(.75); transition: opacity 1s cubic-bezier(.165,.84,.44,1) .4s, transform 1s cubic-bezier(.165,.84,.44,1) .4s; }
.js-grow.is-in { opacity: 1; transform: scale(1); }

/* --- Coordonnées protégées ------------------------------------------- */
.js-protect { display: inline; }
.protect-btn {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.protect-btn:hover { text-decoration-thickness: 2px; }
.js-protect a { color: inherit; text-decoration: none; }
.js-protect a:hover { text-decoration: underline; text-underline-offset: 3px; }
.protect-wait { opacity: .5; }
.noscript-note { text-align: center; font-family: Nohemi, Arial, sans-serif; padding: 1rem; margin: 0; }

/* --- Liste des clients ------------------------------------------------ */
ul.div_client_list { list-style: none; margin: 0; padding: 0; }
.client_item { display: contents; }

/* --- Logo des pages intérieures -------------------------------------- */
.link_logo_inner { display: block; }

/* --- Fenêtre « Demande de stage » ------------------------------------ */
.site-dialog {
  border: 0; padding: 0; border-radius: 8px; max-width: min(36rem, calc(100vw - 2rem));
  width: 100%; color: var(--thierry-bleu); background: var(--thierry-verte-clair);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.site-dialog::backdrop { background: rgba(41,79,125,.45); backdrop-filter: blur(2px); }
.site-dialog__inner { padding: 2.25rem 2rem 2rem; position: relative; }
.site-dialog__title {
  font-family: Mango Grotesque, Arial, sans-serif; font-weight: 500; font-size: 3rem; line-height: 1;
  margin: 0 0 1rem; color: var(--thierry-vert);
}
.site-dialog__close {
  position: absolute; top: .75rem; right: .75rem; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--thierry-vert); background: transparent; color: var(--thierry-vert);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.site-dialog__close:hover { background: var(--thierry-vert); color: #fff; }
.site-dialog[open] { animation: dialog-in .25s cubic-bezier(.165,.84,.44,1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* --- Textes riches (mentions légales, stage) ------------------------- */
.rich-text { font-family: Nohemi, Arial, sans-serif; font-weight: 200; line-height: 1.55; }
.rich-text p { margin: 0 0 .9rem; }
.rich-text h2, .rich-text h3 {
  font-family: Nohemi, Arial, sans-serif; font-weight: 500; color: var(--thierry-vert);
  margin: 2rem 0 .75rem; line-height: 1.2;
}
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.15rem; }
.rich-text ul, .rich-text ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.rich-text a { color: var(--thierry-bleu); text-underline-offset: 3px; }
.rich-text strong, .rich-text b { font-weight: 500; }

.section_text_page { padding-top: 13rem; padding-bottom: 6rem; position: relative; z-index: 1; }
.section_text_page .fs-styleguide_heading-medium { margin-bottom: 2rem; }
.text-page { max-width: 46rem; color: var(--thierry-bleu); font-size: 1.05rem; }
.text-page-btn { margin-top: 2rem; display: inline-flex; width: auto; }
@media screen and (max-width: 767px) {
  .section_text_page { padding-top: 9rem; }
}

/* Titres de page en <h1> : même apparence que les <h2> d'origine */
h1.heading-style-h1, h1.fs-styleguide_heading-medium { text-transform: none; color: var(--thierry-bleu); }

/* Portrait : toujours rond */
.img_rond_profil { aspect-ratio: 1; height: auto; max-width: 250px; object-fit: cover; }

/* --- Fiche projet : carte d'en-tête (maquettes ordi / tablette / téléphone) --- */
.div_project.project_in { margin-left: 7.5rem; margin-right: 7.5rem; border-radius: 6px; }
.project_in .div_project_in {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 25%) minmax(0, 25%);
  column-gap: 1rem; row-gap: 1.5rem; align-items: center;
}
.project_in .project-title { justify-self: start; margin: 0; }
.project_in .project-facts {
  grid-column: span 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 1rem; row-gap: .6rem; width: 100%; align-self: center; place-self: center stretch;
}
.project_in .project-facts dt, .project_in .project-facts dd { margin: 0; }
/* Tablette : même disposition que l'ordinateur (titre et informations sur la même ligne) */
@media screen and (max-width: 991px) {
  .div_project.project_in { width: 80vw; margin-left: auto; margin-right: auto; }
  .project_in .project-title { font-size: 3rem; }
}
/* Téléphone horizontal et vertical (767 px et moins) : titre sur toute la largeur,
   informations en deux colonnes dessous. Les sélecteurs #w-node couvrent l'ancien project.php. */
@media screen and (max-width: 767px) {
  .div_project.project_in .div_project_in { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 1.25rem; }
  .div_project.project_in .div_project_in > h1,
  .div_project.project_in .div_project_in > dl,
  #w-node-c98a2ea4-bbeb-26b1-84e0-47e133401542-6a177b35,
  #w-node-c98a2ea4-bbeb-26b1-84e0-47e133401544-6a177b35 {
    grid-column: 1 / -1; grid-row: auto; justify-self: stretch; width: 100%; max-width: none;
  }
  .div_project.project_in .div_project_in > dl,
  #w-node-c98a2ea4-bbeb-26b1-84e0-47e133401544-6a177b35 {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); row-gap: .5rem; column-gap: 1rem;
  }
  .div_project.project_in .div_project_in > dl dd { margin: 0; }
}
/* Téléphone vertical : carte presque pleine largeur, lieu et année centrés */
@media screen and (max-width: 479px) {
  .div_project.project_in { width: auto; margin-left: 1rem; margin-right: 1rem; }
  .project_in > .text-size-thin, .project_in > .text-size-tiny { text-align: center; }
  .project_in .project-title { font-size: 3rem; }
}

/* --- Clients : blocs côte à côte qui passent à la ligne seulement si nécessaire --- */
#w-node-_2a1ad3e0-40d4-3034-4ed8-1e77e89d5b74-83bbded9.div_client { grid-column: 3 / 7; }
.div_client_list { column-gap: 1.75rem; row-gap: .6rem; }
.div_client_list .heading-style-h4.thin { white-space: nowrap; display: inline-block; padding: 0 .25rem; border-radius: 4px; }
@media screen and (max-width: 991px) {
  #w-node-_2a1ad3e0-40d4-3034-4ed8-1e77e89d5b74-83bbded9.div_client { grid-column: 2 / 5; }
}
@media screen and (max-width: 767px) {
  #w-node-_2a1ad3e0-40d4-3034-4ed8-1e77e89d5b74-83bbded9.div_client { grid-column: 1 / -1; }
  .div_client_list .heading-style-h4.thin { white-space: normal; }
}

/* Cartes projets détaillés (écrans ≥ 992 px) :
   - colonne 1 : titre (prend la place restante, passe sur 2 lignes si besoin)
   - colonne 2 : infos, largeur ajustée à leur contenu (26rem max, au-delà retour à la ligne)
   - colonne 3 : vignette de largeur fixe, réservée : l'image au survol ne recouvre plus le texte
   La vignette reçoit une largeur explicite (Firefox lui donnait une largeur nulle). */
.pc dd.pc-mo.no-wrap { white-space: normal; min-width: 0; }
.pc .pc-nw { white-space: nowrap; }
@media screen and (min-width: 992px) {
  .pc--detail .div_project_in {
    grid-template-columns: minmax(0, 1fr) fit-content(26rem) clamp(180px, 24%, 260px);
    column-gap: 2rem;
  }
  .pc--detail .pc-list { width: auto; max-width: 26rem; justify-self: start; }
  .pc--detail .pc-list dd { min-width: 0; }
  .pc--detail .pc-thumb {
    justify-self: stretch; align-self: center; box-sizing: border-box;
    width: 100%; height: auto; aspect-ratio: 16 / 9;
    padding: 0; margin: -25px 0;
  }
  .pc--detail .div_project_thumb_in { position: absolute; inset: 0; width: 100%; height: 100%; }
  .pc--detail .div_project_thumb_in picture, .pc--detail .div_project_thumb_in img { display: block; width: 100%; height: 100%; }
  .pc--detail .plusbtn { left: 50%; top: 50%; margin: 0; translate: -50% -50%; }
  /* Cartes étroites (2 cartes côte à côte, écrans moyens) : titre sur toute la largeur,
     infos et vignette côte à côte en dessous */
  .pc--detail { container: pcard / inline-size; }
}
@container pcard (max-width: 820px) {
  .pc--detail .div_project_in { grid-template-columns: minmax(0, 1fr) clamp(140px, 36%, 230px); row-gap: .75rem; }
  .pc--detail .pc-title { grid-column: 1 / -1; grid-row: 1; }
  .pc--detail .pc-list { grid-column: 1; grid-row: 2; align-self: center; }
  .pc--detail .pc-thumb { grid-column: 2; grid-row: 2; margin: 0; }
}
/* Tablette : même principe, vignette carrée de la maquette */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .pc--detail .div_project_in { grid-template-columns: minmax(0, 1fr) fit-content(20rem) clamp(110px, 20%, 170px); column-gap: 1.25rem; }
  .pc--detail .pc-list { width: auto; max-width: 20rem; }
  .pc--detail .pc-thumb { justify-self: stretch; box-sizing: border-box; width: 100%; height: auto; aspect-ratio: 1; padding: 0; margin: 0; }
  .pc--detail .plusbtn { left: 50%; top: 50%; translate: -50% -50%; }
}

/* Premier écran : la vague blanche couvre toujours le bas de la photo
   (évite le filet sombre d'1 px selon la largeur de la fenêtre ou le zoom) */
.section_intro { position: relative; }
.section_intro::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: #fff; pointer-events: none; }

/* Lien discret vers le back office, sous les boutons du pied de page */
.footer-admin { display: block; flex-basis: 100%; margin-top: .9rem; font-size: .8rem; font-weight: 300; color: var(--thierry-vert); opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.footer-admin:hover, .footer-admin:focus-visible { opacity: 1; }

/* --- Citation (Convention européenne du paysage) entre les clients et le pied de page ---
   3 présentations au choix dans le back office (Coordonnées & textes > Citation) */
.section_verbatim { padding: 4rem 0; }
.verbatim { position: relative; margin: 0 7.5rem; color: var(--thierry-vert); text-align: left; }
.verbatim figcaption { text-align: left; }
.verbatim__titre { font-weight: 500; font-size: 1.15rem; line-height: 1.3; margin: 0 0 1rem; }
.verbatim__citation { margin: 0; padding: 0; border: 0; }
.verbatim__citation p { margin: 0; font: inherit; color: inherit; }
.verbatim__texte { margin: 1.25rem 0 0; font-weight: 300; font-size: 1rem; line-height: 1.6; }

/* 1. Encart gris-vert arrondi, grand guillemet */
.verbatim--1 .verbatim { background: var(--thierry-verte-clair); border-radius: 6px; padding: 3.5rem 4rem 3.5rem 9rem; }
.verbatim--1 .verbatim__mark { position: absolute; left: 2.5rem; top: 1.25rem; font-family: Mango Grotesque, Arial, sans-serif; font-weight: 500; font-size: 9rem; line-height: 1; color: var(--thierry-vert); opacity: .35; }
.verbatim--1 .verbatim__citation { font-weight: 500; font-size: 1.6rem; line-height: 1.35; max-width: 52rem; }
.verbatim--1 .verbatim__texte { max-width: 52rem; }

/* 2. Grande citation typographique entre deux filets, titre en colonne à gauche */
.verbatim--2 .verbatim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); column-gap: 2.5rem; border-top: 1px solid var(--thierry-vert); border-bottom: 1px solid var(--thierry-vert); padding: 2.5rem 0; }
.verbatim--2 .verbatim__titre { font-size: 1rem; margin: .5rem 0 0; }
.verbatim--2 .verbatim__citation { font-family: 'Mango Grotesque Extra light Italic', Arial, sans-serif; font-weight: 200; font-style: italic; font-size: 3.4rem; line-height: 1.05; }
.verbatim--2 .verbatim__texte { max-width: 44rem; }

/* 3. Bandeau vert pleine largeur, texte blanc */
.verbatim--3 { background: var(--thierry-vert); color: #fff; margin: 2rem 0 4rem; }
.verbatim--3 .verbatim { color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 3rem; align-items: start; }
.verbatim--3 .verbatim__titre { font-family: Mango Grotesque, Arial, sans-serif; font-size: 2.6rem; line-height: 1.05; margin: 0; }
.verbatim--3 .verbatim__citation { font-weight: 500; font-size: 1.45rem; line-height: 1.4; }
.verbatim--3 .verbatim__texte { opacity: .9; }

@media screen and (max-width: 991px) {
  .verbatim { margin: 0 4rem; }
  .verbatim--2 .verbatim, .verbatim--3 .verbatim { grid-template-columns: 1fr; row-gap: 1rem; }
  .verbatim--2 .verbatim__titre { margin: 0; }
  .verbatim--2 .verbatim__citation { font-size: 2.8rem; }
}
@media screen and (max-width: 767px) {
  .section_verbatim { padding: 3rem 0; }
  .verbatim { margin: 0 1rem; }
  .verbatim--1 .verbatim { padding: 4.5rem 1.5rem 2rem; }
  .verbatim--1 .verbatim__mark { left: 1.25rem; top: .5rem; font-size: 6rem; }
  .verbatim--1 .verbatim__citation { font-size: 1.3rem; }
  .verbatim--2 .verbatim__citation { font-size: 2.3rem; }
  .verbatim--3 .verbatim__titre { font-size: 2.1rem; }
  .verbatim--3 .verbatim__citation { font-size: 1.2rem; }
}

/* Textes courts mis en forme dans le back office (gras / italique / retours à la ligne) */
.main_desc_wrapper .heading strong { font-weight: 500; }
.rich-inline em em { font-style: normal; }
/* La phrase est déjà en Nohemi Medium (graisse la plus forte disponible) : le gras s'y affiche en bleu */
.rich-inline strong { font-weight: 500; color: var(--thierry-bleu); }
