/* === STYLES PAGES LÉGALES === */

/* Layout principal */
.legal-container {
    padding-top: 80px;
    min-height: 100vh;
    background-color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header légal */
.legal-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
    border-bottom: 2px solid #e8f4f8;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
}

.legal-header:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #e67e22, #d35400);
    border-radius: 2px;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 20px;
    line-height: 1.2;
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.2;
}

.legal-intro {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.last-updated,
.legal-update {
    font-size: 0.95rem;
    color: #718096;
    font-style: italic;
    background-color: #f7fafc;
    padding: 8px 16px;
    border-radius: 6px;
    display: block;
    text-align: center;
    margin: 0 auto 40px auto;
    max-width: 300px;
    border: 1px solid #e2e8f0;
}

/* Tables d'informations spéciales pour mentions légales */
.legal-info {
    margin: 20px 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.info-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.info-table td:first-child {
    background-color: #f8fafc;
    font-weight: 600;
    color: #2d3748;
    width: 35%;
    border-right: 2px solid #e67e22;
}

.info-table td:last-child {
    color: #4a5568;
    background-color: #ffffff;
}

.info-table tbody tr:last-child td {
    border-bottom: none;
}

.info-table tbody tr:hover td {
    background-color: #f1f5f9;
}

.info-table tbody tr:hover td:first-child {
    background-color: #edf2f7;
}

/* Introduction du contact */
.contact-intro {
    background-color: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
    margin-bottom: 40px;
}

.contact-intro p {
    margin: 0;
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Informations de contact */
.contact-info {
    background-color: #fff5f5;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #fed7d7;
    margin-bottom: 40px;
}

.contact-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e67e22;
}

.contact-details p {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #2d3748;
}

.contact-details strong {
    color: #1a365d;
    font-weight: 600;
    display: inline-block;
    min-width: 100px;
}

/* Section formulaire de contact */
.contact-form-section {
    margin-bottom: 40px;
}

.contact-form-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e67e22;
}

/* Formulaire de contact */
.contact-form {
    background-color: #f8fafc;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1rem;
}

.required {
    color: #e53e3e;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #ffffff;
    color: #2d3748;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit button {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    min-width: 200px;
}

.form-submit button:hover {
    background: linear-gradient(135deg, #d35400, #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.form-submit button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(230, 126, 34, 0.3);
}

/* Informations complémentaires */
.contact-additional {
    background-color: #f0f8f0;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #c6f6d5;
    margin-bottom: 40px;
}

.contact-additional h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #48bb78;
}

.contact-additional h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c5aa0;
    margin: 25px 0 15px 0;
}

.contact-additional p {
    margin-bottom: 16px;
    color: #2d3748;
    line-height: 1.7;
}

/* Messages de retour */
.contact-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 500;
}

.contact-message.success {
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.contact-message.error {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

/* Contenu légal standard */
.legal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a365d;
    margin: 50px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e67e22;
    padding-left: 15px;
    position: relative;
}

.legal-content h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #e67e22, #d35400);
    border-radius: 2px;
}

.legal-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c5aa0;
    margin: 30px 0 15px 0;
    padding-left: 10px;
    border-left: 3px solid #4299e1;
}

.legal-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin: 25px 0 12px 0;
}

.legal-content p {
    margin-bottom: 16px;
    text-align: justify;
    color: #2d3748;
    line-height: 1.8;
}

.legal-content ul, .legal-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.legal-content li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #2d3748;
}

.legal-content ul li {
    list-style-type: disc;
    position: relative;
}

.legal-content ul li:before {
    content: '•';
    color: #e67e22;
    font-weight: bold;
    position: absolute;
    left: -18px;
}

.legal-content ol li {
    list-style-type: decimal;
}

.legal-content strong {
    color: #1a365d;
    font-weight: 600;
}

/* Sections spéciales */
.legal-section {
    margin-bottom: 45px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-left: 4px solid #e67e22;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.legal-section:first-of-type {
    background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
    border-left-color: #d35400;
}

.legal-section:nth-of-type(even) {
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    border-left-color: #4299e1;
}

.legal-section:nth-of-type(3n) {
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
    border-left-color: #48bb78;
}

/* Numérotation automatique des sections légales */
.legal-section h2:before {
    color: #e67e22;
    font-weight: 700;
}

.legal-content {
    counter-reset: legal-section;
}

/* FAQ spécifique */
.faq-section {
    margin-bottom: 40px;
}

.faq-item {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a365d;
    font-size: 1.2rem;
}

.faq-item p {
    margin-bottom: 0;
    color: #4a5568;
}

/* Contact légal */
.legal-contact {
    margin-top: 50px;
    padding: 30px;
    background-color: #edf2f7;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
}

/* Tableaux responsive avec design amélioré */
.table-responsive {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.95rem;
    min-width: 600px;
}

.legal-table th {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #ffffff;
    font-weight: 600;
    padding: 18px 15px;
    text-align: left;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.legal-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    vertical-align: top;
    line-height: 1.6;
}

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

.legal-table tbody tr:hover {
    background-color: #edf2f7;
    transition: background-color 0.2s ease;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

/* Éléments de mise en forme */
.highlight {
    background: linear-gradient(120deg, #fff5b7 0%, #fffacd 100%);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    color: #744210;
    border: 1px solid #f6e05e;
}

.important {
    color: #e53e3e;
    font-weight: 600;
    background-color: #fff5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.note {
    background: linear-gradient(135deg, #e6fffa 0%, #ffffff 100%);
    border: 1px solid #81e6d9;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 0.95rem;
    color: #2d3748;
    position: relative;
    border-left: 4px solid #38b2ac;
}

.note:before {
    content: 'ℹ️';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2rem;
}

.note p:first-child {
    margin-left: 30px;
}

.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border: 1px solid #f6e05e;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 0.95rem;
    color: #744210;
    position: relative;
    border-left: 4px solid #ecc94b;
}

.warning:before {
    content: '⚠️';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2rem;
}

.warning p:first-child {
    margin-left: 30px;
}

/* Style pour les informations de contact dans le contenu */
.legal-content .contact-info-inline {
    background: linear-gradient(135deg, #f0f8f0 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-container {
        padding-top: 60px;
    }
    
    .legal-content {
        padding: 30px 15px;
    }
    
    .legal-header {
        padding: 25px 0;
        margin-bottom: 30px;
    }
    
    .legal-header h1,
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-intro {
        font-size: 1rem;
    }
    
    .contact-intro,
    .contact-info,
    .contact-form,
    .contact-additional {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .legal-content h2,
    .contact-info h2,
    .contact-form-section h2,
    .contact-additional h2 {
        font-size: 1.5rem;
        margin: 40px 0 20px 0;
    }
    
    .legal-content h3 {
        font-size: 1.2rem;
        margin: 25px 0 12px 0;
    }
    
    .legal-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .faq-item {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .legal-contact {
        padding: 20px 15px;
    }
    
    .legal-table {
        font-size: 0.85rem;
        min-width: 500px;
    }
    
    .legal-table th,
    .legal-table td {
        padding: 12px 10px;
    }
    
    .info-table td {
        padding: 12px 15px;
    }
    
    .info-table td:first-child {
        width: 40%;
        font-size: 0.9rem;
    }
    
    .form-submit button {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 180px;
    }
    
    .last-updated,
    .legal-update {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .legal-header h1,
    .legal-content h1 {
        font-size: 1.8rem;
    }
    
    .legal-content {
        font-size: 0.95rem;
        padding: 20px 10px;
    }
    
    .contact-intro,
    .contact-info,
    .contact-form,
    .contact-additional {
        padding: 15px;
    }
    
    .legal-content h2,
    .contact-info h2,
    .contact-form-section h2,
    .contact-additional h2 {
        font-size: 1.3rem;
        padding-left: 10px;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
        padding-left: 8px;
    }
    
    .legal-table {
        font-size: 0.8rem;
        min-width: 400px;
    }
    
    .legal-table th,
    .legal-table td {
        padding: 10px 8px;
    }
    
    .legal-table th {
        font-size: 0.8rem;
        padding: 12px 8px;
    }
    
    .info-table {
        font-size: 0.9rem;
    }
    
    .info-table td {
        padding: 10px 12px;
    }
    
    .info-table td:first-child {
        width: 45%;
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .form-submit button {
        padding: 10px 20px;
        font-size: 0.95rem;
        min-width: 160px;
    }
    
    .contact-details strong {
        min-width: 80px;
        font-size: 0.95rem;
        display: block;
        margin-bottom: 4px;
    }
    
    .legal-section {
        padding: 15px;
    }
    
    .last-updated,
    .legal-update {
        font-size: 0.85rem;
        padding: 5px 10px;
        max-width: 250px;
    }
    
    .note,
    .warning {
        padding: 15px;
    }
    
    .note:before,
    .warning:before {
        top: 12px;
        left: 12px;
        font-size: 1rem;
    }
    
    .note p:first-child,
    .warning p:first-child {
        margin-left: 25px;
    }
}

/* Amélioration du contraste et accessibilité */
.legal-content a {
    color: #2c5aa0;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: #e67e22;
    text-decoration: none;
}

.legal-content a:focus {
    outline: 2px solid #e67e22;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Focus pour l'accessibilité */
.legal-container *:focus {
    outline: 2px solid #e67e22;
    outline-offset: 2px;
}

/* Animation subtile pour les sections */
.legal-section {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legal-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Amélioration des listes */
.legal-content ul {
    background-color: #fafbfc;
    padding: 20px 20px 20px 40px;
    border-radius: 6px;
    border-left: 3px solid #e67e22;
}

/* Style spécial pour les tableaux d'informations légales */
.legal-section .info-table td:first-child {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Icônes pour les sections */
.legal-section h2:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    background-size: contain;
    vertical-align: middle;
}

.legal-section:nth-child(1) h2:after {
    content: '🏢';
}

.legal-section:nth-child(2) h2:after {
    content: '👤';
}

.legal-section:nth-child(3) h2:after {
    content: '🌐';
}

.legal-section:nth-child(4) h2:after {
    content: '©️';
}

.legal-section:nth-child(5) h2:after {
    content: '⚖️';
}

.legal-section:nth-child(6) h2:after {
    content: '🔗';
}

.legal-section:nth-child(7) h2:after {
    content: '🔒';
}

.legal-section:nth-child(8) h2:after {
    content: '🍪';
}

.legal-section:nth-child(9) h2:after {
    content: '⚖️';
}

.legal-section:nth-child(10) h2:after {
    content: '📞';
}

/* Print styles */
@media print {
    .legal-container {
        padding-top: 0;
    }
    
    .legal-header,
    .legal-content,
    .legal-contact,
    .contact-info,
    .contact-form,
    .contact-additional {
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .legal-table th,
    .info-table td:first-child {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
    }
    
    .form-submit button {
        display: none;
    }
    
    .legal-section {
        page-break-inside: avoid;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .legal-content h2 {
        page-break-after: avoid;
    }
    
    .info-table {
        page-break-inside: avoid;
    }
    
    .legal-section h2:after {
        display: none;
    }
}