body {
    font-family: 'Open Sans', 'Arial', sans-serif;
    margin: 0;
    padding: 0 0 55px 0; 
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.blocs-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    margin: openPopup;
    list-style: none;
}

.bloc-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 180px;
    box-sizing: border-box;
    text-align: center;
}

.bloc-item a:hover,
.bloc-item a:focus {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.bloc-item img.logo {
    max-width: 160px;
    max-height: 80px;
    margin-bottom: 12px;
    object-fit: contain;
}

.bloc-item .titre-bloc {
    font-size: 1.1em;
    font-weight: 600;
    color: #003366;
    margin: 0;
    line-height: 1.3;
}

#tarteaucitronIcon {
    bottom: 70px !important;
    right: 10px !important;
}

.floating-menu {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
    gap: 15px;
    z-index: 1000;
}

.floating-menu a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 60px;
    background: #FDC533;
    color: white;
    text-decoration: none;
    border-radius: 5px 0 0 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-size: 20px;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 10px;
}

.floating-menu a span {
    position: absolute;
    left: 50px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    background: #FDC533;
    padding: 0 10px;
    border-radius: 20px;
    font-size: 17px;
    color: #fff;
    pointer-events: none;
}

.floating-menu a:hover {
    width: 230px;
    justify-content: flex-start;
    padding-left: 15px;
}

.floating-menu a:hover span {
    opacity: 1;
    transform: translateX(0);
}

/* --- ASSISTANCE --- */
#assistance-page{ padding: 40px 10%; }
#assistance-page h1{ text-align: center; }

#diagnostic-button-container{ display: flex; justify-content: center; }
#diagnostic-button{
    width: 200px;
    margin-bottom: 30px;
    padding: 8px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FDC533;
    color: #FFF;
    border-radius: 5px;
    cursor: pointer;
}

table{
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead th, table tbody td{
    text-align: left;
    border: 2px solid #CCC;
    padding: 8px;
}

table tbody tr:nth-child(even) {
    background-color: #FFF; 
}

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Contenu de la popup */
.popup-content {
    background: #fff;
    padding: 80px 60px 60px 60px;
    border-radius: 8px;
    max-width: 1300px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

/* Bouton de fermeture */
.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.popup-close:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bouton d'ouverture */
.open-popup-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.open-popup-btn:hover {
    background-color: #0056b3;
}

.loader-dots {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #333;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        opacity: 0.3;
        transform: translateY(-8px);
    }
}

/* --- FOOTER STYLE ADNOV - STRUCTURÉ --- */
.footer {
    background-color: #202020;
    color: #cccccc;
    font-family: 'Open Sans', 'Arial', sans-serif;
    font-size: 0.75em;
    padding: 0 20px;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;

    /* --- Modifications pour la structure Flexbox --- */
    display: flex;
    justify-content: space-between; 
    align-items: center; 
}

.footer-section {
    display: flex;
    align-items: center; 
}

/* Section gauche pour l'assistance */
.footer-assistance a {
    cursor: pointer;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}
.footer-assistance a:hover {
    text-decoration: underline;
}

.logo-assistance {
    height: 1em; 
    width: auto;  
    margin-right: 6px; 
    filter: invert(85%) sepia(0%) saturate(432%) hue-rotate(193deg) brightness(90%) contrast(89%); 
}

.footer-links ul{ 
    display: flex; 
    list-style: none;
}
.footer-links ul li{ margin-right: 20px; }
.footer-links ul li a{
    cursor: pointer;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}
.footer-links ul li a:hover {   text-decoration: underline; }

.logo-adnov-footer {
    height: 16px;
    vertical-align: middle; 
    margin-right: 8px; 
}
#tarteaucitronManager{ display: none !important; }

/* --- Media Queries pour la Responsivité --- */
/* Très grands écrans : min 1600px */
@media (min-width: 1600px) {
    .main-content {
        max-width: 1600px;
        width: 100%;
    }

    .blocs-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 991.98px) {
    .blocs-container {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 767.98px) {
    .main-content { padding: 20px 15px; }
    .blocs-container { grid-template-columns: 1fr; }

    .footer {
        flex-direction: column; /* Passe les sections en colonne sur petit écran */
        align-items: center;   /* Centre les sections en colonne */
        padding: 10px 15px;
        text-align: center; /* Centre le texte dans chaque section quand en colonne */
    }
    .footer-section {
        margin-bottom: 5px; /* Espace entre les sections quand en colonne */
    }
    .footer-section:last-child {
        margin-bottom: 0;
    }
    .footer-copyright {
        /* S'assure que le logo ADNOV est avant le texte de copyright même en colonne si besoin.
            Ici, l'ordre HTML est déjà correct. */
    }
    body {
        /* Le footer en colonne sera plus haut, il faut ajuster le padding-bottom du body */
        padding: 0 0 75px 0; /* Augmenter pour accommoder 2 lignes de footer sur mobile */
    }
}