/* ========================================
   DESIGN SYSTEM - L'ADOMOBILE
   Site MVC Moderne - Desktop First
   ======================================== */

:root {
  /* Couleurs principales du logo */
  --color-cyan: #00BCD4;
  --color-cyan-light: #26C6DA;
  --color-cyan-dark: #0097A7;
  --color-orange: #FF9800;
  --color-orange-light: #FFB74D;
  --color-orange-dark: #F57C00;

  /* Couleurs neutres */
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-gray: #e6f7fb;
  --color-bg-cyan: #d0f0f8;

  /* Ombres modernes */
  --shadow-sm: 0 2px 8px rgba(0, 188, 212, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 188, 212, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 188, 212, 0.16);
  --shadow-hover: 0 12px 48px rgba(0, 188, 212, 0.2);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Responsive breakpoints */
  --mobile: 768px;
  --tablet: 1024px;
  --desktop: 1280px;
}

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, #ffffff 0%, #d9f2f9 100%);
  background-attachment: fixed;
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 188, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 152, 0, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 188, 212, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-light {
  background: var(--color-bg);
  position: relative;
}

.section-gray {
  background: var(--color-bg-gray);
  border-top: 3px solid rgba(0, 188, 212, 0.15);
  border-bottom: 3px solid rgba(0, 188, 212, 0.15);
  position: relative;
  box-shadow:
    inset 0 3px 12px rgba(0, 188, 212, 0.08),
    inset 0 -3px 12px rgba(0, 188, 212, 0.08);
}

.section-dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  position: relative;
  box-shadow:
    inset 0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 188, 212, 0.15);
  border-top: 2px solid rgba(0, 188, 212, 0.3);
  border-bottom: 2px solid rgba(0, 188, 212, 0.3);
}

/* ========================================
   HEADER
   ======================================== */

.header {
  background: linear-gradient(180deg, #ffffff 0%, #e6f7fb 100%);
  backdrop-filter: blur(12px);
  border-bottom: 4px solid rgba(0, 188, 212, 0.4);
  box-shadow:
    0 4px 12px rgba(0, 188, 212, 0.2),
    0 8px 30px rgba(0, 188, 212, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.header nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.header .logo {
  height: 60px;
  transition: opacity var(--transition-fast);
}

.header .logo:hover {
  opacity: 0.9;
}

.header .nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.header .nav-links a {
  padding: 0.75rem 1.5rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 12px;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.header .nav-links a:hover {
  background: var(--color-cyan);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.header .nav-links a.active {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-cyan-light) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.header .mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-cyan);
  cursor: pointer;
  padding: 0.5rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  padding: 8rem 0 10rem;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0, 188, 212, 0.8) 0%,
    rgba(0, 188, 212, 0.7) 50%,
    rgba(255, 255, 255, 0.95) 100%);
}

.hero .container {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero h1 {
  font-size: 6rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.hero .subtitle {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero .description {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
}

.hero .cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-cyan-light) 100%);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(135deg, var(--color-cyan-dark) 0%, var(--color-cyan) 100%);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: white;
  color: var(--color-cyan);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 14px;
  border: 3px solid var(--color-cyan);
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--color-cyan);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ========================================
   CARDS
   ======================================== */

.modern-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  border: 1px solid rgba(0, 188, 212, 0.1);
}

.modern-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-cyan);
}

.icon-badge {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-cyan-light) 100%);
  color: white;
  font-size: 3rem;
  box-shadow: var(--shadow-md);
  margin: 0 auto 1.5rem;
  transition: all var(--transition-smooth);
}

.icon-badge:hover {
  transform: rotate(5deg) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.icon-badge.orange {
  background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-light) 100%);
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

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

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

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

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

/* ========================================
   GALLERY
   ======================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.15);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 188, 212, 0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay p {
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* ========================================
   SECTIONS
   ======================================== */

section {
  padding: 6rem 0;
}

.section-title {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 1.5rem;
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 4rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: linear-gradient(180deg, var(--color-bg-gray) 0%, rgba(208, 240, 248, 0.8) 100%);
  border-top: 3px solid rgba(0, 188, 212, 0.4);
  box-shadow:
    0 -2px 8px rgba(0, 188, 212, 0.12),
    0 -4px 20px rgba(0, 188, 212, 0.08);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
}

.footer-links a:hover {
  color: var(--color-cyan);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: white;
  color: var(--color-cyan);
  font-size: 1.5rem;
  border: 2px solid rgba(0, 188, 212, 0.2);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.social-link:hover {
  background: var(--color-cyan);
  color: white;
  border-color: var(--color-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-link.orange {
  color: var(--color-orange);
  border-color: rgba(255, 152, 0, 0.2);
}

.social-link.orange:hover {
  background: var(--color-orange);
  color: white;
  border-color: var(--color-orange);
}

.footer-bottom {
  border-top: 2px solid rgba(0, 188, 212, 0.2);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
}

/* ========================================
   UTILITIES
   ======================================== */

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-6 { margin-bottom: 4rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mt-6 { margin-top: 4rem; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }

  .hero .subtitle {
    font-size: 2rem;
  }

  .hero .description {
    font-size: 1.25rem;
  }

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

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

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Menu mobile fermé par défaut */
  .header .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.2);
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  /* Menu mobile ouvert */
  .header .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
  }

  .header .nav-links li:last-child {
    border-bottom: none;
  }

  .header .nav-links a {
    width: 100%;
    display: block;
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 0;
    box-shadow: none;
  }

  /* Bouton hamburger visible sur mobile */
  .header .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 4rem 0 5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero .subtitle {
    font-size: 1.5rem;
  }

  .hero .description {
    font-size: 1.125rem;
  }

  section {
    padding: 3rem 0;
  }

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .modern-card {
    padding: 1.5rem;
  }

  .icon-badge {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-gray);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-cyan) 0%, var(--color-orange) 100%);
  border-radius: 7px;
  border: 3px solid var(--color-bg-gray);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-cyan-dark) 0%, var(--color-orange-dark) 100%);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ========================================
   DUO AMBASSADEURS - ANIMATIONS INTELLIGENTES
   ======================================== */

.walking-character {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  animation: walk-with-pauses 35s ease-in-out infinite;
  z-index: 5;
  filter: drop-shadow(0 8px 24px rgba(0, 188, 212, 0.5)) drop-shadow(0 0 40px rgba(255, 152, 0, 0.3));
}

/* Animation avec pauses devant chaque objectif */
@keyframes walk-with-pauses {
  0% {
    left: -300px;
  }
  10% {
    left: 5%;
  }
  /* Pause 1 - devant objectif 1 */
  15%, 20% {
    left: 5%;
  }
  30% {
    left: 28%;
  }
  /* Pause 2 - devant objectif 2 */
  35%, 40% {
    left: 28%;
  }
  50% {
    left: 51%;
  }
  /* Pause 3 - devant objectif 3 */
  55%, 60% {
    left: 51%;
  }
  70% {
    left: 74%;
  }
  /* Pause 4 - devant objectif 4 */
  75%, 80% {
    left: 74%;
  }
  90% {
    left: 100%;
  }
  100% {
    left: calc(100% + 300px);
  }
}

/* Animation de léger rebond en marchant */
.walking-character svg {
  animation: walk-bounce 0.6s ease-in-out infinite;
}

@keyframes walk-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ===== ANIMATIONS GARÇON ===== */
.walking-character .boy-character .leg-left {
  transform-origin: 73.5px 98px;
  animation: walk-leg-left 0.6s ease-in-out infinite;
}

.walking-character .boy-character .leg-right {
  transform-origin: 86.5px 98px;
  animation: walk-leg-right 0.6s ease-in-out infinite;
}

/* ===== ANIMATIONS FILLE ===== */
.walking-character .girl-character .leg-left {
  transform-origin: 193.5px 98px;
  animation: walk-leg-left 0.6s ease-in-out infinite;
}

.walking-character .girl-character .leg-right {
  transform-origin: 206.5px 98px;
  animation: walk-leg-right 0.6s ease-in-out infinite;
}

@keyframes walk-leg-left {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-20deg);
  }
}

@keyframes walk-leg-right {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-20deg);
  }
  75% {
    transform: rotate(20deg);
  }
}

/* Animation sac de recyclage qui se balance */
.walking-character .recycling-bag {
  transform-origin: 45px 75px;
  animation: bag-sway 0.6s ease-in-out infinite;
}

@keyframes bag-sway {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

/* Animation arbre qui bouge légèrement */
.walking-character .tree {
  transform-origin: 232px 80px;
  animation: tree-sway 1.2s ease-in-out infinite;
}

@keyframes tree-sway {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-3deg);
  }
}

/* Animation queue de cheval */
.walking-character .girl-character path[d*="Q 195 26"],
.walking-character .girl-character path[d*="Q 205 26"] {
  animation: ponytail-swing 0.8s ease-in-out infinite;
  transform-origin: 200px 21px;
}

@keyframes ponytail-swing {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

/* Animation des mains qui se tiennent - léger balancement */
.walking-character .holding-hands {
  animation: hands-swing 1.5s ease-in-out infinite;
}

@keyframes hands-swing {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Animation bulles de dialogue */
.walking-character .speech-bubbles {
  animation: bubble-float 3s ease-in-out infinite;
}

@keyframes bubble-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Animation des étoiles qui scintillent */
.walking-character .sparkles {
  animation: sparkle-float 4s ease-in-out infinite;
}

@keyframes sparkle-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Animation cœur au-dessus des mains */
.walking-character .holding-hands path[fill="#FF9800"] {
  animation: heart-beat 1.5s ease-in-out infinite;
  transform-origin: 135px 79px;
}

@keyframes heart-beat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Animation cœur dans les étoiles */
.walking-character .sparkles path[d*="M 140 15"] {
  animation: heart-beat-slow 2.5s ease-in-out infinite;
  transform-origin: 133px 22px;
}

@keyframes heart-beat-slow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Responsive - adapter le duo sur mobile */
@media (max-width: 768px) {
  .walking-character {
    bottom: 1rem;
    animation: walk-with-pauses-mobile 30s ease-in-out infinite;
    transform: scale(0.65);
  }

  @keyframes walk-with-pauses-mobile {
    0% {
      left: -250px;
    }
    12% {
      left: 8%;
    }
    17%, 22% {
      left: 8%;
    }
    34% {
      left: 30%;
    }
    39%, 44% {
      left: 30%;
    }
    56% {
      left: 52%;
    }
    61%, 66% {
      left: 52%;
    }
    78% {
      left: 74%;
    }
    83%, 88% {
      left: 74%;
    }
    100% {
      left: calc(100% + 250px);
    }
  }
}
