/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* ===== LAYOUT STRUCTURE ===== */
#template_external {
    width: 100%;
    margin: 0 auto;
}

#template_wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* ===== HEADER ===== */
#template_header {
    background: linear-gradient(135deg, #1a2a6c, #2a3a7c, #3a4a8c);
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
}

#template_header img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

.header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.header-content h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 1px;
}

.header-content .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== BREADCRUMB & USER MENU ===== */
#template_link {
    background-color: #fff;
    padding: 12px 30px;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn2 {
    background: linear-gradient(to right, #2a3a7c, #3a4a8c);
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropbtn2:hover {
    background: linear-gradient(to right, #3a4a8c, #4a5a9c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    right: 0;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:hover {
    background-color: #f5f7ff;
    color: #2a3a7c;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ===== MAIN CONTENT AREA ===== */
#template_main {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0; /* Élimine tout petit espace bleu */
    margin: 0;
}

#template_menu {
    width: 250px;
    vertical-align: top;
    background-color: #2a3a7c; /* Fond bleu uniforme */
    border-right: none; /* Supprime la bordure claire */
}

#template_content {
    vertical-align: top;
    padding: 30px;
    background-color: white;
}

/* ===== MENU STYLES ===== */
.menu_v {
    width: 100%;
}

.menu_cartouche,
.sousmenu_cartouche {
    background: linear-gradient(135deg, #2a3a7c, #3a4a8c);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Éléments de menu de niveau 1 */
.menu_niveau_1,
.menu_niveau_1_on {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.menu_niveau_1_on {
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #f5f7ff;
    font-weight: 600;
}

/* Liens du menu niveau 1 */
.menu_niveau_1 a,
.menu_niveau_1_on a {
    text-decoration: none;
    color: white;
    display: block;
    transition: color 0.2s;
}

/* États de survol des liens */
.menu_niveau_1 a:hover,
.menu_niveau_1_on a:hover {
    color: #f5f7ff;
}

.menu_niveau_2 {
    padding: 10px 20px 10px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #324897;
}

/* Liens du menu niveau 2 */
.menu_niveau_2 a {
    text-decoration: none;
    color: #e0e0e0;
    font-size: 0.9em;
    transition: color 0.2s;
}

.menu_niveau_2 a:hover {
    color: white;
}

.sousmenu_dir {
    background-color: #2a3a7c;
}

.menu_dir .fleche {
    float: right;
    transition: transform 0.3s;
}

.menu_dir:hover .fleche {
    transform: rotate(180deg);
}

/* ===== CONTENT ===== */
.widget {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.titre {
    background: linear-gradient(135deg, #2a3a7c, #3a4a8c);
    color: white;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 1.2rem;
}

.widget-content {
    padding: 25px;
    background-color: white;
}

/* ===== FOOTER ===== */
#template_foot {
    background: linear-gradient(135deg, #1a2a6c, #2a3a7c);
    color: white;
    padding: 30px;
    margin-top: 40px;
    text-align: center;
}

#template_foot a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

#template_foot a:hover {
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    #template_main {
        display: block;
    }

    #template_menu,
    #template_content {
        display: block;
        width: 100%;
        padding: 20px;
    }
}