/* =============================
   Design Tokens
============================= */
:root {
  --bg: #F0EADC;
  --surface: #FFFFFF;
  --surface-soft: #F7F2E7;
  --primary: #44546A;
  --primary-strong: #303B4A;
  --secondary: #C07A5C;
  --accent: #6F8A97;
  --text: #2B2F36;
  --muted: #5F5F5F;
  --border: #E0D5C4;
  --shadow: 0 20px 45px rgba(48, 59, 74, 0.12);
  --shadow-soft: 0 12px 25px rgba(48, 59, 74, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-serif: "Fraunces", serif;
  --font-sans: "Manrope", sans-serif;
}

/* =============================
   Base & Reset
============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100%;
  overflow-x: hidden;
  padding-top: 84px;
}

/* Fond dynamique : lignes fluides discrètes */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: none;
}

body::after {
  background-image:
    linear-gradient(115deg, rgba(68, 84, 106, 0.06) 10%, transparent 30%),
    linear-gradient(220deg, rgba(192, 122, 92, 0.06) 10%, transparent 30%),
    linear-gradient(300deg, rgba(111, 138, 151, 0.05) 10%, transparent 35%);
  opacity: 0.6;
}

/* Assure que le contenu reste au-dessus du fond */
body > * {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  margin: 0 0 1.35rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  text-align: center;
  margin-top: 0.2rem;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  white-space: nowrap;
}

/* Offset anchors so fixed header doesn't overlap section titles */
h2[id] {
  scroll-margin-top: 110px;
}

h3 {
  font-size: 1.15rem;
  white-space: nowrap;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* =============================
   Layout
============================= */
.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

.header-inner,
.hero-grid,
.page-hero-grid,
.split,
.contact-grid,
.detail-grid,
.projects-grid,
.project-list,
.case-grid,
.mockups {
  display: grid;
  gap: 1.5rem;
}

.header-inner > *,
.hero-grid > *,
.page-hero-grid > *,
.split > *,
.about-row > *,
.contact-grid > *,
.detail-grid > * {
  min-width: 0;
}

/* =============================
   Accessibility
============================= */
.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

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

/* Améliore la lisibilité du focus sur fond clair */
:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 122, 92, 0.25);
}

/* =============================
   Header & Navigation
============================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(240, 234, 220, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* Bouton retour en haut */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
  z-index: 30;
}

/* Lightbox images */
.zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(23, 27, 33, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 40;
}

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

.lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(12, 14, 18, 0.35);
  background: #fff;
}

.lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(0, 0, 0, 0.55);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  background: rgba(0, 0, 0, 0.55);
}

.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--primary-strong);
  transform: translateY(0);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(68, 84, 106, 0.35), transparent);
  pointer-events: none;
}

.header-inner {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 1rem 0;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  transform: rotate(2deg);
  border-color: rgba(68, 84, 106, 0.35);
}

.menu-toggle__line {
  width: 18px;
  height: 2px;
  background: var(--primary-strong);
  display: block;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-of-type(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-of-type(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-of-type(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  font-weight: 500;
}

.has-submenu {
  position: relative;
  padding-bottom: 0.25rem;
}

/* Zone tampon pour éviter la fermeture du sous-menu */
.has-submenu::after {
  content: "";
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  top: 100%;
  height: 12px;
}

.has-submenu > a::after {
  content: "▾";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  line-height: 1;
  color: var(--primary-strong);
  transition: transform 0.2s ease;
}

.has-submenu:focus-within > a::after,
.has-submenu:hover > a::after,
.has-submenu.submenu-open > a::after {
  transform: translateY(-50%) rotate(180deg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 0.5rem;
  margin-top: 0.25rem;
  display: grid;
  gap: 0.3rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
  pointer-events: auto;
}

.submenu a {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.submenu a.is-current {
  font-weight: 700;
  background: rgba(68, 84, 106, 0.12);
}

.submenu a:hover,
.submenu a:focus-visible {
  background: rgba(68, 84, 106, 0.08);
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.has-submenu.submenu-open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-list a {
  position: relative;
  padding-bottom: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding-right: 1.1rem;
}

.nav-list a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.nav-list a:hover::before,
.nav-list a:focus-visible::before {
  width: 100%;
}

.nav-list a.is-active::before,
.nav-list a.is-current::before,
.nav-list a[aria-current="page"]::before {
  width: 100%;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

/* =============================
   Buttons & Links
============================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(68, 84, 106, 0.25);
}

.btn.primary:hover {
  background: var(--primary-strong);
  transform: translateY(-2px);
}

.btn.ghost {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn.ghost:hover {
  background: rgba(68, 84, 106, 0.08);
  transform: translateY(-2px);
}

.btn.small {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  background: var(--secondary);
  color: #fff;
}

.btn.small:hover {
  background: #B06D52;
  transform: translateY(-2px);
}

.btn.ghost.small {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn:active {
  transform: translateY(0);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.text-link::after {
  content: "→";
  transition: transform 0.25s ease;
}

.text-link:hover::after {
  transform: translateX(4px);
}

/* Underline animé discret pour liens texte */
.text-link {
  position: relative;
}

.text-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: rgba(68, 84, 106, 0.35);
  transition: width 0.25s ease;
}

.text-link:hover::before,
.text-link:focus-visible::before {
  width: 100%;
}

/* =============================
   Hero & Sections
============================= */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(68, 84, 106, 0.18), transparent 70%);
  top: -120px;
  left: -120px;
  transform: translate(var(--hero-parallax-x, 0px), var(--hero-parallax-y, 0px));
  transition: transform 0.6s ease;
}

.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(192, 122, 92, 0.22), transparent 70%);
  bottom: -120px;
  right: -80px;
  transform: translate(var(--hero-parallax-x, 0px), var(--hero-parallax-y, 0px));
  transition: transform 0.6s ease;
}

.hero .hero-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero .hero-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  gap: 2.5rem;
}

/* Centre les titres principaux et les accroches dans les en-têtes de page */
.hero-text,
.page-hero-grid > div {
  text-align: center;
}

/* Animation d’entrée douce du titre (hero) */
.hero-text h1,
.hero-text .subtitle,
.hero-text .lead,
.hero-text .cta-group {
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeUp 0.7s ease forwards;
}

.hero-text .subtitle {
  animation-delay: 0.08s;
}

.hero-text .lead {
  animation-delay: 0.16s;
}

.hero-text .cta-group {
  animation-delay: 0.24s;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--primary-strong);
  font-weight: 600;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.05rem;
  max-width: none;
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 1.6rem;
}

/* Centre les CTA du hero par rapport au texte */
.hero-text .cta-group {
  justify-content: center;
  width: 100%;
  align-items: center;
}

.meta {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.meta li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.meta li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  display: inline-block;
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-top: 0;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--primary-strong);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(68, 84, 106, 0.15);
}

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 90px;
}

.surface {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.section {
  position: relative;
  overflow: hidden;
  text-align: left;
}

/* Backgrounds dynamiques par section */
.section,
.hero,
.page-hero,
.site-footer {
  --section-bg: var(--surface);
  --section-grad-1: rgba(68, 84, 106, 0.08);
  --section-grad-2: rgba(192, 122, 92, 0.08);
  --section-grad-3: rgba(111, 138, 151, 0.06);
  background-color: var(--section-bg);
  background-image:
    radial-gradient(120% 80% at 10% -10%, var(--section-grad-1), transparent 60%),
    radial-gradient(120% 80% at 110% 10%, var(--section-grad-2), transparent 60%),
    linear-gradient(120deg, rgba(255, 255, 255, 0), var(--section-grad-3), rgba(255, 255, 255, 0));
  background-size: 180% 180%;
  background-position: 0% 50%, 100% 50%, 50% 50%;
  animation: sectionGradient 26s ease-in-out infinite;
}

.section.surface {
  --section-bg: var(--surface-soft);
}

.hero {
  --section-bg: var(--bg);
  --section-grad-1: rgba(68, 84, 106, 0.12);
  --section-grad-2: rgba(192, 122, 92, 0.12);
  --section-grad-3: rgba(111, 138, 151, 0.08);
}

.page-hero {
  --section-bg: var(--bg);
  --section-grad-1: rgba(68, 84, 106, 0.09);
  --section-grad-2: rgba(192, 122, 92, 0.1);
  --section-grad-3: rgba(111, 138, 151, 0.07);
}

#projets {
  --section-grad-1: rgba(68, 84, 106, 0.09);
  --section-grad-2: rgba(111, 138, 151, 0.08);
  --section-grad-3: rgba(192, 122, 92, 0.06);
}

#a-propos {
  --section-grad-1: rgba(192, 122, 92, 0.1);
  --section-grad-2: rgba(68, 84, 106, 0.07);
  --section-grad-3: rgba(111, 138, 151, 0.06);
}

#contact,
.site-footer {
  --section-bg: var(--surface-soft);
  --section-grad-1: rgba(68, 84, 106, 0.1);
  --section-grad-2: rgba(192, 122, 92, 0.08);
  --section-grad-3: rgba(111, 138, 151, 0.07);
}

@keyframes sectionGradient {
  0% {
    background-position: 0% 50%, 100% 50%, 50% 50%;
  }
  50% {
    background-position: 100% 50%, 0% 50%, 50% 100%;
  }
  100% {
    background-position: 0% 50%, 100% 50%, 50% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section,
  .hero,
  .page-hero,
  .site-footer {
    animation: none;
  }
}

/* Cohérence des alignements (hors hero/page-hero) */
.section:not(.page-hero) h2,
.section:not(.page-hero) p {
  text-align: left;
}

.section .list {
  text-align: left;
}

.cta-panel {
  text-align: center;
}

/* Harmonise l'alignement en mobile quand les sections passent en 1 colonne */
@media (max-width: 760px) {
  .about-portrait {
    justify-self: center;
    margin: 0 auto;
  }

  /* Titre Ambroise Tournesol : légèrement réduit pour garder des marges */
  #ambroise-title {
    font-size: clamp(1.6rem, 5.5vw, 2.1rem);
  }

  /* Encadrés études de cas : tout centrer en mobile */
  .case-card,
  .case-card h3,
  .case-card p,
  .case-card .list {
    text-align: center;
  }

  .case-card .list {
    justify-items: center;
  }

  h1,
  h2,
  h3 {
    white-space: nowrap;
  }

  /* Forcer des sauts de ligne maîtrisés sur certains titres */
  #search-title,
  #gallery-title,
  .hero-card h2 {
    white-space: normal;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  #search-title .title-break,
  #gallery-title .title-break {
    display: block;
  }

  h1 {
    font-size: clamp(1.9rem, 6vw, 2.4rem);
  }

  h2 {
    font-size: clamp(1.2rem, 4.2vw, 1.6rem);
  }

  h3 {
    font-size: clamp(1rem, 3.8vw, 1.2rem);
  }
  .section:not(.page-hero) h2,
  .section:not(.page-hero) p,
  .section .list {
    text-align: center;
  }
}

.cta-wrap {
  background: var(--bg);
}

.cta-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Centre parfaitement le titre avec pictogramme dans le CTA alternance */
.cta-panel .section-title {
  display: flex;
  justify-content: center;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

/* Cohérence des espacements de section */
.section .container > h2 {
  margin-bottom: 1.2rem;
}

.section .container > p {
  margin-bottom: 1.2rem;
  max-width: 820px;
}

.section .container > .section-lead {
  margin-bottom: 2rem;
  max-width: 820px;
}

.section .container > .list {
  margin: 0.6rem 0 1.2rem;
}

.section .cta-group {
  margin-top: 1rem;
}

/* Centre les CTA dans le bloc alternance (toutes pages) */
.cta-panel .cta-group {
  justify-content: center;
}


.section::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 138, 151, 0.18), transparent 70%);
  top: -60px;
  right: -80px;
  transform: translate(var(--section-parallax-x, 0px), var(--section-parallax-y, 0px));
  transition: transform 0.6s ease;
  pointer-events: none;
}

.section.surface::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(192, 122, 92, 0.2), transparent 70%);
  bottom: -80px;
  left: -60px;
  transform: rotate(12deg);
  transform: translate(var(--section-parallax-x, 0px), var(--section-parallax-y, 0px)) rotate(12deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.split {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: 2.5rem;
}

.about-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 2.5rem;
}

.about-row > div,
.about-row > figure {
  align-self: center;
}

.about-portrait {
  width: min(220px, 44vw);
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 45% 55% / 60% 40% 60% 40%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--surface);
  justify-self: end;
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.35s ease;
}

.about-portrait:hover img {
  transform: scale(1.04);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  width: 100%;
  margin-top: 2rem;
}

.fact-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  border: 1px solid var(--border);
  min-height: 160px;
}

/* Icônes dans les encadrés À propos */
.fact-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  text-align: center;
}

.fact-icon {
  width: 20px;
  height: 20px;
  background: var(--secondary);
  flex: 0 0 auto;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.fact-icon-listen {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H9l-5 4v-4H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H9l-5 4v-4H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

.fact-icon-structure {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h16v2H4v-2zm2-8h3v6H6v-6zm5-4h3v10h-3V7zm5 2h3v8h-3V9z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h16v2H4v-2zm2-8h3v6H6v-6zm5-4h3v10h-3V7zm5 2h3v8h-3V9z'/%3E%3C/svg%3E");
}

.fact-icon-visual {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7zm0 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
}

.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  counter-reset: step;
  margin-bottom: 2.5rem;
}

.process li {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  counter-increment: step;
}

.process li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-serif);
  color: rgba(68, 84, 106, 0.3);
  font-size: 1.4rem;
}

.tools h3 {
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list.centered {
  justify-content: center;
}

.project-card .tag-list {
  justify-content: center;
}

.tools .tag-list {
  justify-content: center;
}
.tag-list li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--primary-strong);
  font-size: 0.85rem;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tag-list li:hover,
.tag-list li:focus-visible {
  background: rgba(68, 84, 106, 0.12);
  border-color: rgba(68, 84, 106, 0.3);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(35, 25, 20, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 100%;
}

.project-card,
.case-section,
.fact-card,
.process-step {
  min-height: 100%;
}

/* Limite la hauteur des textes pour éviter les débordements */
.project-card p {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card .tag-list {
  margin-top: auto;
}

.project-card .text-link {
  align-self: flex-start;
}

.btn.card-cta {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  background: var(--primary);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  align-self: center;
}

.project-link .card-cta {
  margin-top: auto;
  align-self: center;
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.2rem;
}

.project-link .card-cta:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(68, 84, 106, 0.2);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(68, 84, 106, 0.35);
}

/* Micro-zoom léger du contenu */
.project-card .project-type,
.project-card h3,
.project-card p,
.project-card .tag-list {
  transition: transform 0.25s ease;
}

.project-card:hover .project-type,
.project-card:hover h3,
.project-card:hover p,
.project-card:hover .tag-list {
  transform: scale(1.01);
}

.project-type {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 0.7rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.project-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* =============================
   Page Projects & Case Studies
============================= */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  gap: 2rem;
}

.page-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* Suppression des mockups dans l’encart rôle : pas d’image ici */

.breadcrumbs {
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs.mini {
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--primary);
  font-weight: 600;
}

.project-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}

.project-card.link-card {
  padding: 0;
  overflow: hidden;
}

.project-link {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem;
  height: 100%;
}

.project-link p {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================
   Galerie visuelle (autres projets)
============================= */
/* Galerie secondaire : claire, respirante, visuellement discrète */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  transition: transform 0.25s ease;
}

.gallery-thumb {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, rgba(68, 84, 106, 0.12), rgba(192, 122, 92, 0.18));
  border-radius: 18px;
  box-shadow: 0 22px 40px rgba(43, 47, 54, 0.16);
  overflow: hidden;
}

.gallery-thumb.zoomable {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  background: none;
}

/* Centrage précis pour logo et publicité */
.gallery-thumb.gallery-logo-focus {
  object-position: center 35%;
}

.gallery-thumb.gallery-pub-focus {
  object-position: center 30%;
}

.gallery-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(43, 47, 54, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item figcaption {
  padding: 0.6rem 0.2rem 0.2rem;
  color: var(--primary-strong);
  font-size: 0.8rem;
  text-align: center;
}

.gallery-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-weight: 600;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item:hover .gallery-thumb::after {
  opacity: 1;
}

/* Variations de teinte pour la galerie */
.thumb-1 { background: linear-gradient(135deg, rgba(68, 84, 106, 0.2), rgba(111, 138, 151, 0.25)); }
.thumb-2 { background: linear-gradient(135deg, rgba(192, 122, 92, 0.22), rgba(240, 234, 220, 0.4)); }
.thumb-3 { background: linear-gradient(135deg, rgba(68, 84, 106, 0.18), rgba(192, 122, 92, 0.18)); }
.thumb-4 { background: linear-gradient(135deg, rgba(111, 138, 151, 0.22), rgba(240, 234, 220, 0.4)); }

.project-card.link-card:hover,
.project-card.link-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(35, 25, 20, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--primary-strong);
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  gap: 2rem;
}

/* ActivePulse: Design UI + prototype en 2 colonnes */
.design-ui-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.design-ui-text {
  max-width: 560px;
}

.design-ui-cta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.learning-grid {
  margin-top: 2.5rem;
}

/* CookTogether: rendre le bloc Design UI plus simple et moins "card" */
.cook-detail .design-ui-block {
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--surface-soft);
}

/* ActivePulse: équilibrer la colonne "Design UI & interactions" */
.detail-grid.design-ui {
  align-items: stretch;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.detail-grid.design-ui > div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.detail-grid.design-ui .stat-card {
  height: 100%;
}

.detail-grid.design-ui .design-ui-text {
  max-width: 420px;
}

/* CTA prototype plus visible */
.prototype-cta {
  align-self: flex-start;
  padding: 0.95rem 1.8rem;
  box-shadow: none;
  border: 0;
  background: linear-gradient(180deg, #46586f, #39495e);
}

.prototype-cta:hover {
  box-shadow: none;
}

.detail-grid.design-ui .prototype-cta {
  margin-top: auto;
}

.list {
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
}

.list li {
  position: relative;
  padding-left: 1.2rem;
}

.list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--secondary);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.stats {
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
}

.stats strong {
  color: var(--primary-strong);
  font-size: 1.05rem;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

/* Grille d’écrans clés (images) */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.screen-item {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.screen-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 45px rgba(43, 47, 54, 0.18);
  background: #ffffff;
}

.screen-item:hover img {
  transform: translateY(-4px);
  box-shadow: 0 28px 55px rgba(43, 47, 54, 0.22);
}

/* Mise en page stylisée des écrans (tailles variables + coins arrondis) */
.screens-styled {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 1.4rem;
}

/* CookTogether: grands écrans un peu plus compacts */
.cook-screens {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}
.cook-screens .screen-item--xl { grid-column: span 1; grid-row: span 1; }
.cook-screens .screen-item--md { grid-column: span 1; grid-row: span 1; }
.cook-screens .screen-item--sm { grid-column: span 1; grid-row: span 1; }

/* Mettre en avant les mockups */
.screens-styled .screen-item.is-featured {
  grid-column: span 2;
  grid-row: span 2;
  z-index: 2;
}

/* Wireframes */
.wireframes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.wireframe-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.wireframe-item img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.wireframe-item figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.wireframe-item.is-placeholder {
  background: var(--surface-soft);
  position: relative;
}

.wireframe-item.is-placeholder img {
  opacity: 0;
}

.wireframe-item.is-placeholder::after {
  content: "Wireframes à venir";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(68, 84, 106, 0.12);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 600;
}

.wireframe-item.is-placeholder::before {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border-radius: 12px;
  background: repeating-linear-gradient(
    135deg,
    rgba(68, 84, 106, 0.08),
    rgba(68, 84, 106, 0.08) 12px,
    rgba(255, 255, 255, 0.2) 12px,
    rgba(255, 255, 255, 0.2) 24px
  );
}

.cook-screens .screen-item.is-hero {
  grid-column: 1 / -1;
  grid-row: span 1;
  max-width: 560px;
  margin: 0 auto 0.5rem;
}

.cook-screens .screen-item.is-secondary {
  grid-column: 1 / span 2;
  justify-self: end;
  max-width: 420px;
  transform: translate(0, 6px) rotate(-0.2deg);
}

.cook-screens .screen-item.is-post {
  grid-column: 3 / span 2;
  justify-self: start;
  max-width: 420px;
  transform: translate(0, 6px) rotate(0.2deg);
}

/* Ambroise Tournesol : composition proche de CookTogether */
.ambroise-screens {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}

.ambroise-screens .screen-item.is-hero {
  grid-column: 1 / -1;
  grid-row: span 1;
  max-width: 560px;
  margin: 0 auto 0.5rem;
}

.ambroise-screens .screen-item.is-secondary {
  grid-column: 1 / span 2;
  justify-self: end;
  max-width: 420px;
  transform: translate(0, 6px) rotate(-0.2deg);
}

.ambroise-screens .screen-item.is-post {
  grid-column: 3 / span 2;
  justify-self: start;
  max-width: 420px;
  transform: translate(0, 6px) rotate(0.2deg);
}

.active-screens .screen-item.is-hero {
  grid-column: span 4;
  grid-row: span 2;
}

/* Composition "explosion" autour du mockup principal */
.cook-screens .screen-item.is-secondary { z-index: 1; }
.cook-screens .screen-item.is-post { z-index: 2; }

.active-screens .screen-item.is-featured:first-child { transform: translateY(-6px); }
.active-screens .screen-item.is-featured:last-child { transform: translateY(8px); }

.screens-styled .screen-item {
  border-radius: 20px;
  box-shadow: none;
}

/* Trois tailles : petite (sm), moyenne (md), grande (xl) */
.screen-item--sm { grid-column: span 2; grid-row: span 1; }
.screen-item--md { grid-column: span 3; grid-row: span 1; }
.screen-item--xl { grid-column: span 4; grid-row: span 2; }

/* Décalages doux pour un effet “magazine” */
.screens-styled .screen-item:nth-child(1) { transform: translateY(-6px); }
.screens-styled .screen-item:nth-child(2) { transform: translateY(8px); }
.screens-styled .screen-item:nth-child(3) { transform: translateY(-10px); }
.screens-styled .screen-item:nth-child(4) { transform: translateY(6px); }
.screens-styled .screen-item:nth-child(5) { transform: translateY(-4px); }
.screens-styled .screen-item:nth-child(6) { transform: translateY(10px); }

@media (max-width: 1024px) {
  .screens-styled {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .screen-item--xl { grid-column: span 4; }
  .screen-item--md { grid-column: span 2; }
  .screen-item--sm { grid-column: span 2; }
}

@media (max-width: 760px) {
  .screens-styled {
    grid-template-columns: 1fr;
  }
  .screen-item--xl,
  .screen-item--md,
  .screen-item--sm {
    grid-column: span 1;
    grid-row: span 1;
  }
  .screens-styled .screen-item {
    transform: none;
  }
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.pill {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--primary-strong);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.pill:hover,
.pill:focus-visible {
  background: rgba(192, 122, 92, 0.18);
  border-color: rgba(192, 122, 92, 0.45);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.case-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.case-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
}

/* Grille synthèse UX */
.case-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

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

  .case-grid-layout.grid-3x2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
  }
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.6rem;
}

.case-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.case-card .list {
  gap: 0.4rem;
}

/* =============================
   Contact & Forms
============================= */
.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 2.5rem;
}

.contact-info.highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-card,
.form-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-card:hover,
.form-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.contact-list {
  display: grid;
  gap: 1.2rem;
  color: var(--text);
  font-size: 1.02rem;
}

.contact-list span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

/* Lien email avec underline discret */
.contact-list a {
  position: relative;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 600;
}

.contact-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: rgba(68, 84, 106, 0.35);
  transition: width 0.25s ease;
}

.contact-list a:hover::after,
.contact-list a:focus-visible::after {
  width: 100%;
}

.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  justify-items: stretch;
}

/* Bouton du formulaire plus compact */
.form-card .btn {
  justify-self: end;
  width: auto;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  background: var(--surface-soft);
  color: var(--text);
}

.input:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-color: rgba(68, 84, 106, 0.4);
  box-shadow: 0 0 0 3px rgba(192, 122, 92, 0.15);
}

/* =============================
   Footer
============================= */
.site-footer {
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--secondary);
}

.footer-links a .icon {
  transition: transform 0.2s ease;
}

.footer-links a:hover .icon,
.footer-links a:focus-visible .icon {
  transform: translateY(-1px);
}

/* Navigation projets (chevrons) */
.project-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: center;
  justify-items: center;
}

.project-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.project-nav__link:hover,
.project-nav__link:focus-visible {
  border-color: rgba(68, 84, 106, 0.3);
  box-shadow: var(--shadow);
}

.project-nav__chevron {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--primary-strong);
}

.project-nav__link--center {
  justify-content: center;
  text-align: center;
}

.icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

/* =============================
   Animations (light)
============================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Bouton retour (pages projets) */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.back-link::before {
  content: "←";
  transition: transform 0.25s ease;
}

.back-link:hover::before,
.back-link:focus-visible::before {
  transform: translateX(-4px);
}

.reveal.stagger > * {
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* =============================
   Responsive (mobile-first)
============================= */
@media (min-width: 700px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .nav-list {
    justify-content: center;
  }
}

@media (min-width: 900px) {
  .header-inner {
    align-items: center;
  }
}

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

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
  }

  .header-actions {
    display: none;
  }

  .logo {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    grid-column: 1;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
    grid-column: 3;
  }

  .nav-list {
    justify-content: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding-top: 0.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav.is-open .nav-list {
    display: flex;
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .design-ui-row {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .design-ui-cta {
    width: 100%;
    justify-content: center;
  }

  .about-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  /* CookTogether images: ensure full visibility on mobile */
  .cook-screens {
    grid-template-columns: 1fr;
  }

  .cook-screens .screen-item.is-hero,
  .cook-screens .screen-item.is-secondary,
  .cook-screens .screen-item.is-post {
    grid-column: span 1;
    justify-self: center;
    max-width: 100%;
    transform: none;
  }

  /* Ambroise Tournesol images: same mobile stacking */
  .ambroise-screens {
    grid-template-columns: 1fr;
  }

  .ambroise-screens .screen-item.is-hero,
  .ambroise-screens .screen-item.is-secondary,
  .ambroise-screens .screen-item.is-post {
    grid-column: span 1;
    justify-self: center;
    max-width: 100%;
    transform: none;
  }

  .project-nav {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 1.2rem;
  }

  .project-nav__link {
    justify-content: center;
  }

  .cta-panel .cta-group {
    justify-content: center;
  }

  .hero {
    padding-top: 3rem;
  }

  .btn.small {
    display: none;
  }

  .gallery-thumb {
    height: 160px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .screens-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .page-hero-grid,
  .case-grid,
  .detail-grid,
  .process,
  .projects-grid,
  .project-list,
  .wireframes-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-card,
  .detail-grid.design-ui > div,
  .case-section {
    text-align: center;
  }

  .detail-grid.design-ui {
    grid-template-columns: 1fr;
  }

  .section .container > p,
  .section .container > .section-lead {
    max-width: 100%;
  }

  .submenu {
    position: static;
    min-width: auto;
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    display: grid;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  }

  .has-submenu.submenu-open .submenu {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    transform: translateY(0);
    padding: 0.4rem 0 0.6rem;
  }

  .nav-list a {
    justify-content: center;
    width: 100%;
    padding-right: 0;
  }

  .has-submenu > a::after {
    position: static;
    transform: none;
    margin-left: 0.35rem;
  }

  .submenu a {
    text-align: center;
    width: 100%;
  }

  /* Centre le bloc "icône + titre" */
  .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
    row-gap: 0.2rem;
  }

  /* CTA alternance : éviter le débordement du titre */
  .cta-panel .section-title {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-wrap: balance;
    flex-wrap: wrap;
  }

  .section-title .title-break {
    flex-basis: 100%;
  }

  #search-title .title-main,
  #gallery-title .title-main {
    display: inline-flex;
    white-space: nowrap;
  }

  #search-title,
  #gallery-title,
  #cta-contact-title {
    margin-bottom: 1.8rem;
  }

  #search-title + p,
  #gallery-title + .section-lead {
    margin-top: 0.8rem;
  }


  /* Centre tout le contenu en mobile (hors champs de formulaire) */
  .section,
  .section .container,
  .section .container > * {
    text-align: center;
  }

  .section .list,
  .list {
    justify-items: center;
  }

  .project-card .text-link,
  .project-card .btn.card-cta,
  .contact-actions,
  .cta-group,
  .tag-list {
    justify-content: center;
    align-items: center;
  }

  .project-card .text-link {
    align-self: center;
  }

  /* Garder la saisie lisible dans les champs */
  .input,
  textarea {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero .hero-card,
  .project-card,
  .mockup,
  .contact-card,
  .form-card,
  .btn,
  .hero-text h1,
  .hero-text .subtitle,
  .hero-text .lead,
  .hero-text .cta-group {
    transition: none;
  }

  .hero::before,
  .hero::after,
  .section::before,
  .section.surface::after {
    transform: none;
  }

  .hero-text h1,
  .hero-text .subtitle,
  .hero-text .lead,
  .hero-text .cta-group {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 4px rgba(192, 122, 92, 0.18);
  flex: 0 0 auto;
}

/* Pictos discrets pour certaines sections */
.section-title.icon::before {
  width: 18px;
  height: 18px;
  border-radius: 0;
  box-shadow: none;
  background: var(--secondary);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.section-title.icon-projects::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6z'/%3E%3C/svg%3E");
}

.section-title.icon-process::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h6v6H4V5zm10 0h6v6h-6V5zM4 13h6v6H4v-6zm10 0h6v6h-6v-6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h6v6H4V5zm10 0h6v6h-6V5zM4 13h6v6H4v-6zm10 0h6v6h-6v-6z'/%3E%3C/svg%3E");
}

.section-title.icon-wireframes::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v16H4V4zm2 2v12h12V6H6zm2 2h4v4H8V8zm0 6h8v2H8v-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v16H4V4zm2 2v12h12V6H6zm2 2h4v4H8V8zm0 6h8v2H8v-2z'/%3E%3C/svg%3E");
}

.section-title.icon-screens::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-6v2h3v2H7v-2h3v-2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zm0 2v8h16V7H4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-6v2h3v2H7v-2h3v-2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zm0 2v8h16V7H4z'/%3E%3C/svg%3E");
}

.section-title.icon-contact::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zm0 2v.2l8 4.8 8-4.8V7H4zm16 10V9.3l-7.4 4.4a1 1 0 0 1-1.2 0L4 9.3V17h16z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zm0 2v.2l8 4.8 8-4.8V7H4zm16 10V9.3l-7.4 4.4a1 1 0 0 1-1.2 0L4 9.3V17h16z'/%3E%3C/svg%3E");
}

.section-title.icon-alternance::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 4h6a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a2 2 0 0 1 2-2h3V6a2 2 0 0 1 2-2zm0 3h6V6H9v1zm-5 4v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4h-6v1h-4v-1H4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 4h6a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a2 2 0 0 1 2-2h3V6a2 2 0 0 1 2-2zm0 3h6V6H9v1zm-5 4v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4h-6v1h-4v-1H4z'/%3E%3C/svg%3E");
}

/* Forcer l'icône à rester sur la première ligne pour ces titres */
#search-title::before,
#gallery-title::before,
#cta-contact-title::before {
  content: none;
}

#search-title .title-main,
#gallery-title .title-main,
#cta-contact-title .title-main {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

#search-title .title-main::before,
#gallery-title .title-main::before,
#cta-contact-title .title-main::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: var(--secondary);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

#search-title .title-main::before,
#cta-contact-title .title-main::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 4h6a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a2 2 0 0 1 2-2h3V6a2 2 0 0 1 2-2zm0 3h6V6H9v1zm-5 4v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4h-6v1h-4v-1H4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 4h6a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a2 2 0 0 1 2-2h3V6a2 2 0 0 1 2-2zm0 3h6V6H9v1zm-5 4v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4h-6v1h-4v-1H4z'/%3E%3C/svg%3E");
}

#gallery-title .title-main::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6z'/%3E%3C/svg%3E");
}
