/* ==========================================================================
   Cosamirai Site Logo Intelligent - Adaptatif selon navigation
   ========================================================================== */

.cosamirai-site-logo {
    display: flex;
    align-items: center;
    position: relative;
}

.cosamirai-site-logo a {
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
}

.cosamirai-site-logo img,
.cosamirai-logo-normal-img,
.cosamirai-logo-white-img {
    z-index: 2;
    position: relative;
    width: 100%;
    max-width: 10rem;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Logique d'affichage selon les classes de navigation */

/* Par défaut : afficher le logo normal, cacher le logo white */
.cosamirai-logo-normal {
    opacity: 1;
}

.cosamirai-logo-white-container {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

/* Si navigation en mode white : cacher le logo normal, afficher le logo white */
#masthead.nav-textcolor-white .cosamirai-site-logo .cosamirai-logo-normal {
    opacity: 0;
    pointer-events: none;
}

#masthead.nav-textcolor-white .cosamirai-site-logo .cosamirai-logo-white-container {
    opacity: 1;
    pointer-events: auto;
}

/* Assurer que les deux logos ont la même taille */
.cosamirai-logo-normal-img,
.cosamirai-logo-white-img {
    width: 100%;
    max-width: 10rem;
    height: auto;
}

/* Backend Preview Styles */
.cosamirai-site-logo-preview {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    max-width: 300px;
}

.cosamirai-site-logo-preview img {
    max-width: 150px;
    height: auto;
    margin-bottom: 0.5rem;
}

.adaptive-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .cosamirai-site-logo-preview {
        max-width: 250px;
    }
}
