/* Corps de la page */
.main {
    font-family: "Poppins", sans-serif;
    background-image: url("../images_site/fond-page-accueil.svg");
    background-size: cover;
}

/* Simple loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 9999;
    display: none;
}

.loader-container.active {
    display: block;
    background: #0684F8;
    animation: loading 1s ease-in-out infinite;
}

@keyframes loading {
    0% {
        width: 0;
        left: 0;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
        left: 100%;
    }
}

/* En-tête de navigation */
.main-header {
    background-color: #0E123D;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Change to space-between for better alignment */
    padding: 0 20px;
    /* Add some padding for spacing */
}

/* Logo principal */
.logo,
.logo-container {
    max-height: 70px;
    /* Alignement du logo à gauche */
    flex: 0 0 auto;
    margin-left: 20px;
    margin-top: 10px;
}

/* Styles des liens de navigation */
.nav-tabs {
    border-bottom: none;
    background-color: #0E123D;
    color: #fff;
    font-size: 18px;
    /*width: 100%;*/
    /* Ensure nav tabs take full width */
    border: none;
    align-items: center;
    justify-content: center;
    /* Center align items */
}

.nav-tabs .nav-link {
    border: 0px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.nav-item {
    position: relative;
    overflow: hidden;
}

.nav-link img {
    display: block;
    margin: 0 auto 5px;
    height: 30px;
    pointer-events: none;
}

.nav-link {
    color: #fff;
    padding: 10px 30px;
    font-size: 14px;
    width: 160px;
    border: none;
    text-align: center;
}

.nav-link:hover {
    text-shadow: 0 0 0.5em #23242f;
    border-bottom: 2px solid #0684f8;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background-color: #0E123D;
}

/* Styles spécifiques pour chaque nav link*/
#generality-tab.nav-link.active,
#generality-tab.nav-link:focus,
#generality-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #EDEFF2;
    border-bottom: 2px solid #b3b6bb;
}

#administrator-tab.nav-link.active,
#administrator-tab.nav-link:focus,
#administrator-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #0684F8;
    border-bottom: 2px solid #0684f8;
}

#server-tab.nav-link.active,
#server-tab.nav-link:focus,
#server-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #0684F8;
    border-bottom: 2px solid #0684f8;
}

#data-tab.nav-link.active,
#data-tab.nav-link:focus,
#data-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #E56B6F;
    border-bottom: 2px solid #E56B6F;
}

#builder-tab.nav-link.active,
#builder-tab.nav-link:focus,
#builder-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #10979D;
    border-bottom: 2px solid #10979D;
}

#messenger-tab.nav-link.active,
#messenger-tab.nav-link:focus,
#messenger-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ED9652;
    border-bottom: 2px solid #ED9652;
}

#page-center-tab.nav-link.active,
#page-center-tab.nav-link:focus,
#page-center-tab.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #69D1C5;
    border-bottom: 2px solid #69D1C5;
}

/* Styles spécifiques pour chaque nav link effet glassy*/
#generality-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(237, 239, 242, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#generality-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#administrator-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 132, 248, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#administrator-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#server-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 132, 248, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#server-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#data-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(229, 107, 111, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#data-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#builder-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(16, 151, 157, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#builder-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#messenger-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(237, 150, 82, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#messenger-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

#page-center-tab.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(105, 209, 197, 0.5),
            transparent);
    transition: 1s;
    pointer-events: none;
    /* This prevents the pseudo-element from blocking clicks */
    opacity: 0;
}

#page-center-tab.nav-link:hover::before {
    animation: shine 10s infinite;
    opacity: 1;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    15% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Elements de l'iframe */
.main-body {
    border: 0;
    padding: 0;
    margin: 0;
    background-color: #fff;
    width: 100vw;
    height: calc(100vh - 100px - 20px);
    /* Full height minus header and footer margin */
    margin-bottom: 20px;
    /* Footer margin */
    overflow: hidden;
}

/* Styles pour les iframes */
iframe {
    width: 100%;
    height: calc(100vh - 100px - 20px);
    /* Full height minus header and footer margin */
    border: none;
}

/* Styles spécifiques pour chaque tab */
#generality .tab-pane.active {
    background-color: #f1f1f1;
}

#myreport-administrator .tab-pane.active {
    background-color: #e9ecef;
}

#myreport-server .tab-pane.active {
    background-color: #e9ecef;
}

#myreport-data .tab-pane.active {
    background-color: #dee2e6;
}

#myreport-builder .tab-pane.active {
    background-color: #ced4da;
}

#myreport-messenger .tab-pane.active {
    background-color: #adb5bd;
}

#myreport-page-center .tab-pane.active {
    background-color: #6c757d;
    color: #fff;
}

/* Styles pour le loader */
#logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: url('/static/images_site/logo/MyReport-icotype-RVB.png') no-repeat center center;
    background-size: contain;
    z-index: 1000;
    display: block;
    border: none;
    animation: rotating 2s linear infinite;
}

#logo.hidden {
    display: none;
}

@keyframes rotating {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.rotating {
    animation: rotating 3s linear infinite;
}

/* Styles responsive */
/* Styles responsives généraux */
@media (max-width: 1200px) {
    .main-header {
        flex-direction: row;
        height: auto;
    }

    .logo {
        max-height: 60px;
    }

    .nav-tabs .nav-link {
        font-size: 16px;
        padding: 10px 20px;
    }
}

@media (max-width: 992px) {
    .main-header {
        flex-direction: row;
        height: auto;
    }

    .logo {
        max-height: 50px;
    }

    .nav-tabs .nav-link {
        font-size: 16px;
        padding: 1px 1px;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .logo {
        max-height: 40px;
        margin-bottom: 10px;
    }

    .nav-tabs {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-tabs .nav-link {
        font-size: 14px;
        padding: 8px 10px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 5px;
    }

    .logo {
        max-height: 30px;
    }

    .nav-tabs .nav-link {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Ciblage spécifique pour écrans iPhone SE (320px à 375px) */
@media (max-width: 375px) {
    .main-header {
        padding: 5px 10px;
    }

    .logo {
        max-height: 25px;
        margin-bottom: 5px;
    }

    .nav-tabs {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .nav-tabs .nav-link {
        font-size: 12px;
        padding: 5px 8px;
        text-align: center;
        width: 100%;
    }
}

@media screen and (min-width: 344px) {
    .nav-tabs {
        flex-direction: row;
        /* Disposer les éléments horizontalement */
    }
}

/* Styles pour les conteneurs d'iframe et de loader */
.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    /* Hauteur minimale pour éviter les sauts de mise en page */
}

.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    transition: opacity 0.3s ease;
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-container img {
    width: 50px;
    height: 50px;
    animation: rotating 2s linear infinite;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}