/* ChAInge - Custom Styles - Charte graphique officielle */

:root {
  /* Couleurs officielles ChAInge */
  --noir-ardoise: #161616;
  --blanc-ivoire: #FFF0DF;
  --indigo-vif: #2d14e1;
  --orange-vif: #f2743d;
  --rose: #b93967;
  --neon-rose: #842ee4;
  
  /* Dégradés officiels ChAInge - Énergie & Dynamisme */
  --gradient-chainge: linear-gradient(135deg, #2d14e1 0%, #842ee4 30%, #b93967 60%, #f2743d 100%);
  --gradient-primary: linear-gradient(135deg, #2d14e1 0%, #842ee4 100%);
  --gradient-accent: linear-gradient(135deg, #b93967 0%, #f2743d 100%);
  --gradient-dark: linear-gradient(135deg, #161616 0%, #2a2a2a 100%);
  --gradient-hero: linear-gradient(135deg, #2d14e1 0%, #842ee4 40%, #b93967 70%, #f2743d 100%);
}

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

body {
  overflow-x: hidden;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

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

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* Gradient Text - Dégradé ChAInge officiel */
.gradient-text {
  background: var(--gradient-chainge);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: var(--gradient-chainge);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Morphism - Noir Ardoise */
.glass {
  background: rgba(255, 240, 223, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 240, 223, 0.2);
}

.glass-dark {
  background: rgba(255, 240, 223, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(22, 22, 22, 0.1);
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

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

/* Button Styles - Dégradé ChAInge officiel */
.btn-primary {
  background: var(--gradient-chainge);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(45, 20, 225, 0.3);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(242, 116, 61, 0.5);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(185, 57, 103, 0.3);
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(242, 116, 61, 0.5);
}

/* Hero Background */
.hero-gradient {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

/* Responsive Improvements */

/* Mobile First - Small devices (320px - 640px) */
@media (max-width: 640px) {
  .btn-primary,
  .btn-accent {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    width: 100%;
    text-align: center;
  }
  
  /* Hero section adjustments */
  .hero-gradient {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
  }
  
  /* Text size adjustments */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  /* Section padding */
  .section-padding {
    padding: 3rem 1rem !important;
  }
  
  /* Cards spacing */
  .hover-lift {
    margin-bottom: 1rem;
  }
  
  /* Form inputs */
  input, textarea, select {
    font-size: 16px !important; /* Prevent zoom on iOS */
  }
}

/* Tablet devices (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .btn-primary,
  .btn-accent {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }
  
  .section-padding {
    padding: 4rem 2rem !important;
  }
  
  h1 {
    font-size: 3rem !important;
  }
  
  h2 {
    font-size: 2.5rem !important;
  }
}

/* Desktop fine-tuning (1025px+) */
@media (min-width: 1025px) {
  .btn-primary,
  .btn-accent {
    padding: 1rem 2rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Section Padding */
.section-padding {
  padding: 6rem 1.5rem;
}

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

/* Scroll Reveal - Hidden initially */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Icon Pulse */
@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.icon-pulse:hover {
  animation: icon-pulse 0.6s ease-in-out;
}

/* Cookie Banner Responsive */
#cookie-banner {
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 640px) {
  #cookie-banner {
    padding: 1rem !important;
  }
  
  #cookie-banner h3 {
    font-size: 1rem !important;
  }
  
  #cookie-banner p {
    font-size: 0.875rem !important;
  }
  
  #cookie-banner button {
    font-size: 0.875rem !important;
    padding: 0.625rem 1rem !important;
  }
}

/* Mobile Menu Improvements */
@media (max-width: 768px) {
  #mobile-menu a {
    padding: 0.75rem;
    display: block;
    border-radius: 0.5rem;
  }
  
  #mobile-menu a:hover {
    background: rgba(255, 240, 223, 0.1);
  }
}

/* Touch-friendly targets */
@media (max-width: 1024px) {
  a, button {
    min-height: 44px; /* iOS minimum touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Grid responsive improvements */
@media (max-width: 768px) {
  .grid {
    gap: 1.5rem !important;
  }
}

/* Legal pages responsive */
.prose {
  max-width: 100%;
}

@media (max-width: 640px) {
  .prose h1 {
    font-size: 2rem !important;
  }
  
  .prose h2 {
    font-size: 1.5rem !important;
  }
  
  .prose ul, .prose ol {
    padding-left: 1.25rem !important;
  }
}
