/* Règle globale pour s'assurer que tous les éléments incluent padding et border dans leur largeur */
*, *::before, *::after {
    box-sizing: border-box;
}

.legal-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 40px;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden; /* Pour contenir les marges qui s'effondrent */
}

.legal-sections-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrage horizontal des sections */
    padding-left: 0; /* Suppression du padding qui décalait */
}

.legal-section {
    width: 90% !important; /* Légèrement plus étroit que le conteneur */
    margin: 0 auto 30px auto !important;
    padding: 20px !important;
    background: #f8f9fa;
    border-radius: 6px;
    transition: transform 0.2s ease;
    position: static !important;
    left: auto !important;
    transform: none !important;
}

.legal-container h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.legal-section:hover {
    transform: translateY(-2px) !important;
}

.legal-section h2 {
    color: #3498db;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
    margin-left: 0;
}

.legal-section h2 i {
    color: #2980b9;
}

.legal-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-left: 0;
    margin-left: 0;
}

.legal-section ul {
    list-style-type: none;
    padding-left: 20px;
}

.legal-section ul li {
    margin-bottom: 8px;
    color: #555;
    position: relative;
}

.legal-section ul li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

@media (max-width: 768px) {
    .legal-container {
        margin: 20px;
        padding: 15px 20px;
        width: calc(100% - 40px);
        box-sizing: border-box;
    }

    .legal-section {
        padding: 15px;
        width: 95%;
    }
}

/* Animation subtile au chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-section {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.legal-section:nth-child(1) { animation-delay: 0.1s; }
.legal-section:nth-child(2) { animation-delay: 0.2s; }
.legal-section:nth-child(3) { animation-delay: 0.3s; }
.legal-section:nth-child(4) { animation-delay: 0.4s; }
.legal-section:nth-child(5) { animation-delay: 0.5s; }
.legal-section:nth-child(6) { animation-delay: 0.6s; }
.legal-section:nth-child(7) { animation-delay: 0.7s; }
.legal-section:nth-child(8) { animation-delay: 0.8s; } 

/* Style des icônes Material */
.material-icons {
    color: var(--primary-color);
    vertical-align: middle;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.material-icons:hover {
    color: var(--primary-hover);
}

/* Vérifions si ces sélecteurs existent et interfèrent */
h2[class*="history"],
.history-title,
.legal-section h2,
.legal-section > *:first-child {
    /* Ces propriétés pourraient causer le décalage */
    padding-left: 0 !important; /* Pour voir si ça corrige */
    margin-left: 0 !important;
}

/* Ou le problème pourrait venir d'un padding/margin sur le conteneur de la section */
.legal-section {
    padding-left: 0; /* Enlever le padding gauche */
    margin-left: 0; /* Enlever la marge gauche */
}
