/* Réinitialisation et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #03142F;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.global-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000; /* Au-dessus de tout */
}

.global-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Ajustement du container pour éviter le chevauchement */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 2rem 70px; /* Padding gauche augmenté pour éviter le logo */
}

/* Le reste de ton CSS existant */
header {
    width: 100%;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: center; /* Centre le titre */
    width: 100%;
}

.title-container {
    text-align: center;
}

.title-container h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.title-container p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.open-all-container {
    text-align: center;
    margin: 20px 0;
}

.open-all-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s;
}

.open-all-button:hover {
    background-color: #1a252f;
}

/* Bouton de bascule */
.toggle-view-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toggle-button {
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 120px; /* Largeur fixe pour éviter que le bouton ne bouge */
    text-align: center;
}

.toggle-button:hover {
    background: #2d3748;
    transform: scale(1.05);
}

/* Classe pour masquer les tuiles non-favorites */
.service-card.hidden {
    display: none;
}

/* Animation pour le bouton */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.toggle-button {
    animation: slideIn 0.5s ease-out;
}


/* Grille des services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes de même largeur */
    gap: 2rem;
    justify-content: center;
    margin: 0 auto;
    max-width: 1000px; /* Pour éviter que la grille ne devienne trop large */
}

/* Responsive pour tablettes */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}

/* Responsive pour mobiles */
@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
    }
}

/* Style des tuiles */
.service-card {
    position: relative; /* Nécessaire pour positionner l'indicateur */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(128, 128, 128, 0.05);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 150px; /* Assure une hauteur minimale pour éviter le chevauchement */
    height: 200px;
}

.service-card:hover {
    transform: translateY(-3px);
}

/*tuile main subcontainer*/
.service-link {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
}

/* Conteneur pour le logo */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Style de l'image du logo */
.service-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.service-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #D4EFF4; /* Même couleur que le titre principal */
    padding-top: 0.5rem;
}

/* Style de l'indicateur */
.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    z-index: 10; /* Assure que l'indicateur est au-dessus du contenu */
    cursor: pointer;
}

/* Infobulle */
.status-indicator::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 20;
}

.status-indicator:hover::after {
    opacity: 1;
}

/* Couleurs de statut */
.status-online {
    background-color: #4CAF50;
}

.status-offline {
    background-color: #F44336;
}

/* Sous-tuiles */
.subcards-container {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.subcard {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.subcard:first-child {
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.subcard:hover {
    background: rgba(255, 255, 255, 0.1);
}

.subcard img {
    width: 18px;
    height: 18px;
}