@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Young+Serif&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Lexend", sans-serif;
    transition: background-color 0.3s ease, color 0.2s ease;
    overflow-x: hidden;
}

/* ========== THEMES ========== */
body.light {
    --other-color:#FEE2E2;
    --bg-background:#FEE2E2;
    --bg-section-span:#7F1D1D;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --accent: #B91C1C;
    --accent-hover: #1D4ED8;
    --accent-light: #DBEAFE;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 35px -10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --info-card-bg: #F3F4F6;
}

body.dark {
    --other-color:#000000;
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-card: #000000;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --accent: #B91C1C;
    --accent-hover: #60A5FA;
    --accent-light: #1E3A8A;
    --glass-bg: rgba(17, 24, 39, 0.92);
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 20px 35px -10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --info-card-bg: #1E293B;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ========== NAVBAR ========== */
.navbar-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
    padding: 1rem 0;
}

.navbar-brand {
    font-family: "Lexend", sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
}

.navbar span {
    color: var(--accent) !important;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    margin: 0 0.25rem;
}

.nav-link:hover {
    color: var(--accent) !important;
}

.theme-toggle {
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--accent);
    color: white;
}

/* ========== HERO ========== */
.hero-section {
    background-color: var(--other-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
}

.hero-left h5 {
    color: var(--accent);
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem !important;
}

.hero-left h1 {
    font-family: "Lexend", sans-serif;
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-left .highlight {
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.hero-left p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-custom {
    background: var(--accent);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -8px var(--accent);
}

.btn-outline-custom {
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.hero-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    transition: transform 0.4s;
}

.hero-image:hover {
    transform: scale(1.02);
}

/* ========== RESPONSIVE ALIGNEMENT ========== */

/* Style du bouton (rappel/optimisation) */
.theme-toggle {
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ========== SECTIONS ========== */
.section-subtitle {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: inline-block;
}

.section-title {
    font-family: "Lexend", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* ========== SERVICES CARDS ========== */
.service-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-background);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--accent);
}

/* ========== ARTICLES SECTION AVEC BACKGROUND ========== */
.articles-section {
    position: relative;
    background: url('./img/2021-09-12.jpg') center/cover fixed;
    padding: 80px 0;
}

.articles-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    z-index: 1;
}

.articles-section .container {
    position: relative;
    z-index: 2;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 28px;
    border-radius: 50px;
    margin: 0 8px 12px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.article-card {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.article-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.category-badge {
    background: var(--accent);
    color: var(--bg-background);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.articles-section .button{
    color: var(--bg-background) !important;
}

/* ========== PARCOURS : CARDS HORIZONTALES ========== */
#parcours {
    padding: 80px 0;
    background: var(--other-color)
}

.container-swiper {
    position: relative;
    padding: 0 50px; /* Espace pour les flèches */
}

.timeline-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin-bottom: 40px; /* Espace pour la pagination */
}

.timeline-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.timeline-card-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    margin-bottom: 1.5rem;
}

.timeline-card-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-card-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.timeline-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Customisation des flèches Swiper */
.custom-nav {
    color: var(--accent) !important;
}

.custom-nav::after {
    font-size: 1.2rem !important;
    font-weight: bold;
}

/* Pagination */
.swiper-pagination-bullet-active {
    background: var(--accent) !important;
}

/* ========== SKILLS ========== */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-bar-custom {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    transition: width 1s ease;
}

/* ========== TÉMOIGNAGES ========== */
.testimonial-card {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.quote-icon {
    color: var(--accent);
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

/* ========== CTA ========== */
.cta-section {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent) 100%);
    border-radius: 40px;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.cta-section h2{
    font-size: 2rem;
    font-weight: 800;
}

.btn-cta {
    background: white;
    color: var(--accent);
    padding: 12px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ========== NOUVEAU DESIGN CONTACT : CARTE INFOS + FORMULAIRE ========== */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-card {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid var(--border);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-info-header {
    margin-bottom: 2rem;
    text-align: center;
}

.contact-info-header .section-subtitle {
    margin-bottom: 0.5rem;
}

.contact-info-header h3 {
    font-family: "Lexend", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    border-radius: 20px;
    transition: background 0.2s;
}

.contact-info-item:hover {
    background: var(--bg-background);
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-background);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info-text {
    flex: 1;
}

.contact-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.contact-info-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--bg-background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.3rem;
    transition: all 0.2s;
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

.contact-form-card {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid var(--border);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-form-card h3 {
    font-family: "Lexend", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-control-custom {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 16px;
    color: var(--text-primary);
    width: 100%;
    transition: all 0.2s;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-submit {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    width: 100%;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* ========== REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .hero-left h1 { font-size: 2.8rem; }
    .section-title { font-size: 2rem; }
}
@media (max-width: 768px) {
    .hero-left h1 { font-size: 2.2rem; }
    .timeline-card { min-width: 260px; }
    .contact-info-item { padding: 0.5rem; }
}
footer a { color: var(--text-secondary); transition: color 0.2s; text-decoration: none; }
footer a:hover { color: var(--accent); }





/* ========== CORRECTIONS RESPONSIVITÉ GLOBALES ========== */

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 70px;
        padding-bottom: 50px;
    }
    
    .hero-left h1 {
        font-size: 2rem !important;
    }
    
    .hero-left h5 {
        font-size: 0.85rem !important;
    }
    
    .hero-left p {
        font-size: 0.95rem;
    }
    
    .btn-primary-custom, .btn-outline-custom {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: 60px;
    }
    
    .hero-left h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-image {
        max-width: 250px;
    }
}













/* Correction des sections pour éviter les débordements */
section {
    width: 100%;
    overflow-x: hidden;
}



/* Correction des cards sur mobile */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem !important;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
}

/* Correction de la grille d'articles */
@media (max-width: 768px) {
    .articles-section {
        padding: 50px 0;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
        margin: 0 4px 8px;
    }
    
    .article-img {
        height: 180px;
    }
    
    .article-card .p-4 {
        padding: 1rem !important;
    }
}

/* Correction des marges générales */
.row {
    margin-right: 0;
    margin-left: 0;
}

[class*="col-"] {
    padding-right: 15px;
    padding-left: 15px;
}

/* Ajustement des espacements pour mobile */
@media (max-width: 768px) {
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .my-3 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .g-4 {
        --bs-gutter-y: 1rem;
        --bs-gutter-x: 1rem;
    }
    
    .g-5 {
        --bs-gutter-y: 1.5rem;
        --bs-gutter-x: 1.5rem;
    }
}

/* Empêcher tout débordement horizontal */
img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ========== CORRECTIONS RESPONSIVES FUSIONNÉES (MOBILE & TABLETTE) ========== */
@media (max-width: 991px) {
    /* 1. Correction du décalage initial : on pousse le body pour laisser la place à la navbar fixe */
    body {
        padding-top: 70px; /* Ajuste selon la hauteur exacte de ta navbar */
    }

    /* 2. Navbar & Menu */
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }

    .nav-item {
        margin: 0.25rem 0;
    }

    .theme-toggle {
        margin: 1rem auto 0 !important; /* Force le centrage dans le menu mobile */
        display: flex;
    }

    .navbar-collapse {
        justify-content: center;
    }

    /* 3. Section Hero */
    .hero-section {
        /* On réduit le padding-top car le body a déjà un padding-top de 70px */
        padding-top: 40px !important; 
        padding-bottom: 60px;
        min-height: auto; /* Évite les calculs de hauteur complexes au chargement */
        display: block; /* Passe en block pour un meilleur flux sur mobile */
    }
    
    .hero-left {
        text-align: center !important;
        order: 2;
    }
    
    .hero-right {
        order: 1;
        margin-bottom: 2.5rem;
    }

    .hero-left h1 {
        font-size: 2.2rem; /* Taille plus adaptée aux petits écrans */
        line-height: 1.2;
    }
    
    .hero-left p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        justify-content: center !important;
        gap: 0.8rem;
    }
    
    .hero-image {
        max-width: 350px; /* Un peu plus petit pour laisser de l'air */
        margin: 0 auto;
        display: block;
    }
}