/* ===================================================
   COEX-IT - STYLE GLOBAL
   =================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    min-height:100%;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#FFFFFF;
    color:#003C78;
}


/* ===================================================
   PAGE D'ACCUEIL
   =================================================== */

.home-page{
    min-height:100vh;
    background:#FFFFFF;
    position:relative;
}

/* Barre du haut */

.topbar{
    width:100%;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    padding:25px 40px;
    position:absolute;
    top:0;
    left:0;
    z-index:10;
}

/* Bouton équipe */

.team-button{
    text-decoration:none;
    background:#0078D4;
    color:#FFFFFF;
    padding:14px 24px;
    border-radius:10px;
    font-weight:bold;
    transition:0.25s;
}

.team-button:hover{
    background:#005A9E;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,120,212,0.25);
}

/* Conteneur principal */

.home-container{
    width:100%;
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:100px 40px 40px;
}

/* Bloc logo + textes */

.home-content{
    width:650px;
    max-width:80%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}

/* Grand logo */

.home-logo{
    width:100%;
    max-width:100%;
    height:auto;
    display:block;
}

/* Titre sous le logo */

.home-title{
    width:100%;
    margin:20px 0 0 0;
    padding:0;
    text-align:center;
    font-size:32px;
    line-height:1.2;
    font-weight:600;
    color:#003C78;
}

/* Sous-titre */

.home-subtitle{
    width:100%;
    margin:4px 0 0 0;
    padding:0;
    text-align:center;
    font-size:16px;
    line-height:1.5;
    color:#003C78;
}


/* ===================================================
   PAGE DE CONNEXION COEX-IT
   =================================================== */

.login-body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#F7FBFF 0%,#E8F2FC 100%);
    position:relative;
    padding:40px 20px;
}

.back-home{
    position:absolute;
    top:25px;
    left:35px;
    color:#003C78;
    text-decoration:none;
    font-weight:bold;
}

.back-home:hover{
    color:#0078D4;
}

.login-card{
    width:420px;
    max-width:90%;
    background:#FFFFFF;
    padding:45px;
    border-radius:20px;
    box-shadow:0 15px 40px rgba(0,60,120,.12);
    text-align:center;
}

.login-logo{
    width:220px;
    max-width:80%;
    height:auto;
    margin-bottom:25px;
}

.login-card h1{
    color:#003C78;
    margin-bottom:10px;
    font-size:28px;
}

.login-subtitle{
    color:#666666;
    margin-bottom:30px;
}

.login-card label{
    display:block;
    text-align:left;
    margin:15px 0 6px;
    color:#003C78;
    font-weight:bold;
}

.login-card input{
    width:100%;
    padding:14px;
    border:1px solid #D7E3F3;
    border-radius:10px;
    font-size:16px;
    background:#FFFFFF;
}

.login-card input:focus{
    outline:none;
    border-color:#0078D4;
    box-shadow:0 0 0 3px rgba(0,120,212,.15);
}

.login-card button{
    width:100%;
    padding:14px;
    margin-top:25px;
    background:#0078D4;
    color:#FFFFFF;
    border:none;
    border-radius:10px;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.login-card button:hover{
    background:#005A9E;
}

.login-error{
    background:#FFE8E8;
    color:#C62828;
    padding:12px;
    border-radius:8px;
    margin-bottom:20px;
}

.login-footer{
    margin-top:25px;
    color:#888888;
    font-size:13px;
}


/* ===================================================
   PORTAIL COEX-IT
   =================================================== */

.portal-page{
    background:#F5F8FC;
    min-height:100vh;
}

/* Bandeau supérieur */

.portal-header{
    background:#FFFFFF;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 40px;
    box-shadow:0 2px 15px rgba(0,0,0,0.08);
}

.header-left{
    display:flex;
    align-items:center;
    gap:20px;
}

.header-logo{
    width:70px;
    height:auto;
}

.portal-header h1{
    color:#003C78;
    font-size:28px;
    margin:0;
}

.portal-header p{
    color:#6B7280;
    margin-top:4px;
}

/* Partie droite */

.header-right{
    display:flex;
    align-items:center;
    gap:20px;
}

.user-name{
    font-weight:bold;
    color:#003C78;
}

.logout-button{
    background:#D32F2F;
    color:#FFFFFF;
    text-decoration:none;
    padding:10px 18px;
    border-radius:8px;
    font-weight:bold;
    transition:.2s;
}

.logout-button:hover{
    background:#B71C1C;
}

/* Cartes */

.portal-container{
    max-width:1200px;
    margin:60px auto;
    padding:0 30px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:30px;
}

.portal-card{
    background:#FFFFFF;
    border-radius:18px;
    padding:30px;
    text-align:center;
    text-decoration:none;
    color:#003C78;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:.25s;
}

.portal-card:hover{
    transform:translateY(-6px);
    box-shadow:0 18px 35px rgba(0,120,212,.18);
}

.portal-card img{
    width:180px;
    height:180px;
    object-fit:contain;
    margin-bottom:20px;
}

.portal-card h2{
    color:#0078D4;
    margin-bottom:10px;
}

.portal-card p{
    color:#666666;
    line-height:1.5;
    font-size:15px;
}

/* Pied de page */

.portal-footer{
    text-align:center;
    color:#8A8A8A;
    padding:40px 20px;
    font-size:14px;
}


/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width:768px){

    /* Accueil */

    .topbar{
        justify-content:center;
        padding:20px;
        position:relative;
    }

    .home-container{
        min-height:calc(100vh - 80px);
        padding:40px 20px;
    }

    .home-content{
        width:100%;
        max-width:90%;
    }

    .home-logo{
        width:320px;
        max-width:100%;
    }

    .home-title{
        font-size:25px;
        margin-top:18px;
    }

    .home-subtitle{
        font-size:15px;
        line-height:1.6;
    }


    /* Connexion */

    .login-body{
        padding:80px 20px 40px;
    }

    .back-home{
        top:20px;
        left:20px;
    }

    .login-card{
        width:100%;
        max-width:420px;
        padding:35px 25px;
    }


    /* Portail */

    .portal-header{
        flex-direction:column;
        gap:20px;
        text-align:center;
        padding:25px;
    }

    .header-left{
        flex-direction:column;
    }

    .header-right{
        flex-direction:column;
        gap:10px;
    }

    .portal-container{
        grid-template-columns:1fr;
        padding:20px;
        margin-top:30px;
    }

    .portal-card img{
        width:160px;
        height:160px;
    }

}

/* Connexion Microsoft 365 */

.microsoft-login-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin: 20px 0;
    background: #0078D4;
    color: #FFFFFF;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.2s;
}

.microsoft-login-button:hover {
    background: #005A9E;
    transform: translateY(-1px);
}

.login-separator {
    display: flex;
    align-items: center;
    margin: 22px 0;
    color: #777;
}

.login-separator::before,
.login-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #DDD;
}

.login-separator span {
    padding: 0 12px;
}
