/* ========== ORGANIGRAMME ESA GROUP ========== */

.organigramme-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.organigramme-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.organigramme-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    border-radius: 2px;
}

.organigramme-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 50px;
    font-weight: 400;
}

/* ========== STRUCTURE HIÉRARCHIQUE ========== */

.hierarchy-level {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.hierarchy-level::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background: #bdc3c7;
}

.hierarchy-level:last-child::after {
    display: none;
}

/* ========== DIRECTION GÉNÉRALE ========== */

.direction-generale {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(44, 62, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.direction-generale::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.direction-generale .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #f39c12;
}

.direction-generale .title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.direction-generale .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ========== ENTITÉS PRINCIPALES ========== */

.entites-principales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.entite-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: max-content;
    border-top: 4px solid;
}

.entite-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.entite-card.esa-audit {
    border-top-color: #3498db;
}

.entite-card.esa-advisory {
    border-top-color: #e74c3c;
}

.entite-card.esa-recrutement {
    border-top-color: #27ae60;
}

.entite-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.entite-icon {
    font-size: 2rem;
    margin-right: 15px;
    padding: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 15px;
    color: white;
}

.esa-audit .entite-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.esa-advisory .entite-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.esa-recrutement .entite-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.entite-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.entite-description {
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ========== SERVICES ========== */

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #34495e;
    transition: color 0.3s ease;
}

.service-item:hover {
    color: #2c3e50;
}

.service-item i {
    margin-right: 10px;
    color: #f39c12;
    font-size: 0.9rem;
}

/* ========== BOUTON DE REDIRECTION ENTITÉ ========== */

.entite-redirect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.entite-redirect-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white;
    text-decoration: none;
}

.entite-redirect-btn i {
    font-size: 0.8rem;
}

.esa-audit .entite-redirect-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.esa-audit .entite-redirect-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.esa-advisory .entite-redirect-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.esa-advisory .entite-redirect-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.esa-recrutement .entite-redirect-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.esa-recrutement .entite-redirect-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}



/* ===== SERVICES COMMUNS SECTION ===== */
.services-communs-section {
    margin: 60px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.services-communs-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60, #3498db);
}

.services-communs-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-communs-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.services-communs-subtitle {
    font-size: 1.4rem;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 20px;
}

.services-communs-description {
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-communs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-commun-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.service-commun-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.service-commun-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-commun-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.service-commun-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.service-commun-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-commun-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.service-commun-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.entites-concernees,
.raison-commune,
.exemples-concrets {
    margin-bottom: 25px;
}

.entites-concernees h5,
.raison-commune h5,
.exemples-concrets h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.entites-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entite-tag {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.raison-text {
    color: #555;
    line-height: 1.5;
    font-style: italic;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.exemples-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exemples-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #f1f2f6;
}

.exemples-list li:last-child {
    border-bottom: none;
}

.exemples-list li i {
    color: #27ae60;
    margin-right: 10px;
    font-size: 0.8rem;
}

/* Section Avantages */
.avantages-section {
    padding-top: 40px;
}

.avantages-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
}

.avantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.avantage-item {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f2f6;
}

.avantage-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.avantage-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.avantage-icon i {
    font-size: 1.2rem;
    color: white;
}

.avantage-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.avantage-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablettes */
@media (max-width: 1024px) {
    .organigramme-container {
        padding: 30px 15px;
    }
    
    .organigramme-title {
        font-size: 2.2rem;
    }
    
    .entites-principales {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .organigramme-container {
        padding: 20px 10px;
    }
    
    .organigramme-title {
        font-size: 1.8rem;
    }
    
    .organigramme-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .direction-generale {
        padding: 20px;
    }
    
    .direction-generale .icon {
        font-size: 2.5rem;
    }
    
    .direction-generale .title {
        font-size: 1.5rem;
    }
    
    .entites-principales {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .entite-card {
        padding: 20px;
    }
    
    .entite-icon {
        font-size: 2rem;
        padding: 12px;            
        padding-top: 5px;
        padding-bottom: 5px;
    }
    
    .entite-title {
        font-size: 1.3rem;
    }
    
    .entite-description {
        font-size: 0.9rem;
    }
    
    .service-item {
        font-size: 0.85rem;
    }
    
    .entite-redirect-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .organigramme-container {
        padding: 15px 8px;
    }
    
    .organigramme-title {
        font-size: 1.5rem;
    }
    
    .organigramme-subtitle {
        font-size: 0.9rem;
    }
    
    .direction-generale {
        padding: 15px;
    }
    
    .direction-generale .icon {
        font-size: 2rem;
    }
    
    .direction-generale .title {
        font-size: 1.3rem;
    }
    
    .direction-generale .subtitle {
        font-size: 0.9rem;
    }
    
    .entite-card {
        padding: 15px;
    }
    
    .entite-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .entite-icon {
        margin-right: 0;
        margin-bottom: 10px;            
        padding-top: 5px;
        padding-bottom: 5px;
    }
    
    .entite-title {
        font-size: 1.2rem;
    }
    
    .entite-description {
        font-size: 0.85rem;
    }
    
    .service-item {
        font-size: 0.8rem;
    }
    
    .entite-redirect-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        gap: 6px;
    }


    /* Services communs responsive */
    .services-communs-section {
        margin: 40px 0;
        padding: 25px;
    }

    .services-communs-title {
        font-size: 2rem;
    }

    .services-communs-subtitle {
        font-size: 1.2rem;
    }

    .services-communs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-commun-card {
        padding: 20px;
    }

    .avantages-title {
        font-size: 1.6rem;
    }

    .avantages-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ========== ANIMATIONS ========== */

.organigramme-container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.entite-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.entite-card:nth-child(1) { animation-delay: 0.1s; }
.entite-card:nth-child(2) { animation-delay: 0.2s; }
.entite-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.departement-card {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}



@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Masquage explicite des titres d'organigramme */
.organigramme-title, .organigramme-subtitle {
  display: none !important;
}