/* =========================
   RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Prévenir le débordement horizontal */
.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* =========================
   NAVIGATION
========================= */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #FFD700;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: #FFD700;
}

/* =========================
   BUTTONS
========================= */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

/* =========================
   SERVICE CARDS (FLIP)
========================= */
.service-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    perspective: 1000px;
    height: 350px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-card-back {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    border-radius: 20px;
    transform: rotateY(180deg);
    padding: 1.5rem;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
}

/* =========================
   ACTUALITE CARDS
========================= */
.actualite-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.actualite-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.actualite-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.actualite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.actualite-card:hover .actualite-image img {
    transform: scale(1.1);
}

.actualite-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.actualite-card:hover .actualite-overlay {
    opacity: 1;
}

.actualite-btn {
    background: #FFD700;
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.actualite-btn:hover {
    background: #FFA500;
    transform: scale(1.05);
}

/* =========================
   SOCIAL ICONS
========================= */
.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: #FFD700;
    color: #1a1a1a;
    transform: translateY(-3px) rotate(360deg);
}

/* =========================
   ANIMATIONS
========================= */
@keyframes slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-down {
    animation: slide-down 0.8s ease-out;
}

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

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* =========================
   SWIPER CUSTOMIZATION
========================= */
.hero-section {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-swiper .swiper-wrapper {
    height: 100%;
    position: relative;
}

.hero-swiper .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Assurer que seul le slide actif est visible */
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-swiper .swiper-slide-active {
    opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
    color: #FFD700 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    z-index: 20 !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(255, 215, 0, 0.9) !important;
    color: #1a1a1a !important;
    transform: scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px !important;
    font-weight: bold !important;
}

.swiper-button-prev {
    left: 20px !important;
}

.swiper-button-next {
    right: 20px !important;
}

.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: auto !important;
    pointer-events: none !important;
}

.swiper-pagination {
    bottom: 30px !important;
    z-index: 10 !important;
    position: absolute !important;
}

.swiper-pagination-bullet {
    background: #FFD700 !important;
    opacity: 0.5 !important;
    width: 12px !important;
    height: 12px !important;
    margin: 0 6px !important;
    transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    transform: scale(1.5);
    background: #FFD700 !important;
}

/* Responsive Swiper */
@media (max-width: 768px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 40px !important;
        height: 40px !important;
    }
    
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px !important;
    }
    
    .swiper-button-prev {
        left: 10px !important;
    }
    
    .swiper-button-next {
        right: 10px !important;
    }
    
    .swiper-pagination {
        bottom: 20px !important;
    }
    
    .swiper-pagination-bullet {
        width: 8px !important;
        height: 8px !important;
        margin: 0 4px !important;
    }
}

/* =========================
   LOADING SPINNER
========================= */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FFD700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   PARALLAX EFFECT
========================= */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* =========================
   GRADIENT TEXT
========================= */
.gradient-text {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================
   HOVER EFFECTS
========================= */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* =========================
   GLOWING BORDER
========================= */
.glow-border {
    position: relative;
    border-radius: 20px;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-border:hover::before {
    opacity: 1;
    animation: rotate-border 4s linear infinite;
}

@keyframes rotate-border {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* =========================
   SCROLL TO TOP
========================= */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .service-card {
        height: auto;
    }
    
    .service-card:hover .service-card-inner {
        transform: none;
    }
    
    .service-card-back {
        position: relative;
        transform: none;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .actualite-image {
        height: 200px;
    }
}

/* =========================
   CUSTOM SCROLLBAR
========================= */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

/* =========================
   PRINT STYLES
========================= */
@media print {
    .no-print {
        display: none !important;
    }
}