@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Segoe UI', 'Lucida Sans', sans-serif;
    height: 100%;
    margin: 0;
}

/* --- HEADER GLOBAL --- */
.app-header {
    background-color: rgb(0, 120, 220); /* BLEU KM */
    color: white;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* Logo */
.app-logo {
    height: 32px;
    filter: brightness(0) invert(1); /* Rend le logo blanc */
    margin-right: 2rem;
}

/* --- MENU NAVIGATION (Desktop par d�faut) --- */
.nav-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-height: 64px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* Filet de securite : retour a la ligne plutot que troncature */
    gap: 3px;
    min-height: 64px;
}

/* >>> CORRECTION DE L'ALIGNEMENT ICI <<< */
.nav-item {
    position: relative;
    height: 64px; /* Hauteur fixe = barre bleue (pastilles pleine hauteur, compatible retour a la ligne) */
    display: flex; /* Active Flexbox */
    align-items: center; /* CENTRE VERTICALEMENT le contenu (le lien ou le bouton) */
}

/* Liens du menu */
.nav-link-custom {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0 11px; /* Padding horizontal uniquement */
    height: 100%; /* Prend toute la hauteur du parent */
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    background: transparent;
    border: none;
}

    .nav-link-custom:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
    }

    .nav-link-custom i {
        margin-right: 6px;
    }

/* --- DROPDOWNS (Sous-menus) --- */
.dropdown-content {
    display: none; /* Cach� par d�faut */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 0 0 4px 4px;
    padding: 5px 0;
    z-index: 2000;
}

/* Afficher le dropdown au survol (Desktop) */
.nav-item:hover .dropdown-content {
    display: block;
}

/* Dropdowns en fin de barre (Blogs, Aide) : alignes a droite pour ne pas deborder */
.dropdown-content.dropdown-right {
    left: auto;
    right: 0;
}

/* Declencheur "Blogs" : bouton rose ouvrant un sous-menu */
.nav-btn-pink-dropdown {
    cursor: pointer;
}

/* Liens dans le dropdown */
.dropdown-item-custom {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

    .dropdown-item-custom:hover {
        background-color: #f1f1f1;
        color: rgb(0, 120, 220);
    }

/* Variante ROSE du sous-menu (Blogs uniquement) : fond rose + texte blanc,
   assorti au bouton .nav-btn-pink. N'affecte PAS le menu Aide (meme structure). */
.dropdown-pink {
    background-color: #C0167B;
}

    .dropdown-pink .dropdown-item-custom {
        color: white;
    }

        .dropdown-pink .dropdown-item-custom:hover {
            background-color: #961160;
            color: white;
        }

/* --- BOUTON BURGER (Cach� sur PC) --- */
.burger-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- RESPONSIVE (Mobile < 992px) --- */
@media (max-width: 992px) {
    .burger-btn {
        display: block; /* On affiche le burger */
    }

    .nav-container {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background-color: white;
        border-bottom: 2px solid rgb(0, 120, 220);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

        .nav-container.show-mobile {
            display: flex;
        }

    .nav-list {
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .nav-item {
        height: auto;
        display: block;
    }

    .nav-link-custom {
        color: #333;
        width: 100%;
        height: auto;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

        .nav-link-custom:hover {
            background-color: #f8f9fa;
            color: rgb(0, 120, 220);
        }

        .nav-link-custom i {
            color: rgb(0, 120, 220);
        }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-left: 3px solid rgb(0, 120, 220);
        margin-left: 10px;
        display: none;
    }

    .nav-item:hover .dropdown-content {
        display: block;
    }
}

/* Utilitaires */
.flex-spacer {
    flex-grow: 1;
}

/* --- FOOTER --- */
.app-footer {
    background-color: rgb(0, 120, 220);
    color: white;
    padding: 10px 20px;
    font-size: 0.85rem;
    z-index: 1010;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link {
    color: white !important;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

    .footer-link:hover {
        text-decoration: underline;
        opacity: 1;
    }

.footer-sep {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0 5px;
}

@media (max-width: 768px) {
    .footer-sep {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

/* --- BOUTONS ROSES (MENU) --- */
.nav-btn-pink {
    background-color: #C0167B !important;
    color: white !important;
    padding: 6px 15px !important;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    /* Alignement correct */
    display: inline-block;
    line-height: 1.2;
    margin: 0 5px;
    /* Reset margins */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

    .nav-btn-pink:hover {
        background-color: #961160 !important;
        color: white !important;
        transform: translateY(-2px);
        text-decoration: none;
    }

@media (max-width: 992px) {
    .nav-btn-pink {
        display: block;
        width: 100%;
        margin: 5px 0;
        text-align: center;
        padding: 10px 15px !important;
    }
}

/* GRID */
.alt-item > td {
    background-color: #F7F7F7 !important;
}

.my-grid-size {
    width: 100%;
    /*max-width: 1500px;*/
    max-height: 720px;
    overflow-y: auto;
    color: #0062C2;
}

.my-mediumgrid-size {
    width: 100%;
    /*max-width: 1500px;*/
    max-height: 650px;
    overflow-y: auto;
    color: #0062C2;
}

.my-smallgrid-size {
    width: 100%;
    /*max-width: 1500px;*/
    max-height: 450px;
    overflow-y: auto;
    color: #0062C2;
}

.myMiniGrid-style {
    color: #0062C2;
}

.my-grid-toolbar-Xlsx {
    background-image: url("../images/icons/xlsx.svg");
    background-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-position: center center;
    background-color: white;
    height: 30px;
    width: 30px;
    opacity: 0.7;
}

.my-grid-toolbar-Xls {
    background-image: url("../images/icons/xls.svg");
    background-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-position: center center;
    background-color: white;
    height: 30px;
    width: 30px;
    opacity: 0.7;
}

.my-grid-toolbar-csv {
    background-image: url("../images/icons/csv.svg");
    background-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-position: center center;
    background-color: white;
    height: 30px;
    width: 30px;
    opacity: 0.7;
}

/* --- MARKETING CARDS --- */
.marketing-action-card {
    background-color: #f8f9fa; /* Fond tr�s l�ger par d�faut */
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 20px 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer; /* INDISPENSABLE pour montrer qu'on peut cliquer */
    height: 100%; /* Uniformise la hauteur */
    position: relative;
}

    /* Effet au survol : on monte la carte, on met une ombre et une bordure bleue */
    .marketing-action-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 120, 220, 0.15);
        background-color: white;
        border-color: rgba(0, 120, 220, 0.2);
    }

    /* L'ic�ne rose : on lui ajoute une ombre douce */
    .marketing-action-card .icon-circle-rose {
        width: 65px;
        height: 65px;
        background: linear-gradient(135deg, #C0167B 0%, #a8136b 100%); /* D�grad� premium */
        box-shadow: 0 4px 10px rgba(192, 22, 123, 0.3);
        margin-bottom: 15px;
        transition: transform 0.3s ease;
    }

    /* Au survol, l'ic�ne grandit un peu */
    .marketing-action-card:hover .icon-circle-rose {
        transform: scale(1.1);
    }

/* Le texte "Acc�der" (Call to Action) */
.cta-text {
    color: #0062C2;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    margin-top: 8px;
    display: inline-block;
}

/* Au survol, le texte devient bien visible et bouge un peu */
.marketing-action-card:hover .cta-text {
    opacity: 1;
    transform: translateX(5px); /* Petite animation vers la droite */
}

/* --- ADAPTATION LAPTOP / ECRANS 15 POUCES --- */
@media (max-width: 1600px) {
    /* 1. On r�duit la taille de base de la police (de 16px � 14px) 
       Comme vous utilisez des 'rem', tout le site va r�tr�cir harmonieusement de ~12% */
    html {
        font-size: 14px;
    }

    /* 2. On reduit la hauteur du Header.
       min-height (et NON height fixe) : si le menu ne tient pas sur une ligne,
       le header grandit proprement au lieu de laisser la 2e ligne deborder
       par-dessus le contenu de la page. */
    .app-header, .top-navbar-custom {
        min-height: 50px !important;
    }

    .nav-container {
        top: 50px !important; /* Pour le menu mobile */
    }

    /* 3. IMPORTANT : On passe les grilles en hauteur RELATIVE (% de l'�cran) 
       au lieu de 720px fixe qui est trop grand pour un laptop */
    .my-grid-size {
        max-height: 65vh !important; /* 65% de la hauteur de la fen�tre */
    }

    /* On ajuste aussi les autres tailles de grille */
    .my-mediumgrid-size {
        max-height: 55vh !important;
    }

    /* 4. On r�duit un peu les marges internes des cartes */
    .marketing-action-card {
        padding: 15px 5px;
    }

        .marketing-action-card .icon-circle-rose {
            width: 50px;
            height: 50px;
            margin-bottom: 10px;
        }

    .burger-btn {
        font-size: 1.1rem;
        padding: 4px 8px;
    }
}

/* --- HEADER LAPTOP : COMPACT MAIS FLEXIBLE (993px -> 1600px) ---
   Borne min-width: 993px OBLIGATOIRE pour ne pas ecraser le menu burger
   (le bloc <= 992px met .nav-item en height:auto/display:block).
   On aligne toute la chaine de hauteurs sur 50px : tant que les items
   tiennent sur une ligne le header reste compact ; s'ils debordent,
   flex-wrap les renvoie a la ligne et le header (min-height) grandit
   au lieu de chevaucher le contenu. */
@media (min-width: 993px) and (max-width: 1600px) {
    .nav-container,
    .nav-list {
        min-height: 50px;
    }

    .nav-item {
        height: 50px;
    }
}