/* --- IMTBS-TSP Theme pour CAS 7.3 --- */

:root {
    --cas-theme-primary: #006d85;
    --mdc-theme-primary: #006d85;
}

body {
    background-color: #f5f5f5 !important;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

/* 1. Masquer l'interface par défaut de CAS */
header#app-bar,
.mdc-top-app-bar,
aside#app-drawer {
    display: none !important;
}

.mdc-drawer-app-content.mdc-top-app-bar--fixed-adjust {
    padding-top: 50px !important; /* Espace en haut de la page */
    background-color: transparent !important;
}

/* Enlever l'image de fond globale de CAS 7 */
.bgimage {
    background-image: none !important;
}

/* 2. Le conteneur central (englobe Header + Boite de login) */
.imtbs-wrapper {
    width: 100%;
    max-width: 980px; /* La largeur exacte de la boîte de CAS 6 */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* 3. Le Header IMTBS */
.imtbs-header {
    position: relative;
    width: 100%;
    
    /* Ratio de l'image (Largeur / Hauteur). 
       Si l'image fait 980x287, le ratio est 980 / 287 */
    aspect-ratio: 980 / 287; 
    
    background: #ffffff url('/cas/images/fd_header-12064bc12d3ba46f11265b328d7d01d8.png') top center no-repeat;
    
    /* L'image prend 100% de la largeur, et la hauteur s'adapte automatiquement */
    background-size: 100% auto; 
    
    border: 1px solid #9db0bc;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

/* 4. Masquer l'ancienne div du logo puisqu'il est intégré à l'image de fond */
.imtbs-header .logo {
    display: none !important;
}

/* 5. La boîte de connexion (CAS Main) */
#main-content {
    padding: 0 !important;
    margin: 0 auto !important; /* Centrage absolu */
    max-width: 980px !important; /* Exactement la taille du header */
    width: 100% !important;
}

.login-section, .mdc-card {
    background-color: white !important;
    border-radius: 0 0 8px 8px !important; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.1) !important;
    border: 1px solid #9db0bc !important;
    border-top: none !important;
    margin: 0 auto !important; /* Force le centrage de la carte */
    width: 100% !important;
    max-width: 980px !important;
}

/* On force la suppression des marges Bootstrap cachées */
.container-lg, .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

a { color: var(--cas-theme-primary); }
a:hover { color: #008ba8; }

/* Responsive (Mobile) */
@media screen and (max-width: 768px) {
    .imtbs-wrapper {
        max-width: 95%;
    }
    .imtbs-header {
        /* Ratio pour votre image mobile */
        aspect-ratio: 980 / 720; 
        
        /* On charge uniquement l'image adaptée au mobile */
        background: #ffffff url('/cas/images/smallbkgrd-4bfba1c998b1983a50e80960cea4267e.png') top center no-repeat;
        background-size: 100% auto;
    }
}

