/**
 * ═══════════════════════════════════════════════════════════════
 * MAISONS CTL - Styles des Pages Légales
 * ═══════════════════════════════════════════════════════════════
 * 
 * Fichier : css/legal.css
 * Description : Styles pour les pages mentions légales, CGV, 
 *               politique de confidentialité, etc.
 * 
 * Version : 1.0.0
 * Date : 27/10/2025
 * Auteur : Maisons CTL
 * 
 * NOTES :
 * - Design sobre et professionnel
 * - Responsive mobile-first
 * - Hiérarchie typographique claire
 * - Mise en valeur des informations importantes
 * 
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════
   VARIABLES CSS
═══════════════════════════════════════════════════════════ */
:root {
    --legal-primary: #2c3e50;
    --legal-secondary: #e74c3c;
    --legal-text: #333;
    --legal-text-light: #666;
    --legal-bg: #fff;
    --legal-bg-alt: #f8f9fa;
    --legal-border: #ddd;
    --legal-highlight: #fff3cd;
    --legal-link: #e74c3c;
    --legal-link-hover: #c0392b;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT GÉNÉRAL
═══════════════════════════════════════════════════════════ */
.legal-page {
    background: var(--legal-bg);
    min-height: 100vh;
}

.legal-page .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION HERO
═══════════════════════════════════════════════════════════ */
.legal-hero {
    background: linear-gradient(135deg, var(--legal-primary) 0%, #34495e 100%);
    color: white;
    padding: 60px 20px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.legal-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.legal-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 0 15px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.legal-update {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   CONTENU PRINCIPAL
═══════════════════════════════════════════════════════════ */
.legal-content {
    padding: 0 20px 60px;
}

.legal-section {
    background: var(--legal-bg);
    border: 1px solid var(--legal-border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Titres */
.legal-section h2 {
    color: var(--legal-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--legal-secondary);
}

.legal-section h3 {
    color: var(--legal-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
}

/* Paragraphes */
.legal-section p {
    color: var(--legal-text);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 15px 0;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* Liens */
.legal-section a {
    color: var(--legal-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.legal-section a:hover {
    color: var(--legal-link-hover);
    border-bottom-color: var(--legal-link-hover);
}

/* ═══════════════════════════════════════════════════════════
   BLOCS D'INFORMATIONS
═══════════════════════════════════════════════════════════ */
.legal-info {
    background: var(--legal-bg-alt);
    border-left: 4px solid var(--legal-secondary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.legal-info p {
    margin-bottom: 10px;
}

.legal-info p:last-child {
    margin-bottom: 0;
}

.legal-info strong {
    color: var(--legal-primary);
    font-weight: 600;
}

/* Bloc highlight (infos importantes) */
.legal-highlight {
    background: var(--legal-highlight);
    border-left-color: #ffc107 !important;
    padding: 15px 20px !important;
    margin: 20px 0 !important;
    border-radius: 4px;
    font-weight: 500;
}

/* Bloc contact */
.legal-contact p {
    margin-bottom: 20px;
}

.legal-contact p:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   LISTES
═══════════════════════════════════════════════════════════ */
.legal-section ul,
.legal-section ol {
    margin: 15px 0 15px 25px;
    line-height: 1.8;
}

.legal-section li {
    margin-bottom: 10px;
    color: var(--legal-text);
}

/* ═══════════════════════════════════════════════════════════
   TABLEAUX (pour CGV si besoin)
═══════════════════════════════════════════════════════════ */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.legal-table th,
.legal-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid var(--legal-border);
}

.legal-table th {
    background: var(--legal-primary);
    color: white;
    font-weight: 600;
}

.legal-table tr:nth-child(even) {
    background: var(--legal-bg-alt);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
═══════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {
    
    /* Hero */
    .legal-hero {
        padding: 40px 15px 30px;
    }
    
    .legal-hero h1 {
        font-size: 1.8rem;
    }
    
    .legal-subtitle {
        font-size: 1rem;
    }
    
    /* Contenu */
    .legal-content {
        padding: 0 15px 40px;
    }
    
    .legal-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.2rem;
    }
    
    .legal-info {
        padding: 15px;
    }
    
    /* Tableaux responsive */
    .legal-table {
        font-size: 0.9rem;
    }
    
    .legal-table th,
    .legal-table td {
        padding: 8px 10px;
    }
    
}

/* ═══════════════════════════════════════════════════════════
   PETITS ÉCRANS
═══════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    
    .legal-hero h1 {
        font-size: 1.5rem;
    }
    
    .legal-subtitle {
        font-size: 0.95rem;
    }
    
    .legal-section {
        padding: 15px;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
    }
    
    /* Tableaux en mode scroll horizontal sur très petits écrans */
    .legal-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
}

/* ═══════════════════════════════════════════════════════════
   IMPRESSION
═══════════════════════════════════════════════════════════ */
@media print {
    
    .legal-hero {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }
    
    .legal-section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .legal-section a {
        color: black;
        text-decoration: underline;
    }
    
    .legal-info {
        border: 1px solid #ccc;
    }
    
}