/*
 * SYSTEME DE DESIGN & TYPOGRAPHIE
 * ===============================
 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Mr+De+Haviland&display=swap');

:root {
  /* Nuancier Pastel, Aquarelle, Vert, Bleu, Canard, Eau, Turquoise */
  --teal-dark: #063942;
  /* Canard très sombre (texte principal, haute lisibilité AA/AAA) */
  --teal-primary: #005a66;
  /* Canard classique (titres et boutons) */
  --teal-secondary: #008799;
  /* Canard clair / Turquoise soutenu (accents et interactions) */
  --water-accent: #38b4bd;
  /* Turquoise d'eau (liens, focus, éléments dynamiques) */
  --water-pastel: #bfebe4;
  /* Pastel eau / turquoise très doux */

  /* Variations de pastels pour les arrière-plans et cartes */
  --pastel-green: #e1f5f2;
  --pastel-green-light: #f0faf8;
  --pastel-blue: #e3effa;
  --pastel-blue-light: #f2f7fc;
  --pastel-turquoise: #e2f8f5;

  --water-10: rgba(0, 143, 153, 0.1);
  --water-05: rgba(0, 143, 153, 0.05);
  --white-trans: rgba(255, 255, 255, 0.75);

  --text-main: var(--teal-dark);
  --text-muted: #3a5c60;

  /* Neutres */
  --white: #ffffff;
  --black: #0b1516;
  --card-bg: var(--white-trans);
  --bg-primary: #f4f9f8;
  /* Fond aquarelle général très frais */

  /* Ombres premium et adoucies */
  --shadow-sm: 0 4px 6px -1px rgba(6, 61, 66, 0.05), 0 2px 4px -1px rgba(6, 61, 66, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(6, 61, 66, 0.06), 0 4px 6px -2px rgba(6, 61, 66, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(6, 61, 66, 0.08), 0 10px 10px -5px rgba(6, 61, 66, 0.04);
  --shadow-glow: 0 0 30px rgba(56, 189, 168, 0.25);

  /* Transitions et Rayons */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 2px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Polices sans empatement (Sérieux travail typographique) */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* RESET STANDARD ACCESSIBLE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  /* Remplace 'hidden' par 'clip' pour ne pas casser position: sticky */
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: clip;
  /* Remplace 'hidden' par 'clip' pour ne pas casser position: sticky */
  position: relative;
}

/* STYLE DE FOCUS ULTRA-ACCESSIBLE */
:focus-visible {
  outline: 3px solid var(--water-accent);
  outline-offset: 4px;
}

/* EVITER LES SUPPRESSIONS PAR DEFAUT DE LISTES POUR LES LECTEURS D'ECRAN */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* ACCESSIBILITE : SKIP LINK */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--teal-primary);
  color: var(--white);
  padding: 10px 20px;
  z-index: 1000;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--font-headings);
  font-weight: 500;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 20px;
}

/* ELEMENTS D'AQUARELLE ET BLOBS ARRIERE-PLAN (FLUIDES) */
.watercolor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.watercolor-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
  mix-blend-mode: multiply;
  pointer-events: none;
  animation: float-blob 25s infinite alternate ease-in-out;
}

.blob-1 {
  background-color: var(--pastel-green);
  width: 50vw;
  height: 50vw;
  top: -10%;
  left: -10%;
  animation-duration: 30s;
}

.blob-2 {
  background-color: var(--pastel-blue);
  width: 60vw;
  height: 60vw;
  bottom: -15%;
  right: -10%;
  animation-duration: 35s;
  animation-delay: -5s;
}

.blob-3 {
  background-color: var(--pastel-turquoise);
  width: 45vw;
  height: 45vw;
  top: 40%;
  left: 30%;
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  50% {
    transform: translate(5%, 8%) scale(1.1) rotate(90deg);
  }

  100% {
    transform: translate(-5%, -5%) scale(0.9) rotate(180deg);
  }
}

/* STRUCTURE DE PAGE */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVIGATION (GLASSMORPHIC) */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 143, 153, 0.08);
  transition: var(--transition-smooth);
}

/* Le fond et le flou du header sont déplacés sur un pseudo-élément.
   Cela empêche le .header de créer un contexte d'empilement (containing block)
   qui bloquait le backdrop-filter du menu mobile positionné en fixed à l'intérieur ! */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(244, 249, 248, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}

.header--scrolled {
  padding: 4px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--teal-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: var(--water-accent);
  border-radius: 50%;
  display: inline-block;
}

.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  padding: 8px 0;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--water-accent);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--teal-secondary);
}

/* Bouton d'action Écrivez-moi (CTA Header) */
.nav-link-cta {
  border: 2px solid var(--teal-primary) !important;
  border-radius: 50px !important;
  padding: 8px 20px !important;
  color: var(--teal-primary) !important;
  font-weight: 600 !important;
  margin-left: 12px;
  background-color: transparent;
  transition: var(--transition-smooth) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link-cta::after {
  display: none !important;
}

.nav-link-cta:hover,
.nav-link-cta:focus-visible {
  background-color: var(--teal-primary) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-sm), var(--shadow-glow);
  transform: translateY(-2px);
}

/* LIEN STORYTIME MOBILE */
.mobile-storytime-btn {
  display: none;
  /* Masqué sur Desktop */
  background: none;
  border: none;
  background-color: var(--water-05);
  padding: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--teal-primary);
  transition: var(--transition-smooth);
  align-items: center;
  justify-content: center;
}

.mobile-storytime-btn:hover {
  background-color: var(--water-10);
}

.mobile-storytime-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* SECTION GENERIQUE */
.section {
  padding: 96px 0;
  position: relative;
}

.section-subtitle {
  font-family: 'Mr De Haviland', cursive;
  font-weight: 500;
  font-size: 5.5rem;
  color: var(--teal-secondary);
  opacity: 0.4;
  margin-bottom: -3.8rem;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  transform: translateY(-0.8rem);
  white-space: nowrap;
  overflow: visible;
}

.section-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.25;
  color: var(--teal-dark);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 48px;
}

/* BOUTONS PREMIUM */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  gap: 8px;
}

.btn--primary {
  background-color: var(--teal-primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--teal-secondary);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-2px);
}

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

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background-color: var(--water-10);
  border-color: var(--teal-secondary);
  color: var(--teal-secondary);
  transform: translateY(-2px);
}

.btn--text {
  padding: 6px 0;
  color: var(--teal-primary);
  border-radius: 0;
  border-bottom: 2px solid var(--water-accent);
}

.btn--text:hover,
.btn--text:focus-visible {
  color: var(--teal-secondary);
  border-bottom-color: var(--teal-primary);
  padding-left: 4px;
}

/* 1. HOOK SCREEN (HERO) */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  position: relative;
  padding: 60px 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  z-index: 10;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.hero-tag svg {
  flex-shrink: 0;
  animation: tag-icon-pulse 3s infinite ease-in-out;
}

@keyframes tag-icon-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Statut : Disponible (par défaut / Vert d'eau) */
.hero-tag[data-status="available"] {
  background-color: var(--pastel-green-light);
  color: var(--teal-primary);
  border-color: rgba(0, 90, 102, 0.15);
}

.hero-tag[data-status="available"] svg {
  color: var(--water-accent);
  filter: drop-shadow(0 0 2px rgba(56, 189, 168, 0.4));
}

/* Statut : Occupé (Terracotta doux pour s'intégrer harmonieusement) */
.hero-tag[data-status="busy"] {
  background-color: rgba(224, 122, 95, 0.08);
  color: #9c331a;
  border-color: rgba(224, 122, 95, 0.2);
  transform: rotate(-3deg);
}

.hero-tag[data-status="busy"]:hover {
  transform: rotate(-1deg) scale(1.02);
}

.hero-tag[data-status="busy"] svg {
  color: #e07a5f;
  filter: drop-shadow(0 0 2px rgba(224, 122, 95, 0.4));
}

.hero-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.1;
  color: var(--teal-dark);
  margin-bottom: 24px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--teal-primary) 20%, var(--water-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Illustration Hero Aquarellée */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-cat-wrapper {
  position: relative;
  display: inline-block;
  z-index: 2;
}

.hero-cat-img {
  display: block;
  /* Supprime le décalage de la ligne de base (baseline gap) */
  position: relative;
  z-index: 2;
  transition: var(--transition-smooth);
  width: auto;
  height: 550px;
}

/* Longue queue de chat (trait horizontal simple) s'échappant vers la droite */
.cat-tail-svg {
  position: absolute;
  left: 50%;
  /* Commence exactement au milieu du corps du chat, aucun débordement à gauche ! */
  bottom: 0px;
  /* Alignement vertical parfait et proportionnel sur les fesses du chat */
  width: auto;
  /* S'échappe à l'infini vers la droite */
  height: 30px;
  /* Hauteur correspondant à l'épaisseur de la ligne */
  z-index: 1;
  /* Derrière le chat pour une fusion parfaite */
  pointer-events: none;
  overflow: visible;
  transition: var(--transition-smooth);
}

/* Version responsive de la queue de chat */
@media (max-width: 1200px) {
  .cat-tail-svg {
    height: 26px;
  }
}

@media (max-width: 992px) {
  .hero-cat-img {
    height: 420px;
    /* On réduit la hauteur sur tablette */
  }

  .cat-tail-svg {
    height: 22px;
    /* L'épaisseur de la queue diminue proportionnellement au chat */
  }
}

@media (max-width: 576px) {
  .hero-cat-img {
    height: 320px;
    /* Encore plus petit sur mobile */
  }

  .cat-tail-svg {
    height: 16px;
    /* Plus fin sur mobile */
  }
}

.watercolor-art {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(var(--shadow-md));
  animation: subtle-drift 8s ease-in-out infinite alternate;
}

@keyframes subtle-drift {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-headings);
  font-weight: 500;
  letter-spacing: 0.1em;
}

@media (max-width: 1000px) {
  .scroll-indicator {
    display: none;
  }
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--teal-secondary);
  border-radius: 20px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--water-accent);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel-anim 1.8s infinite ease-in-out;
}

@keyframes scroll-wheel-anim {
  0% {
    top: 6px;
    opacity: 1;
  }

  50% {
    top: 16px;
    opacity: 0.3;
  }

  100% {
    top: 6px;
    scroll-indicator opacity: 1;
  }
}


/* 2. SECTION JE SUIS FAINEANT */
.lazy-container {
  position: relative;
}

.lazy-card {
  position: relative;
  z-index: 2;
  background-color: var(--card-bg);
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(245, 250, 249, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  padding: 48px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.lazy-philosophy {
  padding-right: 12px;
}

.lazy-title {
  color: var(--teal-primary);
  margin-bottom: 20px;
}

.lazy-philosophy p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.lazy-highlight {
  font-weight: 600;
  color: var(--teal-dark);
  border-left: 3px solid var(--water-accent);
  padding-left: 16px;
  margin: 24px 0;
  font-style: italic;
}

/* Arrière-plan animé pour desktop */
.lazy-background-animation {
  display: none;
}

@media (min-width: 993px) {
  .lazy-background-animation {
    display: block;
    position: absolute;
    right: -25%;
    top: 20%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    animation: floating-widget 8s ease-in-out infinite alternate;
  }
}

@keyframes floating-widget {
  0% {
    transform: translateY(-53%) rotate(0deg);
  }

  100% {
    transform: translateY(-47%) rotate(3deg);
  }
}

/* Illustration Interactive Fainéant */
.lazy-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(0, 143, 153, 0.05);
  overflow: hidden;
}

.smart-lazy-widget {
  width: 75vw;
  max-width: 900px;
  height: auto;
}

/* Custom Lazy Card Image & Animations */
.lazy-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  transition: var(--transition-smooth);
}

/* .lazy-card:hover .lazy-img-wrapper {
  transform: scale(1.04);
} */

.lazy-img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  animation: float-lazy-img 3s ease-in-out infinite alternate;
}

@keyframes float-lazy-img {
  0% {
    transform: translateY(6px) rotate(-0.8deg);
  }

  100% {
    transform: translateY(-6px) rotate(0.8deg);
  }
}


/* Animations SVG Astrolabe Céleste */
.celestial-astrolabe {
  transform-origin: 300px 300px;
  animation: rotate-astrolabe 180s infinite linear;
}

@keyframes rotate-astrolabe {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.celestial-star {
  transform-origin: center;
  animation: star-glow-pulse 4s infinite ease-in-out alternate;
}

.cs-1 {
  animation-delay: 0.1s;
}

.cs-2 {
  animation-delay: 0.6s;
}

.cs-3 {
  animation-delay: 1.1s;
}

.cs-4 {
  animation-delay: 1.6s;
}

.cs-5 {
  animation-delay: 2.1s;
}

.cs-6 {
  animation-delay: 2.6s;
}

.cs-7 {
  animation-delay: 3.1s;
}

.cs-8 {
  animation-delay: 3.6s;
}

.cs-9 {
  animation-delay: 0.3s;
}

.cs-10 {
  animation-delay: 1.3s;
}

.cs-11 {
  animation-delay: 2.3s;
}

.cs-12 {
  animation-delay: 3.3s;
}

@keyframes star-glow-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.core-ring {
  transform-origin: 300px 300px;
  animation: core-ripple 8s infinite ease-out;
}

@keyframes core-ripple {
  0% {
    transform: scale(0.7);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes spin-gear {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-gear-reverse {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

@keyframes breathe {
  0% {
    opacity: 0.2;
  }

  100% {
    opacity: 0.8;
  }
}

/* Status Widget */
.widget-status {
  position: absolute;
  bottom: 16px;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--water-10);
  user-select: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #27c93f;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

/* 3. PROJETS ATTRACTIFS + GALERIE */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 48px;
}

/* Cartes Projets */
.project-card {
  background-color: var(--white-trans);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(56, 189, 168, 0.3);
}

.project-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6;
  overflow: hidden;
  background-color: var(--water-05);
  border-bottom: 1px solid rgba(0, 143, 153, 0.05);
}

.project-card-image svg {
  width: 100%;
  height: 100%;
  transition: var(--transition-smooth);
}

.project-card:hover .project-card-image svg {
  transform: scale(1.05);
}

.project-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background-color: var(--water-05);
  color: var(--teal-primary);
  font-family: var(--font-headings);
}

.project-card-title {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--teal-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* SECTION GALERIE ETENDUE */
.gallery-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-section.is-open {
  max-height: 2500px;
  /* Grande valeur de secours */
}

.gallery-inner {
  padding-top: 40px;
  border-top: 1px solid rgba(0, 143, 153, 0.1);
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--white);
  border: 1px solid rgba(0, 143, 153, 0.1);
  color: var(--text-main);
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background-color: var(--water-10);
  border-color: var(--teal-secondary);
}

.filter-btn.active {
  background-color: var(--teal-primary);
  color: var(--white);
  border-color: var(--teal-primary);
  box-shadow: var(--shadow-sm);
}

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

/* Transition de filtrage fluide */
.project-card.is-hidden {
  display: none;
}

/* 4. SECTION APPRENDRE C'EST TOUT UN ART */
.learning-section {
  background-color: var(--pastel-green-light);
  position: relative;
  isolation: isolate;
}

.learning-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(163, 227, 219, 0.15), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.learning-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

.learning-canvas {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Les Phases d'Apprentissage */
.learning-phase {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--water-accent);
  transition: var(--transition-smooth);
}

.learning-phase:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.learning-phase-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.phase-number {
  background-color: var(--water-10);
  color: var(--teal-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
}

.learning-phase h3 {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--teal-dark);
}

.learning-phase p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Visual Art of Learning */
.art-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.art-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 360px;
  transition: var(--transition-smooth);
  mix-blend-mode: multiply;
}

.art-img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.05) brightness(1.05);
  animation: float-art-img 6s ease-in-out infinite alternate;
}

@keyframes float-art-img {
  0% {
    transform: translateY(4px) rotate(-0.5deg);
  }

  100% {
    transform: translateY(-4px) rotate(0.5deg);
  }
}


/* 5. BANDEAU IA SUR-MESURE */

.container#ai {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.ai-section {
  padding: 80px 0;
  background-color: var(--teal-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: 40px 0;
  box-shadow: var(--shadow-lg);
}

.ai-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image:
    radial-gradient(var(--water-accent) 1px, transparent 1px),
    radial-gradient(var(--water-accent) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  z-index: 1;
}

.ai-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}

.ai-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 2rem;
  color: var(--pastel-turquoise);
  margin-bottom: 16px;
}

.ai-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--pastel-green-light);
  opacity: 0.9;
  margin-bottom: 24px;
}

.ai-desc-muted {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--pastel-green-light);
  opacity: 0.6;
  margin-bottom: 24px;
}

.ai-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-tag {
  background-color: rgba(56, 189, 168, 0.15);
  color: var(--water-pastel);
  border: 1px solid rgba(56, 189, 168, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-headings);
}

.ai-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ai-widget-svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

/* CONTACT & PIED DE PAGE */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-details {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  background-color: var(--water-10);
  color: var(--teal-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-label {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--teal-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  color: var(--teal-dark);
  font-weight: 500;
  text-decoration: none;
  font-size: 1.05rem;
}

.contact-socials {
  display: flex;
  gap: 16px;
}

.social-link {
  background-color: var(--white);
  border: 1px solid rgba(0, 143, 153, 0.1);
  color: var(--teal-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.social-link:hover,
.social-link:focus-visible {
  background-color: var(--teal-primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* FORMULAIRE ACCESSIBLE */
.contact-form-wrapper {
  position: relative;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 340px;
  width: 250px;
  height: 140px;
  background-image: url('./contact.jpg');
  background-size: 250px auto;
  background-position: top center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  z-index: -1;
  pointer-events: none;
}

.contact-form {
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-label {
  display: block;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal-dark);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background-color: var(--white);
  border: 1.5px solid rgba(0, 143, 153, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--water-accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(56, 189, 168, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

/* FOOTER ACCESSIBLE */
.footer {
  background-color: var(--white);
  border-top: 1px solid rgba(0, 143, 153, 0.08);
  padding: 32px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--teal-primary);
}


/* SYSTEME DE FENETRE MODALE ACCESSIBLE (DETAILS DE PROJETS) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 21, 22, 0.5);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  background-color: var(--white);
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  z-index: 1010;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--water-05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--teal-primary);
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background-color: var(--water-10);
  color: var(--water-accent);
}

.modal-content {
  padding: 32px;
}

.modal-image {
  margin: -32px -32px 24px -32px;
  background-color: var(--water-05);
  aspect-ratio: 1.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image svg {
  width: 100%;
  height: 100%;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.modal-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

.modal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-desc-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 28px;
  opacity: 0.8;
  font-style: italic;
  display: block;
}

.modal-actions {
  display: flex;
  gap: 16px;
  border-top: 1px solid rgba(0, 143, 153, 0.08);
  padding-top: 20px;
}


/* DOCK MOBILE / BOTTOM NAV POUR UN ASPECT MOBILE-FIRST PREMIUM */
.mobile-dock {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 143, 153, 0.12);
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: var(--shadow-md);
  width: calc(100% - 32px);
  max-width: 400px;
}

.dock-menu {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  list-style: none;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dock-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-headings);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.dock-link svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.dock-link:hover,
.dock-link:focus-visible {
  color: var(--teal-primary);
}

.dock-link:hover svg,
.dock-link:focus-visible svg {
  stroke: var(--teal-primary);
  transform: translateY(-2px);
}


/* RESPONSIVE DESIGN (MOBILE-FIRST PRINCIPLE) */

/* Tablettes / Ecrans moyens */
@media (max-width: 992px) {


  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .lazy-card {
    grid-template-columns: 1fr;
    padding: 32px;
    gap: 32px;
  }

  .lazy-visual {
    order: -1;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .learning-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .art-container {
    order: -1;
  }

  .ai-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ai-tags {
    justify-content: center;
  }

  .ai-illustration {
    order: -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobiles / Petits écrans */
@media (max-width: 768px) {


  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .mobile-storytime-btn {
    display: flex;
    margin-left: auto;
    /* Force l'icône à se coller parfaitement tout à droite */
  }

  /* Masque définitivement le menu desktop standard sur mobile (remplacé par le dock en bas) */
  #nav-menu {
    display: none !important;
  }

  /* Affichage du Dock Mobile pour le sentiment d'application native */
  .mobile-dock {
    display: block;
  }

  /* Ajout d'une marge en bas du body pour ne pas cacher le contenu avec le dock */
  body {
    padding-bottom: 90px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .contact-form {
    padding: 24px;
  }

  .modal-content {
    padding: 24px;
  }

  .modal-image {
    margin: -24px -24px 20px -24px;
  }
}