/* HeaderFooterModern.css - Design moderne pour Header et Footer */

/* ==================== HEADER ==================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    background: rgb(43, 193, 238);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
}

#header .titre {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: url('../Images/transfertCAISSE-logoTexte-blanc.svg') left center no-repeat;
    background-size: 200px;
    height: 40px;
    min-width: 210px;
}

#header .titre.custom {
    background: none;
    padding: 0;
}

#header .titre img {
    height: 36px;
    width: auto;
    margin: 0;
    position: static;
    top: auto;
    left: auto;
}

#header .titre_container {
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.3px;
    display: inline-block;
    padding: 0;
    position: static;
}

#header nav {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
}

#header nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#header nav a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

#header nav a#selectedmenu {
    background: white;
    color: rgb(16, 36, 56) !important;
    border: none;
}

#header nav a#selectedmenu svg {
    stroke: rgb(16, 36, 56);
}

#header nav a.retour {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    font-size: 13px;
}

#header nav a.retour:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

#header nav a.documentation {
    background: rgba(255, 255, 255, 0.12);
}

#header nav a.header-action {
    background: none;
    padding: 8px;
    position: relative;
    color: #ffffff !important;
}

#header nav a.header-action svg {
    stroke: #ffffff;
    transition: stroke 0.2s ease;
}

#header nav a.header-action:hover {
    background: none !important;
    transform: none;
    color: #2BC1EE !important;
}

#header nav a.header-action:hover svg {
    stroke: #2BC1EE;
}

#header nav a.header-action::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #1a1a2e;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

#header nav a.header-action:hover::after {
    opacity: 1;
}

#header nav a img {
    width: 20px;
    height: 20px;
    filter: brightness(0);
    position: static;
    top: auto;
}

#header nav a svg {
    stroke: rgb(16, 36, 56);
}

#header nav a:last-child {
    width: auto;
    padding: 10px;
    margin-left: 8px;
}

/* Bouton de deconnexion stylise */
#header nav a[title="Déconnexion"] {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#header nav a[title="Déconnexion"]:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ==================== INFOS CONNEXION ==================== */
#infosConnexion {
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 999;
    background: linear-gradient(135deg, #102438 0%, #0a1a2a 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    padding: 0;
    min-height: 0;
    border-radius: 0 0 6px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#infosConnexion:not(:empty) {
    padding: 4px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

#infosConnexion::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== FOOTER ==================== */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(135deg, #102438 0%, #0a1a2a 100%) !important;
    border-top: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 12px !important;
    padding: 12px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

#footer #version {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    font-weight: 500;
    width: auto !important;
    text-align: left !important;
    flex-shrink: 0;
    margin-right: auto;
}

#footer #version::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('../Images/transfertCAISSE-logoTexte-blanc.svg') center no-repeat;
    background-size: contain;
    opacity: 0.7;
}

#footer #contact {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    width: auto !important;
    text-align: right !important;
    margin-left: auto !important;
    flex-shrink: 0;
}

#footer #contact a {
    color: #2BC1EE !important;
    text-decoration: none !important;
    padding: 4px 10px;
    background: rgba(43, 193, 238, 0.1);
    border-radius: 4px;
    transition: all 0.2s;
}

#footer #contact a:hover {
    background: rgba(43, 193, 238, 0.2);
    color: #5DD3F5 !important;
}

/* Menu burger - masque en desktop */
#header .menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 999px) {
    #header {
        height: 56px;
        padding: 0 16px;
    }

    #header .titre {
        background-size: 160px;
        min-width: 170px;
    }

    #header nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgb(43, 193, 238);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    #header nav.open {
        max-height: 400px;
        padding: 8px;
    }

    #header nav a {
        padding: 14px 20px;
        border-radius: 8px;
        justify-content: flex-start;
    }

    #header nav a:last-child {
        margin-left: 0;
        width: 100%;
        padding: 14px 20px;
        justify-content: flex-start;
        border-radius: 8px;
    }

    #header nav a[title="Déconnexion"] {
        width: 100%;
        border-radius: 8px;
        justify-content: flex-start;
        gap: 10px;
    }

    #header nav a[title="Déconnexion"]::after {
        content: 'Déconnexion';
    }

    /* Menu burger */
    #header .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        cursor: pointer;
        z-index: 1001;
    }

    #header .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s;
    }

    #header .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    #header .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    #header .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    #infosConnexion {
        top: 56px;
    }

    #footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px 16px;
    }

    #footer #version::before {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    #header .titre {
        background-size: 140px;
        min-width: 150px;
    }

    #footer #contact {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ==================== BODY PADDING ADJUSTMENT ==================== */
body {
    padding-top: 60px !important;
}

@media screen and (max-width: 999px) {
    body {
        padding-top: 56px !important;
    }
}
