/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
  /* Colors - Orange + Bleu + Blanc */
  --color-orange: #F97316;
  --color-orange-light: #FB923C;
  --color-orange-pale: #FFF7ED;
  --color-orange-soft: #FEF3F0;
  --color-white: #FFFFFF;
  --color-secondary: #4682B4;
  --color-accent-green: #10B981;
  --color-accent-emerald: #059669;
  --color-accent-amber: #F59E0B;
  --color-accent-orange: #F97316;
  --color-accent-purple: #9333EA;
  --color-accent-violet: #7C3AED;
  --color-accent-rose: #E11D48;
  --color-accent-cyan: #06B6D4;
  --color-surface: #FFFFFF;
  --color-surface-light: #F9FAFB;
  --color-surface-lighter: #F3F4F6;
  --color-text-primary: #111827;
  --color-text-secondary: #6B7280;
  --color-border: #E5E7EB;

  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #F97316 0%, #C2410C 100%);
  --gradient-brand: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  --gradient-orange: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  --gradient-purple: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
  --gradient-rose: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  --gradient-cyan: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
  --gradient-ocean: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FDBA74 100%);

  /* Background Gradients */
  --bg-gradient-soft: linear-gradient(135deg, rgba(39, 116, 174, 0.03) 0%, rgba(249, 115, 22, 0.03) 100%);
  --bg-gradient-mesh: radial-gradient(at 0% 0%, rgba(39, 116, 174, 0.1) 0px, transparent 50%),
                       radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.08) 0px, transparent 50%),
                       radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
                       radial-gradient(at 0% 100%, rgba(249, 115, 22, 0.06) 0px, transparent 50%);
  
  /* Fonts */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  
  /* Shadows - Enhanced */
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-glow-primary: 0 0 20px rgba(249, 115, 22, 0.35);
  --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
  
  /* Transitions */
  --transition-base: all 0.3s ease-in-out;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-surface-lighter);
  background-image: var(--bg-gradient-mesh);
  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 20px 20px, rgba(39, 116, 174, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* Utility Classes */
.glass-effect {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-soft);
}

.card-hover {
  transition: var(--transition-smooth);
  position: relative;
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-elevated);
}

.card-hover:hover::before {
  opacity: 1;
}

/* Progress Bar Animation */
.progress-bar {
  transition: width 1s ease-in-out;
}

/* Icon Styles */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-sm {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-xl {
  width: 48px;
  height: 48px;
}

/* Button Animations */
.btn-animate {
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.btn-animate::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-animate:hover::before {
  width: 300px;
  height: 300px;
}

/* Modal Animations */
.modal-backdrop {
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  animation: slideUp 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Loading Animation */
.loading-spinner {
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.125rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.875rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
}

@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }
}

/* Gradient Background Pattern */
.gradient-bg {
  background: linear-gradient(135deg, #F97316 0%, #C2410C 100%);
  position: relative;
  overflow: hidden;
}

.gradient-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.gradient-bg-light {
  background: linear-gradient(135deg, rgba(39, 116, 174, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

/* Gradient Card Backgrounds */
.gradient-card-blue {
  background: linear-gradient(135deg, rgba(39, 116, 174, 0.1) 0%, rgba(45, 104, 196, 0.05) 100%);
}

.gradient-card-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.gradient-card-purple {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.gradient-card-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%);
}

.gradient-card-rose {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, rgba(190, 18, 60, 0.05) 100%);
}

.gradient-card-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(8, 145, 178, 0.05) 100%);
}

/* Dot Pattern Background */
.dot-pattern {
  background-image: radial-gradient(circle, var(--color-border) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Show element */
.show {
  display: block !important;
}

/* =========================================
   Banner Hero Responsive
========================================= */

.banner-hero{
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 5.25rem; /* hauteur header h-20 + pt-20 */
  margin-bottom: 0;
}

.banner-hero .banner-image {
  width: 100%;
  height: 55vh;
  min-height: 320px;
  max-height: 700px;
  margin: 0;
  padding: 0;
}

/* Image bannière */
.banner-image{
  width:100%;
  height:55vh;
  min-height:320px;
  max-height:700px;

  background-image:url("../img/banner.jpeg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;

  animation: bannerZoom 18s ease-in-out infinite alternate;
}

.banner-image > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* ======================
   MOBILE OPTIMISATION
====================== */

@media (max-width:768px){

  .banner-hero {
    margin-top: 5rem; /* ajuster pour header mobile */
  }
  
  .banner-image{
    height: 45vh;          /* un peu plus grand, moins zoom */
    min-height: 260px;     

    background-size: 100% auto; /* moins zoomé */
    background-position:center top;
  }

  .banner-image > img{
    object-position: center top;
  }

}


/* ======================
   TABLETTE
====================== */

@media (min-width:769px) and (max-width:1024px){

  .banner-image{
    height:50vh;
    background-position:center;
  }

}


/* animation douce */
@keyframes bannerZoom{

  0%{
    transform:scale(1);
  }

  100%{
    transform:scale(1.05);
  }

}

/* Mobile optimisation */
@media (max-width:768px){

  .banner-image{
    height:45vh;
    min-height:260px;
    background-position:center top;
  }

  .banner-image > img{
    object-position: center top;
  }

}

/* Tablet */
@media (min-width:768px){

  .banner-image{
    height:60vh;
  }

}

/* Desktop - Image complète non déformée */
@media (min-width:1024px){

  .banner-hero {
    margin-top: 5.25rem;
  }
  
  .banner-image{
    height: 80vh !important;
    min-height: 600px !important;
    background-size: cover !important;
    background-position: center !important;
  }

}

/* Ultra-wide */
@media (min-width:1440px){

  .banner-hero .banner-image {
    height: 110vh !important;
    max-height: 800px !important;
  }

}


/* animation légère premium */
@keyframes bannerZoom{

  0%{
    transform:scale(1);
  }

  100%{
    transform:scale(1.05);
  }

}

/* Simple Mobile Menu */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu:not(.hidden) {
  transform: translateX(0);
}

.hamburger {
  transition: all 0.3s ease;
}

.hamburger.open span {
  background: transparent;
}

.hamburger.open span::before {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.open span::after {
  transform: rotate(-45deg) translate(7px, -7px);
}

.hamburger span::before,
.hamburger span::after {
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  #mobile-menu nav a {
    font-size: 1.25rem;
  }
}

/* Responsive Tables */
@media (max-width: 768px) {
  table {
    font-size: 0.875rem;
  }
  
  table th,
  table td {
    padding: 0.5rem !important;
  }
  
  /* Stack table on very small screens */
  @media (max-width: 640px) {
    .responsive-table {
      display: block;
      overflow-x: auto;
      white-space: nowrap;
    }
  }
}

/* Responsive Cards */
@media (max-width: 640px) {
  .glass-effect {
    padding: 1rem !important;
  }
  
  .card-hover {
    margin-bottom: 1rem;
  }
}

/* Responsive Spacing */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header .container {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Adjust hero section padding for fixed header */
  section.pt-32 {
    padding-top: 10rem !important;
  }

  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Marquee / Ticker Animation */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 28s linear infinite;
  display: flex;
  width: max-content;
}
.animate-marquee:hover { animation-play-state: paused; }

/* PIN digit input */
.pin-digit {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.5rem;
  text-align: center;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  -webkit-text-fill-color: #111827;
  padding: 0;
  border: 2px solid #E5E7EB;
  border-radius: 0.75rem;
  background: #F9FAFB;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}
.pin-digit:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
  outline: none;
  background: #fff;
}
.pin-digit.filled {
  border-color: var(--color-primary);
  background: rgba(39, 116, 174, 0.05);
}

@media (max-width: 420px) {
  .pin-digit {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
  }
}

/* Shimmer Animation for Progress Bars */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Enhanced Table Styles */
table thead {
  background: linear-gradient(135deg, rgba(249, 250, 251, 1) 0%, rgba(243, 244, 246, 1) 100%);
}

table tbody tr {
  transition: all 0.2s ease;
}

table tbody tr:hover {
  background: linear-gradient(135deg, rgba(39, 116, 174, 0.02) 0%, rgba(147, 51, 234, 0.02) 100%);
  transform: scale(1.001);
}

/* Responsive Modals */
@media (max-width: 640px) {
  .modal-content {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
  button,
  a.btn,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
  .grid {
    gap: 1rem !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .grid {
    gap: 1.5rem !important;
  }
}

/* Fix mobile banner-nav gap AND ticker spacing - Reduced gap (v3: 0px tight) */
@media (max-width: 768px) {
  .banner-hero {
    margin: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 5rem !important; /* Reduce gap under fixed nav */
  }
  .banner-image {
    padding: 0 !important; /* No extra space above image */
    margin-top: 0.5rem !important; /* Move banner down slightly on mobile */
    height: auto !important; /* Reduce zoom/crop on mobile */
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
  }
  .banner-image > img {
    height: 100% !important;
    object-position: center !important;
  }
  section.banner-hero + .ticker-wrap,
  .ticker-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
