/* =========================================================
   1. VARIABLES & RESET
========================================================= */
:root {
  --bg-portfolio: #e7e7e7;
  --acid: #f5f75a;
  --paper: #ffffff;
  --blue: #001F6E;
  --blue-light: #0c49e4;
  --ink: #111111;
  --light-grey: #e0e0e0;
  --warm-grey: #f8f8f8;
  --dark-grey: #383838;
  --orange: #5f2700;
  --orange-light: #f6b801;
  --charcoal: #2d2d2d;
  --letter-spacing: -0.02em;
  --radius: 28px;
  --pills: 51px;
  --gap: 15px;
  --panel-padding: clamp(18px, 2.6vw, 34px);
  --section-padding: 70px 0;
  --home-section-gap: clamp(48px, 6vw, 80px);
  --border: 1px solid var(--ink);
  --box-shadow: 4px 3px 0 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-portfolio);
  color: var(--ink);
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-synthesis: none;
  overflow-x: clip;
}

/* =========================================================
   2. TYPOGRAPHIE & STRUCTURE GLOBALE
========================================================= */
.page-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto 12px;
  padding: 26px var(--panel-padding);
  background: var(--bg-portfolio);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: var(--letter-spacing);
  margin: 0 0 20px 0;
}

/* h1,
h2 {
 transform: scaleY(1.1);
  transform-origin: left center;
} */

h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

h2,
.h2 {
  font-size: clamp(1.5rem, 2.8vw, 3.5rem);
}

h2 span img {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: middle;
  margin-top: -0.15em;
}

h3,
.h3 {
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

a {
  color: inherit;
}


/* =========================================================
   3. COMPOSANTS D'INTERFACE (Boutons, Pilules, Badges)
========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--blue-light);
  color: var(--paper);
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 21px 60px;
  border-radius: var(--pills);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--blue-light);
  color: var(--paper);
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.979rem, 2.554vw, 2.394rem);
  line-height: 1;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
}

.pill--light {
  color: var(--paper);
  border-color: var(--paper);
}

.pill--dark {
  color: var(--ink);
}

.pill--outline {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
}

.arrow-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 51px;
  height: 51px;
  /* background-color: var(--orange);
  color: var(--paper); */
  border-radius: var(--pills);
  border: 1px solid var(--ink);
}

.round-arrow {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
}

.round-arrow--dark {
  background: var(--charcoal);
  color: var(--paper);
}

/* =========================================================
   4. EN-TÊTE & NAVIGATION (Desktop)
========================================================= */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
}

.top-navbar__left,
.top-navbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-navbar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  background-color: var(--orange-light);
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.top-navbar__logo:hover {
  transform: scale(1.05);
}

.top-navbar__logo svg {
  width: 39px;
  height: 39px;
}

.top-navbar__nav {
  background-color: rgba(28, 25, 14, 0.04);
  border-radius: var(--radius);
  padding: 4px;
}

.top-navbar__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.top-navbar__link {
  display: inline-block;
  padding: 12px 21px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--pills);
  transition: background-color 0.2s ease;
}

.top-navbar__link:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.top-navbar__link.is-active {
  background-color: var(--paper);
  font-weight: 600;
}

.top-navbar__contact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 10px 20px;
  background-color: var(--acid);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.top-navbar__contact:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.contact-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.top-navbar__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: var(--paper);
  border: none;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-navbar__icon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.top-navbar__icon-btn svg {
  width: 18px;
  height: 18px;
}

.top-navbar__hamburger {
  display: none;
}

.projet {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--paper);
  background-color: var(--blue-light);
  box-shadow: var(--box-shadow);
}

.projet:hover {
  background-color: var(--blue-light);
  color: var(--paper);
  border-color: var(--paper);
}

/* =========================================================
   5. MENU MOBILE (Overlay)
========================================================= */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--paper);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  z-index: 1001;
}

.mobile-menu__close svg {
  width: 24px;
  height: 24px;
}

.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-menu__link {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.mobile-menu__link:hover {
  opacity: 0.6;
}

.mobile-menu__link.is-active {
  color: var(--orange);
}

/* =========================================================
   6. PAGE D'ACCUEIL (Hero & Grille Services)
========================================================= */
/* bascule en mode sombre pour la carte projet */
.project-card.is-dark {
  background-color: var(--orange-light);
  color: var(--paper);
}

/* titre et textes */
.project-card.is-dark .project-card__title,
.project-card.is-dark .metric-value {
  color: var(--paper);
}

.project-card.is-dark .metric-label {
  color: rgba(255, 255, 255, 0.7);
}

/* séparateurs des métriques */
.project-card.is-dark .metric {
  border-right-color: rgba(255, 255, 255, 0.3);
}

.project-card.is-content-bottom-left .project-card__title {
  margin-top: auto;
}

/* tags d'expertise */
.project-card.is-dark .project-card__pill {
  border-color: var(--paper);
  color: var(--paper);
}

/* icône SVG */
.project-card.is-dark .project-card__icon svg path {
  fill: var(--ink);
}

.project-card.is-stacked .project-card__metrics {
  flex-direction: column;
  gap: 12px;
}

.project-card.is-stacked .metric {
  padding-left: 0;
  padding-right: 0;
  border-right: none;
}

.home-header,
.expertises-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(28px, 5vw, 60px) 0;
  gap: 20px;
}

.home-header__titles,
.expertises-header__titles {
  max-width: 800px;
}

.home-surtitle,
.expertise-surtitle,
.case-grid-surtitle,
.faq-surtitle,
.contact-surtitle,
.surtitle {
  position: relative;
  display: block;
  text-transform: uppercase;
  letter-spacing: .03rem;
  z-index: 2
}


.home-surtitle,
.expertise-surtitle {
  margin-bottom: 8px;
}

.home-surtitle,
.case-grid-surtitle,
.faq-surtitle,
.contact-surtitle,
.surtitle {
  font-size: 0.75rem;
  color: var(--charcoal);
}

.expertise-surtitle {
  font-size: 1rem;
  color: var(--paper);
}

.case-grid-surtitle,
.faq-surtitle,
.contact-surtitle,
.surtitle {
  margin-bottom: 21px;
}

.home-title,
.expertises-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: .95;
  letter-spacing: var(--letter-spacing);
  margin: 0 0 24px 0;
  transform: scaleY(1.1);
  transform-origin: left center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Desktop : 3 cards entières + 10 % de la quatrième */
@media (min-width: 1100px) {
  .projects-section .projects-track > .project-card {
    flex-basis: calc(
      (100% + var(--panel-padding) - 3 * var(--gap)) / 3.1
    );
  }
}

/* ==========================================
   01. SEARCH MARKETING
========================================== */

.bg-olive {
  /* Fallback JPEG */
  background:
    linear-gradient(
      35deg,
      rgba(59, 103, 191, 0.85),
      rgba(2, 35, 64, 0.75),
      rgba(115, 38, 31, 0.5),
      rgba(191, 74, 63, 0.65)
    ),
    url('/assets/bg-search-marketing.jpg')
    center / cover no-repeat;

  /* WebP prioritaire */
  background:
    linear-gradient(
      35deg,
      rgba(59, 103, 191, 0.85),
      rgba(2, 35, 64, 0.75),
      rgba(115, 38, 31, 0.5),
      rgba(191, 74, 63, 0.65)
    ),
    image-set(
      url('/assets/bg-search-marketing.webp') type("image/webp"),
      url('/assets/bg-search-marketing.jpg') type("image/jpeg")
    ) center / cover no-repeat;
}


/* ==========================================
   02. CRÉATION DE CONTENU
========================================== */

.bg-terracotta {
  /* Fallback JPEG */
  background:
    linear-gradient(
      135deg,
      rgba(239, 120, 41, 0),
      rgba(45, 45, 44, 0.65)
    ),
    url('/assets/bg-creation-contenu.jpg')
    center / cover no-repeat;

  /* WebP prioritaire */
  background:
    linear-gradient(
      135deg,
      rgba(239, 120, 41, 0),
      rgba(45, 45, 44, 0.65)
    ),
    image-set(
      url('/assets/bg-creation-contenu.webp') type("image/webp"),
      url('/assets/bg-creation-contenu.jpg') type("image/jpeg")
    ) center / cover no-repeat;
}


/* ==========================================
   03. UX/UI DESIGN
========================================== */

.bg-purple {
  /* Fallback JPEG */
  background:
    linear-gradient(
      35deg,
      rgba(59, 103, 191, 0.85),
      rgba(2, 35, 64),
      rgba(115, 38, 31, 0.5),
      rgba(191, 74, 63, 0.65)
    ),
    url('/assets/bg-web-design-ux-ui.jpg')
    center / cover no-repeat;

  /* WebP prioritaire */
  background:
    linear-gradient(
      35deg,
      rgba(59, 103, 191, 0.85),
      rgba(2, 35, 64),
      rgba(115, 38, 31, 0.5),
      rgba(191, 74, 63, 0.65)
    ),
    image-set(
      url('/assets/bg-web-design-ux-ui.webp') type("image/webp"),
      url('/assets/bg-web-design-ux-ui.jpg') type("image/jpeg")
    ) center / cover no-repeat;
}



.service-card {
  position: relative;
  border-radius: var(--radius);
  padding: 24px;
  color: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 372px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.service-card__title {
  position: relative;
  z-index: 2;
  text-align: left;
  font-size: clamp(2rem, 3.3vw, 3rem);
  color: var(--paper);
  margin-top: clamp(20px, 2.5vw, 21px);
  line-height: 1;
}

.services-grid h2 {
  transform: none;
}  

.service-card__btn-container {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--paper);
  padding: 15px 0 0 15px;
  z-index: 3;
}

.service-card__image {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  bottom: -20px;
  right: 20px;
  opacity: 0.95;
  z-index: 1;
}

.service-card__link-text {
  position: absolute;
  bottom: 28px;
  right: 86px;
  font-weight: 500;
  font-size: 0.85rem;
  z-index: 2;
}

/* 1. La découpe principale avec son arrondi intérieur classique */
.service-card__cutout {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--bg-portfolio);
  padding: 33px 0 0 33px;
  border-top-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  z-index: 3;
}

/* 2. Création des deux blocs pour les courbures inversées externes */
.service-card__cutout::before,
.service-card__cutout::after {
  content: "";
  position: absolute;
  width: var(--radius);
  height: var(--radius);
  /* Le dégradé radial dessine un cercle transparent (qui laisse voir ta carte), puis remplit le reste en gris */
  background: radial-gradient(
    circle at top left, 
    transparent calc(var(--radius) - 0.5px), 
    var(--bg-portfolio) var(--radius)
  );
  pointer-events: none; /* Empêche les faux-clics */
}

/* Jonction Haute (fusionne avec le bord vertical droit de la carte) */
.service-card__cutout::before {
  bottom: 100%;
  right: 0;
}

/* Jonction Gauche (fusionne avec le bord horizontal bas de la carte) */
.service-card__cutout::after {
  right: 100%;
  bottom: 0;
}

.service-card__btn {
  width: 150px;
  height: auto;
  padding: 42px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  border: 15px solid var(--ink);
}

.service-card__btn svg {
  transition: transform 0.3s ease;
}

/* .service-card:hover .service-card__btn svg {
  transform: translate(8px, -8px);
} */

/* =========================================================
   7. CARROUSEL DE PROJETS (Base & Accueil)
========================================================= */

.services-section {
  margin-left: calc(-1 * var(--panel-padding));
  margin-right: calc(-1 * var(--panel-padding));
  padding: 0 var(--panel-padding) 30px var(--panel-padding);
}

.projects-section {
  margin-left: calc(-1 * var(--panel-padding));
  margin-right: calc(-1 * var(--panel-padding));
  padding: 60px var(--panel-padding);
}

/* Espacement identique à celui de la FAQ */
.projects-section > h2,
.contact-section > h2 {
  margin-bottom: calc(20px + var(--panel-padding));
}

/* Suppression de la marge supplémentaire du formulaire */
.contact-section .contact-form {
  margin-top: 0;
}

.section-label {
  margin-bottom: 24px;
}

.section-header-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 21px;
  gap: 3px;
  flex-wrap: wrap;
}

.section-header-row .pill {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  padding: 6px 18px;
  white-space: nowrap;
}

.carousel-controls {
  display: flex;
  justify-content: end;
  gap: 12px;
  margin-top: 21px;
}

.carousel-btn,
.other-projects-section .carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.2rem;
}

.carousel-btn:hover {
  background: var(--acid);
}

/* effet de zoom sur l'image de fond de la carte projet */

.projects-section .project-card .project-card__media img {
  transform: scale(1);
  transform-origin: center center;
  transition: transform 500ms cubic-bezier(0.45, 0, 0.55, 1);
}

@media (hover: hover) and (pointer: fine) {
  .projects-section .project-card:hover .project-card__media img {
    transform: scale(1.05);
  }
}

.projects-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 20px;
  scroll-behavior: smooth;
  margin-right: calc(50% - 50vw);
  padding-right: var(--panel-padding);
}

.projects-track::-webkit-scrollbar {
  display: none;
}

 /* la carte de base perd son padding global */
.project-card {
  position: relative;
  overflow: hidden;
  flex: 0 0 min(420px, 85vw);
  scroll-snap-align: start;
  background: var(--orange-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  padding: 12px; 
  height: 700px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--ink);
  box-shadow: var(--box-shadow);
}

/* on distribue l'espacement latéral sur tous les textes */
.project-card__top,
.project-card__title,
.project-card__desc,
.project-card__text,
.project-card__info,
.project-card__metrics {
  position: relative;
  z-index: 2;
  padding-left: 16px;
  padding-right: 16px;
}

.project-card.is-active {
  background: transparent;
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  margin-top: 16px; 
}

.projects-section .project-card__top {
  position: static;
}

.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.projects-section .project-card__tags {
  position: relative;
  z-index: 2;
}

.project-card__pill {
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 4px 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.project-card__icon,
.portfolio-card__icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 8px;
}

.projects-section .project-card__icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
}

.project-card__title {
  margin: 0 0 16px 0;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  max-width: 93%;
  font-weight: 500;
  font-synthesis: none;
  letter-spacing: 0;
}

.letterpair-mm {
  margin-left: 0.06em;
}

.project-card__desc {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0 0 24px 0;
}

.project-card__info {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0 0 20px 0;
}

.project-card__media {
  position: absolute;
  z-index: 1;
  inset: -2px;
  width: auto;
  height: auto;
  overflow: hidden;
}

.project-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}


/* L'image couvre l'espace sans se déformer */
.project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__metrics {
  display: flex;
  margin: 12px 0 32px 0;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 20px;
  border-right: 1px solid rgba(23, 23, 23, 0.15);
}

.metric:first-child {
  padding-left: 0;
}

.metric:last-child {
  padding-right: 0;
  border-right: none;
}

.metric-label {
  font-size: 0.65rem;
  font-weight: 400;
}

.metric-value {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink);
}

/* =========================================================
   8. PAGE PROJET (Hero, Case Cards)
========================================================= */

.module-supp-section,
.results-section,
.faq-section,
.contact-section {
  margin-left: calc(-1 * var(--panel-padding));
  margin-right: calc(-1 * var(--panel-padding));
  padding: 60px var(--panel-padding);
}

/* =========================================================
   RYTHME VERTICAL — PAGE D'ACCUEIL UNIQUEMENT
   Un même écart entre les sections, sans cumul des paddings.
   Desktop : jusqu'à 80px | Mobile : 48px minimum.
   Les espacements INTERNES (titres, FAQ, formulaire) sont préservés.
========================================================= */

/* Le bas du hero n'ajoute plus de blanc avant les expertises. */
.page-shell > .home-header {
  padding-bottom: 0;
}

/* Hero → Expertises */
.page-shell > .home-header + .services-section {
  margin-top: var(--home-section-gap);
  padding-bottom: 0;
}

/* Expertises → Portfolio / Portfolio → FAQ / FAQ → Contact */
.page-shell > .services-section + .projects-section,
.page-shell > .projects-section + .faq-section,
.page-shell > .home-header ~ .faq-section + .contact-section {
  margin-top: var(--home-section-gap);
  padding-top: 0;
}

/* Suppression des paddings de fin de section qui s'additionnaient. */
.page-shell > .services-section + .projects-section,
.page-shell > .projects-section + .faq-section {
  padding-bottom: 0;
}

/* La FAQ conserve son padding supérieur interne, pas celui du bas. */
.page-shell > .projects-section + .faq-section > .module-accordion {
  padding-bottom: 0;
}



/* La section des cards reste alignee sur le contenu de .page-shell.
   Pas de marges negatives : seuls les autres modules peuvent deborder. */
.case-grid-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: clamp(28px, 5vw, 60px);
  padding-bottom: clamp(18px, 2.5vw, 30px);
  padding-left: 0;
  padding-right: 0;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  width: 100%;
}

.module-supp-section {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0px 51px;
}

.results-section {
  max-width: 750px;
  margin: 70px auto;
  /* margin-left: auto;
  margin-right: auto; */
  padding: 42px;
  text-align: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--box-shadow);
 background-color: var(--paper);
}

.project-hero__content {
  position: relative;
  z-index: 2;
}

.expertises-hero__title {
 text-align: center;
}

.project-hero__title {
 max-width: 740px;
}

.text-blue {
 line-height: 3.5rem;
  color: var(--blue);
}

.project-hero__text {
 max-width: 960px;
}

.project-hero__text,
.results-section p {
  color: var(--charcoal);
  font-size: 1.5rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 6vw, 90px);
  justify-content: flex-end;
  margin: 36px 0 0;
  padding-top: 21px;
  border-top: 1px solid var(--light-grey);
}

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

.project-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
  color: var(--dark-grey);
}

.project-meta dd {
  margin: 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 21px;
}

/* Variantes réutilisables pour toutes les études de cas.
   --3cols : présentation classique sur trois colonnes.
   --2cols : deux colonnes plus larges, avec la même hauteur de carte
             que la grille à trois colonnes. */
.case-grid--3cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-grid--2cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  margin: 0;
  container-type: inline-size;
}

.case-grid--2cols > .case-card {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  /* Hauteur d'une carte de la grille 3 colonnes :
     ((largeur totale - deux gaps de 21px) / 3) x (8.75 / 5) */
  height: calc((100cqw - 42px) * 0.5833333333);
}

.case-card {
  position: relative;
  aspect-ratio: 5 / 8.75;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--ink);
  padding: 28px 24px;
  background-color: transparent;
  text-decoration: none;
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.case-card__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
  z-index: 0;
  pointer-events: none; 
}

/* =========================================================
  Source sous l'image — Modale Search Marketing
========================================================= */

#modal-seo .modal-media {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
}

#modal-seo .modal-media .case-card__bg {
  position: relative;
  display: block;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: var(--radius);
}

#modal-seo .modal-media .case-card__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#modal-seo .modal-media .modal-source {
  display: block;
  margin: 10px 0 0 4px;
}

/* Adaptation tablette et mobile */
@media (max-width: 880px) {
  #modal-seo .modal-media .case-card__bg {
    aspect-ratio: 1 / 1;
  }
}

.case-card__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Optionnel : afficher la totalité d'un visuel (plaquette, maquette, etc.). */
.case-card--media-contain .case-card__bg {
  background: #e8e8ea;
}
.case-card--media-contain .case-card__bg img {
  object-fit: contain;
}

/* gestion spécifique de la seconde image sur la carte 3 */
.case-card__bg--alt {
  opacity: 0;
  animation: hardCutUX 4s infinite;
  z-index: 1; /* se superpose à la première image au moment de l'apparition */
}

.case-card:hover .case-card__btn-plus {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}

/* le filtre bleu en surimpression sur la carte 1 */
.case-card--1::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--blue) 21%, transparent);
  z-index: 1;
  pointer-events: none;
}

/* Optionnel : assombrir le fond photographique pour garder les titres lisibles. */
.case-card--overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.08) 46%,
    rgba(0, 0, 0, 0.13) 100%
  );
  pointer-events: none;
}

.case-card--1,
.case-card--2,
.case-card--3 {
  box-shadow: 3px 3px 0 0 var(--ink);
}

@keyframes hardCutUX {
  0%, 49.99% { opacity: 0; }
  50%, 99.99% { opacity: 1; }
  100% { opacity: 0; }
}

.case-card__header {
  position: relative;
  z-index: 2;
}

.case-card__surtitle {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 15px;
  letter-spacing: -.03rem;
}

.case-card__title {
  font-size: clamp(3.25rem, 3vw, 4rem);
  color: var(--paper);
}

.case-card__footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.case-card__btn-plus {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: transparent;
  border: 8px dashed var(--blue);
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.case-card__btn-plus:hover {
  background: var(--orange-light);
  border-color: var(--orange-light);
}

/* =========================================================
   9. CARROUSEL DES AUTRES PROJETS (Surcharges)
========================================================= */
/* Section alignee sur le contenu de .page-shell.
   Seul le carrousel deborde vers le bord droit du viewport. */
.other-projects-section {
  margin-left: 0;
  margin-right: 0;
  padding: 60px 0;
}

/* Debordement volontaire a droite, sans decaler le titre ni
   le bord gauche du carrousel. */
.other-projects-section .projects-track {
  margin-right: calc(50% - 50vw);
  padding-right: var(--panel-padding);
}

.other-projects-section .section-header-row {
  flex-direction: row;
  justify-content:flex-start;
  margin-top: 0;
}

.other-projects-section .carousel-btn:hover {
  background: var(--acid);
}

/* =========================================================
   10. MODULE SUPPLÉMENTAIRE (Accordéon)
========================================================= */

.module-supp-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.module-accordion {
  padding: var(--panel-padding) 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* FAQ — Desktop */
@media (min-width: 881px) {
  .faq-section .module-accordion {
    width: 90%;
  }
}

.accordion-title {
  font-size: clamp(1.25rem, 1vw, 1.5rem);
  font-weight: 700;
}

.accordion-item {
  border-bottom: 1px solid var(--warm-grey);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12%;
  background: none;
  border: none;
  padding: 24px 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
}

.accordion-icon {
  position: relative;
  width: 51px;
  height: 51px;
  flex-shrink: 0;
}

/* Conteneur de l'icône + / - */
.accordion-icon {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background-color: var(--orange-light);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

/* Traits du + et du - */
.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  background-color: var(--ink);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Trait horizontal */
.accordion-icon::before {
  width: 51px;
  height: 1px;
}

/* Trait vertical */
.accordion-icon::after {
  width: 1px;
  height: 51px;
}

/* Accordéon ouvert : + devient - */
.accordion-item.is-open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion-item.is-open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-in-out;
}

.accordion-item.is-open .accordion-content {
  grid-template-rows: 1fr;
}

.accordion-content-inner {
  overflow: hidden;
  min-height: 0;
}

/* Uniquement FAQ 05 — Questions/réponses */
@media (min-width: 881px) {
  .faq-section .accordion-content-inner {
    padding-right: 210px;
  }
}

.accordion-content-inner p {
  margin: 0 0 24px 0;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--charcoal);
  padding-left: 21px;
}

.module-media picture {
  display: block;
  width: 100%;
}

.module-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* =========================================================
   11. FENÊTRES MODALES
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: block;
  overflow-y: auto;
  padding: clamp(30px, 5vh, 60px) 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--paper);
  border-radius: var(--radius);
  width: min(1080px, 94vw);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
  padding: clamp(24px, 4vw, 44px);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--ink);
  z-index: 10;
}

.modal-close:hover {
  background: var(--acid);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.modal-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 5 / 7;
  background: var(--warm-grey);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}

.modal-badge {
  align-self: flex-start;
  padding: 6px 0;
  text-transform: uppercase;
}

.modal-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--ink);
}

.modal-desc {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--charcoal);
  margin: 0;
}

.modal-metrics {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 23, 23, 0.1);
}

.modal-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 33.33%;
}

.modal-metric-val {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: normal;
}

.modal-source {
  font-size: 0.65rem;
  font-style: italic;
  color: var(--dark-grey);
  margin: 0;
}

.modal-metric-lbl {
  font-size: 0.75rem;
  color: var(--dark-grey);
}

.modal-body--full {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.modal-info--full {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--ink)000;
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}

.modal-text-block {
  padding: 21px 8px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-gallery > * {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 1. Règles pour Desktop (remplace les lignes 899 à 906) */
.photo-gallery > picture:has(.small),
.photo-gallery > .small {
  grid-column: span 1;
  aspect-ratio: 3 / 4;
}

.photo-gallery > picture:has(.large),
.photo-gallery > .large {
  grid-column: span 2;
}

/* Ajout Chat GPT*/
/* GALERIE 1 — Desktop */

#modal-photo .photo-gallery > picture {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  overflow: hidden;
}

/* Images petites */
#modal-photo .photo-gallery > picture:nth-child(1),
#modal-photo .photo-gallery > picture:nth-child(3),
#modal-photo .photo-gallery > picture:nth-child(5),
#modal-photo .photo-gallery > picture:nth-child(6) {
  grid-column: span 1;
  aspect-ratio: 3 / 4;
}

/* Images grandes */
#modal-photo .photo-gallery > picture:nth-child(2),
#modal-photo .photo-gallery > picture:nth-child(4) {
  grid-column: span 2;
}

/* Recadrage */
#modal-photo .photo-gallery > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* Modale UX/UI (Hybride) */
.modal-body--hybrid {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hybrid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: stretch;
}

.modal-full-image {
  width: 100%;
}

.modal-full-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* =========================================================
   GALERIE DE PORTRAITS (sans fenêtre modale)
   Styles dédiés : ne modifient pas les autres grilles du site.
   ========================================================= */
.portraits-section .section-titles {
  max-width: 960px;
}

.portraits-section__intro {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.6;
  color: var(--charcoal);
}

.portrait-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 94%;
  margin-inline: auto;
  column-gap: clamp(32px, 3.4vw, 44px);
  row-gap: clamp(36px, 4vw, 52px);
}
/* .portrait-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 26px);
  width: 100%;
} */

.portrait-gallery__card {
  position: relative;
  min-width: 0;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--warm-grey);
  box-shadow: var(--box-shadow);
}

.portrait-gallery__card picture,
.portrait-gallery__card img {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait-gallery__card img {
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 880px) {
  .portrait-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* @media (max-width: 620px) {
  .portrait-gallery {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    gap: 22px;
  }
} */

@media (max-width: 620px) {
  .portrait-gallery {
    grid-template-columns: minmax(0, 1fr);
    width: 90%;
    max-width: 468px;
    row-gap: 32px;
  }
}

/* =========================================================
   12. PROJECT SHOWCASE (Onglets Services)
========================================================= */
.project-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}

.showcase-images,
.showcase-text {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.showcase-images.is-active {
  display: flex;
  opacity: 1;
}

.showcase-text.is-active {
  display: block;
  opacity: 1;
}

.showcase-images-wrapper {
  width: 100%;
  margin-top: 60px;
}

.showcase-images {
  gap: 24px;
  justify-content: center;
}

.image-box {
  flex: 1;
  max-width: 50%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--box-shadow);
  /* overflow: hidden; */
  position: relative;
}

.image-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: var(--border);
}

.image-box.bg-dark-grey img,
.image-box.bg-red img {
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: bottom right;
  border-top-left-radius: 21px;
}

.showcase-nav {
  margin-bottom: 40px;
}

.tabs-container {
  display: flex;
  gap: 8px;
  /* background-color: var(--paper); */
  border-radius: 40px;
  border: var(--border);
  padding: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.is-active {
  color: var(--charcoal);
  /* background-color: transparent; */
  background-color: var(--paper);
  font-weight: 600;
  border: 1px dashed var(--ink);
}

.showcase-texts-wrapper {
  max-width: 840px;
  text-align: center;
}

.showcase-text p {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--charcoal);
  margin: 0;
}

/* =========================================================
   13. FORMULAIRE DE CONTACT
========================================================= */

/* Formulaire de contact : message à gauche / coordonnées à droite */
.contact-form__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(28px, 4vw, 56px);
}

.contact-form__message {
  min-width: 0;
}

.contact-form__message .form-textarea {
  flex: 1 1 auto;
  min-height: 320px;
  padding: 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  transition: border-color 0.2s ease;
  box-shadow: var(--box-shadow);
  background-color: var(--paper);
}

.contact-form__fields {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
}

@media (max-width: 800px) {
  .contact-form__columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .contact-form__message .form-textarea {
    min-height: 220px;
  }
}

.form-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
  margin: 0 0 36px 0;
  color: var(--ink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: 30px;
}

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

.form-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: var(--letter-spacing);
}

.form-input,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--warm-grey);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 10px 0 14px 0;
  transition: border-bottom-color 0.2s ease;
  border-radius: 0;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--blue);
  border-bottom-width: 3px;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  border-bottom: 3px solid var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.form-consent {
  margin-top: 10px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-checkbox {
  margin-top: 4px;
  cursor: pointer;
}

.consent-text {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--charcoal);
  font-family: inherit;
}

.consent-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-link:hover {
  color: var(--orange);
}

/* Confirmation d'envoi */
.contact-confirmation {
  max-width: 680px;
  /* margin: 32px auto 48px;
  text-align: center; */
}

.contact-confirmation p {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: var(--acid);
  text-decoration-thickness: 6px;
  text-underline-offset: 5px;
}

/* Erreur d'envoi */
.contact-error {
  max-width: 680px;
  margin: 24px auto;
  color: #b91c1c;
  font-weight: 600;
  text-align: center;
}

/* =========================================================
   14. PIED DE PAGE (Footer)
========================================================= */
.site-footer {
  width: min(1200px, calc(100% - 40px));
  margin: 33px auto 21px;
  display: flex;
  flex-direction: column;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__links li {
  display: flex;
  align-items: center;
}

.site-footer__links li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background-color: var(--charcoal);
  opacity: 0.3;
  margin: 0 12px;
}

.site-footer__link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  /* transition: color 0.2s ease, transform 0.2s ease; */
  display: inline-block;
}

.site-footer__link:hover {
  color: var(--orange);
  /* transform: translateY(-1px); */
}

.site-footer__copy {
  font-size: 0.65rem;
  color: var(--charcoal);
  font-weight: 400;
  text-align: center;
  opacity: 0.8;
}

@media (min-width: 880px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .site-footer__copy {
    text-align: right;
  }
}

/* =========================================================
   15. ARCHIVES & COMPOSANTS SPÉCIFIQUES (Ancien Design)
========================================================= */
.portfolio-board { display: flex; flex-direction: column; gap: var(--gap); }
.portfolio-row { display: flex; gap: var(--gap); align-items: stretch; }
.nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin: 0 0 30px; padding: 0; list-style: none; }
.nav__link { font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--gris-nav); text-decoration: none; transition: color .2s ease; }
.nav__link:hover { color: var(--noir); }
.nav__link.is-active { color: var(--noir); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.card { position: relative; min-width: 0; overflow: hidden; border-radius: var(--radius); }
.card-toolbar, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card--intro { flex: 0 0 calc(34% - (var(--gap) / 2)); min-height: 405px; padding: 20px; background: var(--acid); }
.card--intro h1 { margin: clamp(58px, 7vw, 92px) 0 0; font-size: clamp(2rem, 4.3vw, 4.35rem); line-height: 0.98; letter-spacing: -0.08em; font-weight: 600; }
.speech-bubble { position: relative; width: 58px; height: 42px; border-radius: 50%; background: var(--ink); }
.speech-bubble::after { content: ""; position: absolute; bottom: -5px; left: 9px; width: 16px; height: 16px; background: var(--ink); transform: skew(-28deg) rotate(18deg); }
.card--hero { flex: 1 1 66%; min-height: 405px; }
.portfolio-row--middle > .card { flex: 1 1 0; min-height: 398px; }
.card--context { display: flex; flex-direction: column; background: var(--orange); }
.card--interface.card--green { background: linear-gradient(90deg, #c9dac8 0%, #b4cec8 48%, #92afc2 100%); }
.card--context.card--orange-gradient { background: radial-gradient(circle at center, var(--paper) 0%, #fbe1ce 35%, #f6a467 65%, #f17720 100%); }
.card--hero img { object-fit: cover; }
.card-copy { padding: 16px 22px 18px; }
.context-layout { display: flex; align-items: flex-start; gap: 20px; margin-top: 18px; }
.context-layout h2 { flex: 0 0 30%; margin: 0; font-size: clamp(2rem, 3.1vw, 3.35rem); line-height: 0.92; letter-spacing: -0.07em; font-weight: 400; }
.context-layout p { margin: 3px 0 0; font-size: clamp(0.62rem, 0.75vw, 0.76rem); line-height: 1.2; }
.card--context > img { min-height: 188px; margin-top: auto; object-position: center; }
.card--seo { padding: 16px 22px 0; }
.card--interface h2, .card--content h2 { margin: 24px 0 0; font-size: clamp(1rem, 1.55vw, 1.62rem); line-height: 1.04; letter-spacing: -0.055em; font-weight: 600; }
.card--seo h2 { margin: 24px 0 0; font-size: clamp(1rem, 1.55vw, 1.62rem); line-height: 1.14; letter-spacing: -0.055em; font-weight: 400; }
.spinner-mark { width: 33px; aspect-ratio: 1; border: 6px dotted var(--orange); border-radius: 50%; }
.card-seo-content { position: relative; z-index: 2; height: 100%; }
.dashboard-visual { position: absolute; z-index: 1; right: -46px; bottom: -63px; width: 82%; height: 58%; background: url('assets/performance-seo.png') no-repeat top right / cover; transform: rotate(18deg); border-radius: 5px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.18); }
.card--interface { display: flex; flex-direction: column; padding: 16px 22px 0; background: var(--sage); }
.asterisk-mark { font-size: 2rem; line-height: 1; }
.image-cta { position: relative; display: block; min-height: 190px; margin: 15px -22px 0; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; color: var(--paper); text-decoration: none; }
.image-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.28), transparent 55%); }
.image-cta > span:first-of-type { position: absolute; z-index: 1; left: 22px; bottom: 24px; font-size: 0.72rem; text-transform: uppercase; }
.icon-prestation { display: inline-block; width: 5em; height: auto; vertical-align: middle; margin-top: -0.15em; }
.image-cta .round-arrow { position: absolute; z-index: 1; right: 20px; bottom: 16px; }
.card--wide-photo { flex: 1 1 67%; min-height: 410px; }
.card--content { flex: 0 0 calc(33% - (var(--gap) / 2)); display: flex; flex-direction: column; min-height: 410px; padding: 18px 22px 20px; background: var(--warm-grey); }
.card--content .card-footer { margin-top: auto; font-size: 0.72rem; text-transform: uppercase; }

/* Ancien Carrousel Puces */
.carousel { position: relative; overflow: hidden; padding: 0; aspect-ratio: 3 / 2; min-height: auto; }
.carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.4s ease-in-out; touch-action: pan-y; }
.carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
picture.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-nav { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.carousel-dot { width: 32px; height: 5px; padding: 0; border: none; border-radius: 0; background-color: var(--warm-grey); cursor: pointer; transition: background-color 0.3s ease, width 0.3s ease; }
.carousel-dot.is-active { background-color: var(--ink); width: 48px; }
.picture-mark { position: relative; display: inline-block; width: 48px; height: 48px; border: 5px solid var(--ink); border-radius: 10px; background: var(--ink); }
.picture-mark::before { content: ""; position: absolute; right: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--acid); }
.picture-mark span { position: absolute; right: 5px; bottom: 5px; left: 5px; height: 20px; background: var(--acid); clip-path: polygon(0 100%, 32% 42%, 52% 67%, 73% 18%, 100% 100%); }

/* =========================================================
   16. RESPONSIVE / MEDIA QUERIES
========================================================= */

/* --- Tablette (Max 880px) --- */
@media (max-width: 880px) {
  /* En-tête */
  .top-navbar__hamburger { display: flex; }
  .top-navbar__nav, .top-navbar__contact { display: none; }
  .top-navbar__logo { width: 84px; height: 84px; }
  .top-navbar__logo svg { width: 57px; height: 57px; }
  
  /* Mise en page globale */
  .page-shell { width: min(100% - 24px, 760px); padding-inline: 18px; }
  
  /* Accueil & Services */
  .services-grid { grid-template-columns: 1fr; }
  /* .bg-olive::before { transform: translateY(var(--parallax-y, 0%)); will-change: transform; } */
  .showcase-images { flex-direction: column; }
  .image-box { max-width: 100%; }
  .tabs-container { flex-wrap: wrap; justify-content: center; border-radius: var(--radius); }
  
  /* Page Projet */
  .case-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  /* Ces deux variantes partagent le même empilement tablette/mobile. */
  .case-grid--2cols, .case-grid--3cols { grid-template-columns: 1fr; }
  .case-grid--2cols > .case-card { height: auto; aspect-ratio: 5 / 8.75; }
  .case-card__title { font-size: 2.5rem; }
  .case-card { opacity: 0; transform: translateY(40px); transition: opacity 6s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
  .case-card.is-visible { opacity: 1; transform: translateY(0); }
  .module-supp-grid { grid-template-columns: 1fr; gap: 32px; }
  .module-media { order: -1; }
  
  /* Formulaire & Modale */
  .form-row, .modal-body, .hybrid-top { grid-template-columns: 1fr; gap: 24px; }
  .modal-media { aspect-ratio: 1 / 1; }
  
  /* Footer */
  .site-footer { padding-top: 24px; }

  /* Ancien Portfolio */
  .portfolio-row { flex-wrap: wrap; }
  .card--intro, .card--hero, .portfolio-row--middle > .card { flex: 1 1 calc(50% - var(--gap)); }
  .card--interface { flex-basis: 100% !important; }
  .card--wide-photo, .card--content { flex: 1 1 100%; }
  .card--content { min-height: 320px; }
  .pill { font-size: clamp(2rem, 2.6vw, 2.45rem); font-weight: 500; }
}

/* --- Mobile (Max 620px) --- */
@media (max-width: 620px) {
  :root {
    --radius: 18px;
    --gap: 12px;
  }
  
  /* Mise en page globale */
  .page-shell { width: 100%; margin: 0; padding: 20px 14px 38px; border-radius: 0; }
  .home-header { flex-direction: column; align-items: flex-start; }
  .home-title { font-size: 4rem; }
  
  /* Carrousel */
  .carousel-controls { align-self: flex-end; gap: 8px; margin-left: auto; }
  .carousel-btn { width: 40px; height: 40px; font-size: 1rem; }
  .section-header-row { gap: 12px; margin-bottom: 20px; }
  .section-header-row .pill { font-size: clamp(0.85rem, 3.8vw, 1.1rem); padding: 6px 14px; letter-spacing: -0.03em; }
  
  /* Galerie modale (Mobile) */
#modal-photo .photo-gallery > picture:nth-child(n) {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
  height: auto;
}

.photo-gallery { grid-template-columns: 1fr; }
.photo-gallery > .small, 
.photo-gallery > .large { 
  grid-column: span 1; 
  aspect-ratio: 4 / 3; 
}
  /* .photo-gallery { grid-template-columns: 1fr; } */
  .gallery-img.small, .gallery-img.large { grid-column: span 1; aspect-ratio: 4 / 3; }

  /* Ancien Portfolio */
  .project-nav { justify-content: flex-start; margin-bottom: 24px; gap: 9px 16px; font-size: 0.62rem; }
  .portfolio-row { flex-direction: column; flex-wrap: nowrap; }
  .portfolio-row > .card, .card--intro, .card--hero, .portfolio-row--middle > .card, .card--wide-photo, .card--content { flex: 1 1 auto !important; width: 100%; }
  .card--context > img { margin-bottom: 33px; }
  .card { margin: 0; }
  .card--intro { min-height: 345px; }
  .card--intro h1 { margin-top: 70px; font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .card--hero { min-height: auto; aspect-ratio: 4 / 3; display: flex; }
  .card-seo-content { padding-bottom: 270px; }
  .dashboard-visual { right: -26px; bottom: -100px; width: 90%; height: 70%; transform: rotate(10deg); }
  .card--wide-photo { min-height: auto; aspect-ratio: 4 / 3; }
  .portfolio-row--middle > .card { min-height: 420px; }
  .context-layout { gap: 18px; }
  .context-layout h2 { font-size: 3.2rem; }
  .context-layout p { font-size: 1rem; }
  .card--seo h2, .card--interface h2, .card--content h2 { font-size: clamp(1.2rem, 5vw, 1.55rem); }
  .card--content { min-height: 380px; }
  .card--wide-photo.carousel { min-height: auto; aspect-ratio: 5 / 7; }
}

/* --- Mobile Petit (Max 380px) --- */
@media (max-width: 380px) {
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .carousel-controls { align-self: flex-end; }
}

/* --- Accessibilité --- */
/* @media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
} */

/* Accessibilité : réduction des animations */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  /* Supprime uniquement le zoom des images du portfolio */
  .projects-section .project-card__media img {
    transform: none !important;
    transition: none !important;
  }

}

/* =========================================================
   17. PAGE PORTFOLIO (Grille & Slider Manuel)
========================================================= */

.portfolio-section,
.project-hero {
  padding-top: clamp(28px, 5vw, 60px);
  padding-bottom: clamp(18px, 2.5vw, 30px);
  padding-left: 0;
  padding-right: 0;
}

.project-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 21px 21px 120px 21px; 
}

/* .portfolio-grid {
  margin: 80px auto;;
} */

/* Grille de base (6 colonnes pour permettre les divisions 1/2 et 1/3) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.portfolio-grid.is-hidden {
  display: none;
}

/* Structure des largeurs de cartes via la fusion de colonnes (span) */
.span-3 { grid-column: span 3; } /* Occupe 1/2 de la largeur */
.span-6 { grid-column: span 6; } /* Occupe toute la largeur */
.span-2 { grid-column: span 2; } /* Occupe 1/3 de la largeur */

/* Design de la carte */
.portfolio-card {
  border: 2px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.portfolio-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-top: 6px;
}


.portfolio-card.span-2 .portfolio-card__header {
  height: 160px;
  flex-shrink: 0;
}


/* .portfolio-card__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
} */

.portfolio-card__text h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.portfolio-card__text p {
  font-size: 0.8rem;
  color: var(--dark-grey);
  margin: 0;
  /* font-family: "DM Mono", monospace; */
}

/* Conteneur du Diaporama */
.portfolio-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
}

/* Ratios d'images stricts pour harmoniser la grille */
.portfolio-card__media--vertical { aspect-ratio: 3 / 4; }
.portfolio-card__media--horizontal { aspect-ratio: 16 / 9; }

.slideshow-track {
  display: flex;
  gap: 6px;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

 /* Le lien englobe l'image. 
Il prend 90% pour laisser dépasser et deviner l'image suivante */
.slideshow-track a {
  flex: 0 0 90%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  position: relative; /* indispensable pour positionner l'overlay */
}

/* création de l'overlay noir invisible par défaut */
.slideshow-track a::after {
  content: "";
  position: absolute;
  inset: 0; /* raccourci pour couvrir toute la surface */
  background-color: var(--ink);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* garantit que le clic traverse l'overlay */
}

/* activation de l'opacité au passage de la souris */
.slideshow-track a:hover::after {
  opacity: 0.3;
}

.slideshow-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Flèches du diaporama superposées */
.slideshow-arrow {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
  color: var(--ink);
}

.slideshow-arrow:hover {
  background: var(--paper);
}

.slideshow-arrow--next {
  right: 12px;
}

.slideshow-arrow--prev {
  left: 12px;
  display: none; /* Masquée sur la première image */
}

/* Bouton Charger Plus */
.btn-load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-load-more {
  background: var(--acid);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  padding: 16px 48px;
  border-radius: var(--pill-radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-load-more:hover {
  background-color: var(--orange-light); /* Fond orangé au survol demandé */
}

/* =========================================================
   18. SECTION FAQ (Accueil)
========================================================= */

/* .faq-section h2 {
  text-align: center;
}

.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
} */

/* =========================================================
   19. PLAN DU SITE
========================================================= */
.sitemap-section,
.legal-content-section {
  padding: clamp(18px, 2.5vw, 30px) 0;
}

/* Remplacement de la grille multi-colonnes par un empilement vertical */
.sitemap-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 680px;
}

.sitemap-block {
  display: flex;
  flex-direction: column;
}

.sitemap-root {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.sitemap-root:hover {
  color: var(--orange);
}

.sitemap-sublist {
  list-style: none;
  padding: 0 0 0 16px; /* Retrait léger pour hiérarchiser les sous-pages */
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sitemap-link {
  font-size: 1rem;
  color: var(--charcoal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.sitemap-arrow {
  color: var(--orange);
  margin-right: 8px;
  font-weight: 600;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.sitemap-link:hover {
  color: var(--ink);
}

.sitemap-link:hover .sitemap-arrow {
  opacity: 1;
}

/* =========================================================
   20. PAGES LÉGALES ET CONFIDENTIALITÉ
========================================================= */
.legal-container {
  max-width: 800px;
  padding-bottom: 60px;
}

.legal-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
  margin: 0 0 20px 0;
  color: var(--ink);
}

.legal-list {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--charcoal);
  list-style: none;
  padding: 0;
}

.legal-list li {
  margin-bottom: 8px;
}

.legal-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--charcoal);
}

.legal-text--last {
  margin-bottom: 0;
}

/* Espacement de l'ancre cookies */
.legal-cookie-block {
  padding-top: 20px;
}

/* Sous-titres pour la section cookies */
.legal-subheading {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* Ajustement spécifique pour les listes non suivies d'un titre */
.legal-text + .legal-list, 
.legal-subheading + .legal-text {
  margin-bottom: 24px;
}

.legal-list {
  padding-left: 20px; /* Conserve le retrait des listes à puces */
  list-style-type: disc; /* Réactive les puces pour la lisibilité */
}


/* =========================================================
   21. AUTRES CLASS
========================================================= */

.thin {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 100;
  /* font-size: 3rem; */
  padding: 0 0 0 8px;
}

.light {
  font-weight: 300;
}

.bold {
  font-weight: 600;
}

.pl-1 { padding-left: 10px; }
.pl-2 { padding-left: 20px; }
.pl-3 { padding-left: 30px; }
.pl-4 { padding-left: 40px; }
.pl-5 { padding-left: 50px; }

.ml-1 { margin-left: 10px; }
.ml-2 { margin-left: 20px; }
.ml-3 { margin-left: 30px; }
.ml-4 { margin-left: 40px; }
.ml-5 { margin-left: 50px; }

.ls-0 { letter-spacing: 0; }
.fs-2 { font-size: 2rem; }


/* =========================================================
   NAVIGATION DE BAS DE PAGE
   Même langage visuel que la navigation principale.
   Liens toujours accessibles sur mobile, sans menu hamburger.
========================================================= */
.footer-navbar {
  width: min(1200px, calc(100% - 40px));
  margin: clamp(30px, 4vw, 50px) auto 0;
  padding-top: 24px;
  /* border-top: 1px solid var(--light-grey); */
  gap: 12px;
}

/* Sur desktop, le logo et le menu restent groupés à gauche. */
.footer-navbar .top-navbar__nav {
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 880px) {
  .footer-navbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 18px;
    align-items: center;
    padding-top: 20px;
  }

  .footer-navbar .top-navbar__logo {
    grid-column: 1;
    grid-row: 1;
    width: 66px;
    height: 66px;
  }

  .footer-navbar .top-navbar__logo svg {
    width: 39px;
    height: 39px;
  }

  .footer-navbar .top-navbar__right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  /* Réaffiche les liens malgré le masquage du menu haut sur tablette/mobile. */
  .footer-navbar .top-navbar__nav {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .footer-navbar .top-navbar__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .footer-navbar .top-navbar__nav .top-navbar__link {
    display: block;
    padding: 12px 8px;
    text-align: center;
    background: rgba(28, 25, 14, 0.04);
  }

  .footer-navbar .top-navbar__nav .top-navbar__link.is-active {
    background: var(--paper);
  }

  .footer-navbar .top-navbar__right .projet {
    white-space: nowrap;
  }
}
