/* ==========================================================================
   Pages légales, page d'erreur et page de confirmation
   Ces règles étaient dupliquées dans un bloc <style> au sein de chaque page.
   Les regrouper ici permet de retirer 'unsafe-inline' de style-src et évite
   que les trois copies divergent.
   ========================================================================== */

/* ============ MISE EN PAGE COMMUNE ============ */

/* Décale le contenu sous l'en-tête fixe. */
.legal__page {
    padding-top: calc(var(--header-height) + 2rem);
}

.legal__content {
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.legal__intro {
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: var(--bg-gradient-light);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--primary-color);
    font-size: var(--font-lg);
    line-height: 1.6;
}

.legal__section {
    margin-bottom: var(--space-8);
    padding: var(--space-6);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: var(--border-width) solid var(--border-color);
}

.legal__title {
    font-size: var(--font-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.legal__title::first-letter {
    font-size: 1.2em;
    margin-right: var(--space-1);
}

.legal__section p {
    margin-bottom: var(--space-3);
}

.legal__section p:last-child {
    margin-bottom: 0;
}

.legal__section strong {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
}

.legal__section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.legal__section a:hover {
    text-decoration: underline;
}

/* ============ ÉLÉMENTS ISSUS DES STYLES INLINE ============ */

.legal__note {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: var(--space-2);
}

.legal__callout {
    margin-top: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-gradient-light);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-lg);
}

.legal__summary {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--bg-gradient-light);
    border-radius: var(--radius-xl);
    border: 2px solid var(--primary-color);
}

.legal__summary-title {
    margin: 0;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.legal__summary-list {
    margin: var(--space-2) 0 0 0;
    padding-left: var(--space-6);
}

.legal__back {
    text-align: center;
    margin-top: 3rem;
}

/* ============ LISTES ============ */

.privacy__list,
.cgv__list {
    list-style: none;
    margin: var(--space-4) 0;
    padding-left: 0;
}

.privacy__list li,
.cgv__list li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-6);
    position: relative;
}

.privacy__list li::before {
    content: '\2022';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.cgv__list li::before {
    content: '\2713';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.privacy__highlight {
    background: var(--bg-gradient-light);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

.contact__section {
    background: var(--bg-gradient-light);
    border: 2px solid var(--primary-color);
}

/* ============ PAGE D'ERREUR ============ */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient-light);
    text-align: center;
    padding: var(--space-4);
}

.error-card {
    background: var(--bg-primary);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
}

.error-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: var(--space-4);
    color: var(--error);
}

.error-title {
    font-size: var(--font-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

/* Ne pas nommer cette classe .error-message : ce nom est déjà pris par
   components.css pour les erreurs de champ du formulaire, en position
   absolue. La collision éjectait ce paragraphe en bas de la fenêtre. */
.error-card__texte {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.contact-alternatives {
    background: var(--bg-gradient-light);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    text-align: left;
}

.contact-item {
    margin: var(--space-2) 0;
}

.error__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}
