/* ==========================================================================
   SAFIR - AGENCE DE VOYAGES ET DE TOURISME - CSS AMÉLIORÉ
   Adapté d'après le design du flyer officiel
   ========================================================================== */

:root {
    /* Couleurs principales du flyer SAFIR */
    --safir-red: #C41E3A;           /* Rouge principal du logo SAFIR */
    --safir-orange: #E67E22;        /* Orange principal des vagues */
    --safir-yellow: #F39C12;        /* Jaune/orange clair des vagues */
    --safir-dark-orange: #D35400;   /* Orange plus foncé */
    --safir-footer-red: #A93226;    /* Rouge du pied de page du flyer */
    --safir-navy: #2C3E50;          /* Bleu marine pour contraste */
    --safir-white: #FFFFFF;
    --safir-light-gray: #F8F9FA;
    --safir-text-dark: #2C3E50;
    --safir-text-light: #5D6D7E;
    
    /* Gradients inspirés du flyer */
    --safir-gradient-main: linear-gradient(135deg, var(--safir-orange) 0%, var(--safir-yellow) 50%, var(--safir-dark-orange) 100%);
    --safir-gradient-hero: linear-gradient(120deg, var(--safir-red) 0%, var(--safir-orange) 40%, var(--safir-yellow) 100%);
    --safir-wave-gradient: linear-gradient(45deg, var(--safir-orange), var(--safir-yellow), var(--safir-dark-orange));
}

/* ==========================================================================
   STYLES GÉNÉRAUX
   ========================================================================== */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--safir-text-light);
    background-color: var(--safir-white);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Smooth scrolling for all anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--safir-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--safir-orange);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--safir-red);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
    color: var(--safir-text-dark);
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--safir-red);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--safir-orange);
    transform: translateY(-1px);
}

/* ==========================================================================
   NAVBAR - LOGO SAFIR ADAPTÉ
   ========================================================================== */
.navbar {
    background-color: var(--safir-white) !important;
    border-bottom: 3px solid var(--safir-yellow);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--safir-wave-gradient);
    opacity: 0.05;
    z-index: -1;
}

.navbar-brand {
    color: var(--safir-red) !important;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.navbar-brand .safir-logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--safir-red);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 2px;
    margin-bottom: -5px;
}

.navbar-brand .safir-subtitle {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--safir-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-top: 2px;
}

.navbar-brand .safir-subtitle-en {
    font-size: 0.5rem;
    color: var(--safir-text-light);
    font-weight: 500;
    font-style: italic;
}

/* Icône d'avion dans le navbar */
.navbar-brand::before {
    content: '✈';
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%) rotate(-25deg);
    font-size: 1.5rem;
    color: var(--safir-orange);
    animation: plane-float 3s ease-in-out infinite;
}

@keyframes plane-float {
    0%, 100% { transform: translateY(-50%) rotate(-25deg) translateX(0); }
    50% { transform: translateY(-60%) rotate(-25deg) translateX(5px); }
}

.navbar-nav .nav-link {
    color: var(--safir-text-dark) !important;
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--safir-white) !important;
    background: var(--safir-gradient-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ==========================================================================
   HERO SECTION - INSPIRÉ DU FLYER
   ========================================================================== */
#hero {
    background: var(--safir-gradient-hero);
    color: var(--safir-white);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

/* Vagues animées comme dans le flyer */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0V40C100,80 200,20 300,40C400,60 500,0 600,20C700,40 800,0 900,20C1000,40 1100,20 1200,40V0Z' fill='%23F39C12' fill-opacity='0.3'/%3E%3C/svg%3E") repeat-x;
    animation: wave-move 20s linear infinite;
    z-index: 1;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,120V80C100,40 200,100 300,80C400,60 500,120 600,100C700,80 800,120 900,100C1000,80 1100,100 1200,80V120Z' fill='%23E67E22' fill-opacity='0.2'/%3E%3C/svg%3E") repeat-x;
    animation: wave-move 15s linear infinite reverse;
    z-index: 1;
}

@keyframes wave-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    color: var(--safir-white);
    font-size: 3.5rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    margin-bottom: 1.5rem;
    font-weight: 900;
}

#hero .hero-subtitle {
    font-size: 1.3rem;
    color: var(--safir-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    margin-bottom: 2rem;
    font-weight: 300;
}

#hero .hero-priority {
    background: rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

/* Avion hero */
.hero-plane {
    position: absolute;
    top: 50px;
    right: 100px;
    width: 180px;
    height: auto;
    transform: rotate(-15deg);
    animation: plane-fly 6s ease-in-out infinite;
    z-index: 3;
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.3));
}

@keyframes plane-fly {
    0%, 100% { transform: rotate(-15deg) translateY(0) translateX(0); }
    25% { transform: rotate(-10deg) translateY(-10px) translateX(10px); }
    50% { transform: rotate(-20deg) translateY(0) translateX(20px); }
    75% { transform: rotate(-15deg) translateY(10px) translateX(10px); }
}

/* ==========================================================================
   SERVICES - STYLE LISTE AMÉLIORÉ
   ========================================================================== */
.services-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--safir-light-gray) 0%, var(--safir-white) 100%);
}

.list-group-item {
    border: none;
    border-left: 4px solid var(--safir-yellow);
    margin-bottom: 0.5rem;
    padding: 1.2rem 1.5rem;
    background: var(--safir-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.list-group-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-left-color: var(--safir-orange);
}

.list-group-item i.bi-circle-fill {
    color: var(--safir-orange);
    font-size: 0.8em;
    margin-right: 0.8rem;
}

.list-group-item span {
    font-weight: 600;
    color: var(--safir-text-dark);
    font-size: 1.1rem;
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.btn-light {
    background: var(--safir-white);
    color: var(--safir-red);
    border: 2px solid var(--safir-red);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-light:hover {
    background: var(--safir-gradient-main);
    color: var(--safir-white);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--safir-gradient-main);
    border: none;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--safir-gradient-hero);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

/* Loading state for buttons */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Ripple effect for buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ==========================================================================
   FOOTER - STYLE FLYER
   ========================================================================== */
footer {
    background: var(--safir-footer-red);
    color: var(--safir-white);
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--safir-wave-gradient);
}

footer .container {
    position: relative;
    z-index: 2;
}

footer h5 {
    color: var(--safir-yellow);
    font-weight: 800;
    margin-bottom: 1rem;
}

footer p {
    margin: 0.5rem 0;
    line-height: 1.8;
}

footer a {
    color: var(--safir-yellow);
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--safir-white);
    text-shadow: 0 0 8px var(--safir-yellow);
}

.footer-contact {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.8rem;
    }
    
    .navbar-brand .safir-logo {
        font-size: 2rem;
    }
    
    .navbar-brand::before {
        left: -25px;
        font-size: 1.2rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-plane {
        width: 120px;
        right: 20px;
        top: 30px;
    }

    .list-group-item {
        padding: 1rem;
    }

    .list-group-item span {
        font-size: 1rem !important;
    }

    footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .btn-light, .btn-primary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand .safir-logo {
        font-size: 1.7rem;
    }
    
    .navbar-brand .safir-subtitle {
        font-size: 0.5rem;
    }
    
    #hero {
        padding: 80px 0 60px;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    .hero-plane {
        width: 80px;
        right: 10px;
    }
}

/* ==========================================================================
   FORMULAIRES ET UX
   ========================================================================== */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--safir-orange);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
    background-color: #fff;
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #198754;
}

.form-label {
    font-weight: 600;
    color: var(--safir-text-dark);
    margin-bottom: 0.75rem;
}

/* Input floating labels */
.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: var(--safir-text-light);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Alert messages */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0a3622;
    border-left: 4px solid #198754;
}

.alert-danger {
    background-color: #f8d7da;
    color: #58151c;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
}

.toast {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-success {
    background-color: #d1e7dd;
    color: #0a3622;
}

.toast-error {
    background-color: #f8d7da;
    color: #58151c;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--safir-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

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

.service-card .card-icon {
    font-size: 3rem;
    color: var(--safir-orange);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .card-icon {
    transform: scale(1.1);
    color: var(--safir-red);
}

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

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

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

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

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

/* Bootstrap overrides pour corriger les backgrounds */
.navbar-light {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--safir-text-dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: var(--safir-orange) !important;
}

.navbar-light .navbar-nav .dropdown-menu {
    background-color: #ffffff !important;
}

.navbar-light .navbar-toggler {
    border-color: var(--safir-orange) !important;
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Force background colors */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #ffffff !important;
}

/* Accessibility - Skip link */
.visually-hidden-focusable {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.visually-hidden-focusable:focus {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: var(--safir-red) !important;
    color: white !important;
    text-decoration: none !important;
    z-index: 10000 !important;
    border-radius: 0 0 0.5rem 0 !important;
}

/* Barre d'informations en haut */
.top-info-bar {
    background: var(--safir-light-gray) !important;
    background-color: #f8f9fa !important;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid #dee2e6 !important;
    font-size: 0.85rem !important;
}

.top-info-bar a {
    color: var(--safir-text-dark) !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
}

.top-info-bar a:hover {
    color: var(--safir-red) !important;
    text-decoration: none !important;
}

.top-info-bar small {
    color: var(--safir-text-light) !important;
}

/* Navbar fixe */
.navbar.fixed-top {
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98) !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.navbar.fixed-top.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

/* Espaceur pour navbar fixe */
.navbar-spacer {
    height: 140px; /* Ajustez selon la hauteur de votre navbar + top-info-bar */
}

/* Améliorations du logo navbar */
.navbar-brand {
    padding: 0.5rem 0;
    margin-right: 2rem;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

/* Menu dropdown amélioré */
.dropdown-menu {
    border: none !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98) !important;
    background-color: #ffffff !important;
}

.dropdown-item {
    padding: 0.75rem 1.5rem !important;
    font-weight: 500 !important;
    color: var(--safir-text-dark) !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    background-color: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--safir-gradient-main) !important;
    background-color: var(--safir-orange) !important;
    color: var(--safir-white) !important;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    color: var(--safir-orange) !important;
}

.dropdown-item:hover i,
.dropdown-item:focus i {
    color: var(--safir-white) !important;
}

/* Bouton CTA dans navbar */
.nav-cta {
    padding: 0.5rem 1.5rem !important;
    margin-left: 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

/* Contact info mobile */
.navbar-contact {
    border-top: 1px solid #dee2e6 !important;
    padding-top: 1rem !important;
    margin-top: 1rem !important;
    background-color: transparent !important;
}

.navbar-contact .btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    background-color: transparent !important;
    border: 1px solid var(--safir-orange) !important;
    color: var(--safir-orange) !important;
}

.navbar-contact .btn:hover {
    background-color: var(--safir-orange) !important;
    color: white !important;
}

/* Navigation links */
.navbar-nav .nav-link {
    color: var(--safir-text-dark) !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--safir-orange) !important;
}

.navbar-nav .nav-link.active {
    color: var(--safir-red) !important;
}

/* Navbar collapse */
.navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 0.5rem !important;
    padding: 1rem !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    }
}

/* Améliorations des icônes de navigation */
.nav-link i {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Animation du toggler mobile */
.navbar-toggler {
    border: 2px solid var(--safir-orange);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
    border-color: var(--safir-red);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23E67E22' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* États actifs */
.nav-link.active,
.nav-link[aria-current="page"] {
    color: var(--safir-red) !important;
    font-weight: 700;
    position: relative;
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--safir-orange);
    border-radius: 50%;
}

/* Animations d'entrée */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar.fixed-top {
    animation: slideInDown 0.5s ease-out;
}

/* Responsive amélioré */
@media (max-width: 991.98px) {
    .navbar-spacer {
        height: 80px;
    }
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        margin: 1rem -1rem -1rem;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        backdrop-filter: blur(10px);
    }
}
/* Style pour les cartes de service */
.service-card {
    border: 1px solid #dee2e6;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: var(--safir-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--safir-orange);
}

.service-card .card-body {
    padding: 2rem;
}

.service-card .card-icon {
    font-size: 3rem;
    color: var(--safir-orange);
    margin-bottom: 1rem;
    display: inline-block;
    background: var(--safir-gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--safir-text-dark);
}

.service-card .card-text {
    color: var(--safir-text-light);
    font-size: 0.95rem;
}

.service-card .btn {
    background: var(--safir-gradient-main);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.service-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}
    
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin: 0.25rem 0;
        font-weight: 600;
    }
    
    .nav-link:hover {
        background: var(--safir-light-gray);
        transform: translateX(5px);
    }
    
    .nav-cta {
        margin: 1rem 0 0 0 !important;
        text-align: center;
        display: block;
    }
    
    .dropdown-menu {
        box-shadow: none;
        border: 1px solid #dee2e6;
        margin: 0.5rem 0;
        background: var(--safir-light-gray);
    }


@media (max-width: 575.98px) {
    .navbar-brand {
        margin-right: 1rem;
    }
    
    .navbar-spacer {
        height: 70px;
    }
    
    .top-info-bar {
        display: none !important;
    }
}

/* Optimisations de performance */
.navbar {
    will-change: transform, background-color;
}

.nav-link,
.dropdown-item,
.btn {
    will-change: transform;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .top-info-bar {
        background: #1a1a1a;
        color: #e0e0e0;
        border-bottom-color: #333;
    }
    
    .navbar.fixed-top.scrolled {
        background-color: rgba(26, 26, 26, 0.95) !important;
    }
    
    .dropdown-menu {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .navbar-collapse {
        background: rgba(26, 26, 26, 0.98);
    }
}

/* ==========================================================================
   GALLERY PAGE - ADDITIONAL CSS
   ========================================================================== */

/* Gallery Hero Section */
#gallery-hero {
    background: var(--safir-gradient-hero);
    color: var(--safir-white);
    position: relative;
    overflow: hidden;
}

#gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0V40C100,80 200,20 300,40C400,60 500,0 600,20C700,40 800,0 900,20C1000,40 1100,20 1200,40V0Z' fill='%23F39C12' fill-opacity='0.2'/%3E%3C/svg%3E") repeat-x;
    animation: wave-move 25s linear infinite;
    z-index: 1;
}

#gallery-hero .container {
    position: relative;
    z-index: 2;
}

/* Gallery Statistics */
.gallery-stats {
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-item i {
    font-size: 2rem;
    color: var(--safir-yellow);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-item strong {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--safir-white);
    display: block;
}

.stat-item span {
    font-size: 0.9rem;
    color: var(--safir-white);
    opacity: 0.9;
}

/* Gallery Filters */
.gallery-filters {
    background: var(--safir-white);
    padding: 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 0 1rem;
}

.gallery-filters .nav-link {
    color: var(--safir-text-dark);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.gallery-filters .nav-link:hover {
    color: var(--safir-orange);
    background: var(--safir-light-gray);
    transform: translateY(-2px);
}

.gallery-filters .nav-link.active {
    background: var(--safir-gradient-main);
    color: var(--safir-white);
    border-color: var(--safir-orange);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    margin-top: 2rem;
}

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: var(--safir-white);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.8), rgba(230, 126, 34, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.gallery-btn {
    background: var(--safir-white);
    color: var(--safir-red);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-btn:hover {
    background: var(--safir-yellow);
    color: var(--safir-white);
    transform: scale(1.1);
}

.gallery-info {
    text-align: center;
    color: var(--safir-white);
}

.gallery-info h5 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--safir-white);
}

.gallery-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* Image Modal */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: var(--safir-gradient-main);
    color: var(--safir-white);
    border-radius: 20px 20px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-body img {
    border-radius: 15px;
    max-height: 500px;
    object-fit: cover;
}

/* Load More Button */
#loadMoreBtn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}

/* Filter Animation */
.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Masonry Effect for Different Heights */
.gallery-item:nth-child(3n+1) .gallery-image {
    height: 280px;
}

.gallery-item:nth-child(3n+2) .gallery-image {
    height: 320px;
}

.gallery-item:nth-child(3n+3) .gallery-image {
    height: 300px;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 3rem;
    color: var(--safir-text-light);
}

.gallery-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--safir-orange);
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--safir-text-light);
}

.gallery-empty i {
    font-size: 4rem;
    color: var(--safir-orange);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-filters {
        flex-direction: column;
        margin: 0 0.5rem;
        padding: 0.5rem;
    }
    
    .gallery-filters .nav-link {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .gallery-image {
        height: 250px;
    }
    
    .gallery-item:nth-child(3n+1) .gallery-image,
    .gallery-item:nth-child(3n+2) .gallery-image,
    .gallery-item:nth-child(3n+3) .gallery-image {
        height: 250px;
    }
    
    .stat-item {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
    
    .stat-item i {
        font-size: 1.5rem;
    }
    
    .stat-item strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .gallery-filters {
        margin: 0;
        border-radius: 15px;
    }
    
    .gallery-filters .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery-card {
        border-radius: 15px;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-item:nth-child(3n+1) .gallery-image,
    .gallery-item:nth-child(3n+2) .gallery-image,
    .gallery-item:nth-child(3n+3) .gallery-image {
        height: 200px;
    }
    
    .gallery-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .modal-body img {
        max-height: 300px;
    }
}

/* Accessibility Improvements */
.gallery-btn:focus {
    outline: 2px solid var(--safir-yellow);
    outline-offset: 2px;
}

.gallery-filters .nav-link:focus {
    outline: 2px solid var(--safir-orange);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .gallery-filters,
    .gallery-overlay,
    .modal,
    #loadMoreBtn {
        display: none !important;
    }
    
    .gallery-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Service Page Specific Styles */
.hero-section {
    padding: 100px 0;
    background-size: cover !important;
    background-position: center !important;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white; /* Ensure hero text is white */
}

.hero-section p {
    font-size: 1.5rem;
    font-weight: 300;
}

.service-icon {
    font-size: 3.5rem;
    color: var(--safir-orange);
    /* Optional: Add a subtle gradient or shadow to icons */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.card-title {
    color: var(--safir-text-dark);
}

.card-text {
    color: var(--safir-text-light);
}
