/* =========================================== */
/* STYLE COMPLET - واحة التسيير - El Messiri */
/* Version adaptée à votre HTML exact */
/* =========================================== */

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

:root {
    /* Couleurs principales */
    --primary-blue: #1e3a8a;
    --secondary-blue: #0ea5e9;
    --light-blue: #e0f2fe;
    --dark-blue: #1e293b;
    
    /* Couleurs neutres */
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    
    /* Couleurs d'accent */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Police */
    --font-main: 'El Messiri', sans-serif;
    --font-backup: 'El Messiri', El Messiri, Geneva, Verdana, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main), var(--font-backup);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.6;
    color: var(--dark-blue);
    background-color: var(--white);
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== TYPOGRAPHIE ====== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main), var(--font-backup);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

h1 { 
    font-size: 2.2rem; 
    margin-bottom: 1.5rem;
}

h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--secondary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-blue);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* ====== NAVBAR CORRIGÉE ====== */
.navbar {
    background-color: var(--primary-blue);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(192, 192,192, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse; /* Logo à GAUCHE, menu à DROITE */
}

/* Logo à GAUCHE avec image et hover */
.logo {
    font-family: var(--font-main), var(--font-backup);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all var(--transition-normal);
    text-decoration: none;
	text-align: center;
    line-height: 1.3;
}

.logo:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.logo span {
	font-size: 1.3rem;
    color: var(--white);
    transition: color var(--transition-normal);
}

.logo:hover span {
    color: var(--secondary-blue);
}
/* Image du logo */
.logo-img {
    height: 40px;  /* Hauteur fixe */
    width: auto;   /* Largeur automatique selon proportions */
    max-width: 150px;  /* Limite la largeur */
    object-fit: contain;
    border-radius: 3px;
    border: 2px solid var(--secondary-blue);
}

.logo:hover .logo-img {
    border-color: var(--white);
    transform: rotate(5deg);
}

/* Menu à DROITE */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-main), var(--font-backup);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-blue);
}

.nav-link.active {
    background-color: var(--secondary-blue);
    color: var(--white);
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Responsive navbar */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background-color: var(--primary-blue);
        width: 100%;
        text-align: center;
        transition: right 0.3s ease;
        padding: 2rem 0;
        gap: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 90%;
        justify-content: center;
        margin: 0 auto;
    }
    
    /* Sur mobile, remettre l'ordre normal */
    .navbar .container {
        flex-direction: row;
    }
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ====== SECTION ACCUEIL ====== */
#accueil {
    display: block !important;
}
#accueil h1 {
    text-align: center;
    margin-bottom: 2rem;
}

#accueil > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 3rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 10px;
    transition: transform var(--transition-normal);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

/* Intro text */
.intro-text {
    background: linear-gradient(135deg, var(--light-blue) 0%, rgba(224, 242, 254, 0.5) 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 3rem;
}

.intro-text h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.services-list {
    list-style: none;
    margin-top: 1.5rem;
}

.services-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.services-list i {
    color: var(--success);
}

/* ====== SECTION NOUS ====== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.values-list {
    list-style: none;
    margin-top: 1rem;
}

.values-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.values-list i {
    color: var(--success);
}

.team-placeholder {
    text-align: center;
    padding: 3rem;
    background: var(--light-gray);
    border-radius: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.team-placeholder i {
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.team-text {
    font-weight: 500;
    color: var(--primary-blue);
}

/* Achievements */
.achievements {
    margin-top: 3rem;
}

.achievement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.achievement-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--medium-gray);
}

.achievement-card i {
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.achievement-card h4 {
    color: var(--primary-blue);
    margin: 0.5rem 0;
}

/* ====== SECTION TÉLÉCHARGEMENT ====== */
.software-categories {
    margin-bottom: 3rem;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-btn {
    font-family: var(--font-main), var(--font-backup);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.category-btn:hover,
.category-btn.active {
    background: var(--secondary-blue);
    color: var(--white);
    border-color: var(--secondary-blue);
}

/* Cartes téléchargement */
.downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    display: flex;
    gap: 1.5rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--medium-gray);
    transition: transform var(--transition-normal);
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.download-icon {
    flex-shrink: 0;
}

.download-icon i {
    color: var(--secondary-blue);
}

.download-info {
    flex-grow: 1;
}

.download-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.version {
    color: var(--dark-gray);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.description {
    color: var(--dark-blue);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.file-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.file-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Bouton téléchargement */
.btn-download {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: var(--white);
    font-family: var(--font-main), var(--font-backup);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.6s ease;
    z-index: -1;
}

.btn-download:hover::before {
    width: 100%;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}
/* Info cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.info-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 10px;
}

.info-card i {
    font-size: 2rem;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.info-card h4 {
    margin-bottom: 0.5rem;
}

/* ====== SECTION CONTACT ====== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3 {
    color: var(--primary-blue);
    margin: 1.5rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.emergency-contact {
    background: #fee2e2;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--danger);
}

.emergency-contact h4 {
    color: var(--danger);
    margin-bottom: 0.5rem;
}

/* Formulaire contact */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-family: var(--font-main), var(--font-backup);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: var(--white);
    font-family: var(--font-main), var(--font-backup);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.3);
}

/* FAQ */
.faq-section {
    margin-top: 3rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem;
    background: var(--light-gray);
    border: none;
    text-align: right;
    font-family: var(--font-main), var(--font-backup);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 1rem;
    background: var(--white);
    display: none;
}

.faq-answer.active {
    display: block;
}

/* ====== FOOTER ====== */
footer {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--light-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--white);
}

.programs-list {
    list-style: none;
}

.programs-list li {
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.programs-list i {
    color: #4ade80;
    font-size: 0.8rem;
}

/* Liens sociaux footer */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--white);
    transition: background var(--transition-normal);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.social-btn.facebook:hover { background: #1877f2; }
.social-btn.twitter:hover { background: #1da1f2; }
.social-btn.linkedin:hover { background: #0077b5; }
.social-btn.youtube:hover { background: #ff0000; }

/* Newsletter */
.newsletter-box {
    margin-top: 1.5rem;
}

.newsletter-box h5 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-form {
    display: flex;
    gap: 5px;
}

.newsletter-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 4px;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--secondary-blue);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright, .developed-by {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.team-name {
    color: var(--white);
    font-weight: 500;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .downloads {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .section {
    padding-top: 150px !important;
}

    /* Navbar mobile */
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background-color: var(--primary-blue);
        width: 100%;
        text-align: center;
        transition: right 0.3s ease;
        padding: 2rem 0;
        gap: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 90%;
        justify-content: center;
        margin: 0 auto;
    }
    
    .download-card {
        flex-direction: column;
        text-align: center;
    }
    
    .file-details {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .downloads {
        grid-template-columns: 1fr;
    }
    
    .download-card {
        padding: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
    }
}
/* ====== SIDEBAR DYNAMIQUE ====== */

/* Conteneur principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Variables de taille */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #1a5e1a, #0d3b0d);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow-x: hidden;
}

/* Sidebar réduite */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* En-tête sidebar */
.sidebar-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 100px;
}

.sidebar-logo {
    color: white;
    text-decoration: none;
    font-family: 'El Messiri', sans-serif;
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    gap: 5px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar-logo img.logo-img {
    width: 40px;
    margin: 0 auto;
}

/* Bouton toggle réduire/agrandir */
.sidebar-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.menu-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

/* Menu */
.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
    border-right: 4px solid transparent;
    white-space: nowrap;
}

.sidebar-menu .nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.sidebar-menu .nav-link span {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-menu .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu .nav-link {
    justify-content: center;
    padding: 14px 0;
    gap: 0;
}

.sidebar-menu .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-right-color: #4CAF50;
}

.sidebar-menu .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-right-color: #FFD700;
}

/* Footer sidebar */
.sidebar-footer {
    padding: 15px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-footer {
    opacity: 0;
}

/* Contenu principal */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: margin-right 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-right: var(--sidebar-collapsed);
}

/* Bouton hamburger mobile */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: #1a5e1a;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width) !important;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .menu-close {
        display: block;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar.collapsed .sidebar-logo,
    .sidebar.collapsed .sidebar-menu .nav-link span,
    .sidebar.collapsed .sidebar-footer {
        opacity: 1;
    }
    
    .sidebar.collapsed .sidebar-menu .nav-link {
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 12px;
    }
}
/* ====== SIDEBAR DYNAMIQUE ====== */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
     background: linear-gradient(135deg, #1e6eb8, #15508a);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 100px;
}

.sidebar-logo {
    color: white;
    text-decoration: none;
    font-family: 'El Messiri', sans-serif;
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    gap: 5px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-logo {
    opacity: 0;
    pointer-events: none;
}

.sidebar-logo img.logo-img {
    width: 40px;
    margin: 0 auto;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.menu-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
    border-right: 4px solid transparent;
    white-space: nowrap;
}

.sidebar-menu .nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.sidebar-menu .nav-link span {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-menu .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu .nav-link {
    justify-content: center;
    padding: 14px 0;
    gap: 0;
}

.sidebar-menu .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-right-color: #4CAF50;
}

.sidebar-menu .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-right-color: #FFD700;
}

.sidebar-footer {
    padding: 15px;
    text-align: center;
    font-size: 0.8em;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-footer {
    opacity: 0;
}

.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: margin-right 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-right: var(--sidebar-collapsed);
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: #1a5e1a;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width) !important;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .menu-close {
        display: block;
    }
    
    .main-content {
        margin-right: 0 !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar.collapsed .sidebar-logo,
    .sidebar.collapsed .sidebar-menu .nav-link span,
    .sidebar.collapsed .sidebar-footer {
        opacity: 1;
    }
    
    .sidebar.collapsed .sidebar-menu .nav-link {
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 12px;
    }
}
/* ====== NOUVEAU STYLE POUR LOGOS SÉPARÉS ====== */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0;  /* Pas d'espace entre les éléments */
    margin: 0;
    padding: 0;
}

.logo-text {
    display: inline-block;
    text-decoration: none;
    padding: 5px 5px;  /* Réduit de 10px à 5px */
    color: white;
    font-family: var(--font-main), var(--font-backup);
    font-weight: 700;
    font-size: 1.3rem;
    transition: all var(--transition-normal);
    border-radius: 5px;
    margin: 0;  /* Supprime les marges */
}

.logo-text:hover {
    background-color: darkblue;
    transform: scale(1.05);
}

.logo-text span {
    color: white;
    margin: 0;
    padding: 0;
}

.logo-text:hover span {
    color: var(--secondary-blue);
}

/* Style pour l'image seule */
.logo-img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    border-radius: 3px;
    border: 2px solid var(--secondary-blue);
    transition: all var(--transition-normal);
    display: block;
    margin: 0;  /* Supprime les marges */
    padding: 0;
}

.logo-img:hover {
    border-color: var(--white);
    transform: rotate(5deg);
}