/**
 * Page Mentions Légales - Styles
 *
 * Styles dédiés à la page des mentions légales.
 * Design Premium FLP avec éléments de confiance et navigation intuitive.
 *
 * @package Forever_BE_Premium
 * @since 2.0.0
 * @version 2.0.0
 *
 * Expert CSS : Thomas ERIKSSON
 */

/* ==========================================================================
   Variables CSS (héritage du thème parent si disponible)
   ========================================================================== */
:root {
    --flp-green: #1e5a3e;
    --flp-green-light: #2d8659;
    --flp-gold: #fbbf24;
    --flp-cream: #f0fdf4;
}

/* ==========================================================================
   Breadcrumb Navigation (SEO)
   ========================================================================== */
.breadcrumb-nav {
    background: var(--flp-cream);
    padding: 0.75rem 1.5rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumb-list a {
    color: var(--flp-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover,
.breadcrumb-list a:focus {
    color: var(--flp-green-light);
    text-decoration: underline;
}

.breadcrumb-list li:last-child span {
    color: #6b7280;
}

/* ==========================================================================
   Hero Section - Mentions Légales
   ========================================================================== */
.mentions-hero {
    background: linear-gradient(135deg, var(--flp-green) 0%, var(--flp-green-light) 50%, #34d399 100%);
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.mentions-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5C15 5 5 15 5 30s10 25 25 25 25-10 25-25S45 5 30 5zm0 45c-11 0-20-9-20-20s9-20 20-20 20 9 20 20-9 20-20 20z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.mentions-hero-content {
    position: relative;
    z-index: 1;
}

.mentions-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.mentions-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.mentions-hero-subtitle {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.7;
}

/* ==========================================================================
   Trust Badges - Éléments de confiance
   ========================================================================== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    fill: var(--flp-gold);
}

/* Date de mise à jour */
.update-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

/* ==========================================================================
   Sommaire Navigation (Table of Contents)
   ========================================================================== */
.toc-nav {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--flp-green);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.toc-link:hover,
.toc-link:focus {
    background: var(--flp-cream);
    color: var(--flp-green);
    transform: translateX(5px);
    outline: none;
}

.toc-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(30, 90, 62, 0.3);
}

.toc-link span {
    font-size: 1.1rem;
}

/* ==========================================================================
   Section Engagements
   ========================================================================== */
.engagements-section {
    background: linear-gradient(135deg, #fff 0%, var(--flp-cream) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 2px solid #bbf7d0;
}

.engagements-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--flp-green);
    margin-bottom: 2rem;
}

.engagements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.engagement-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.engagement-item:hover {
    transform: translateY(-5px);
}

.engagement-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--flp-green), var(--flp-green-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.engagement-label {
    font-weight: 600;
    color: var(--flp-green);
    font-size: 0.95rem;
}

/* ==========================================================================
   Micro CTA
   ========================================================================== */
.micro-cta {
    background: var(--flp-cream);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.micro-cta-text {
    color: var(--flp-green);
    font-weight: 500;
}

.micro-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--flp-green);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.micro-cta-btn:hover,
.micro-cta-btn:focus {
    background: var(--flp-green-light);
    transform: translateY(-2px);
    color: white;
}

/* ==========================================================================
   Content Container
   ========================================================================== */
.mentions-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* ==========================================================================
   Info Cards Grid
   ========================================================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--flp-green), var(--flp-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 90, 62, 0.12);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--flp-cream);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--flp-green);
    margin-bottom: 1rem;
}

.card-content {
    color: #4b5563;
    line-height: 1.8;
}

.card-content p {
    margin-bottom: 0.75rem;
}

.card-content strong {
    color: #1f2937;
}

.card-content a {
    color: var(--flp-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.card-content a:hover,
.card-content a:focus {
    color: var(--flp-gold);
}

/* ==========================================================================
   Legal Sections
   ========================================================================== */
.legal-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    scroll-margin-top: 2rem; /* Pour le scroll des ancres */
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--flp-cream);
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--flp-green), var(--flp-green-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--flp-green);
    margin: 0;
}

.legal-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.legal-section ul li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.legal-section ul li:last-child {
    border-bottom: none;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--flp-green);
    border-radius: 50%;
}

/* ==========================================================================
   Philosophy Banner
   ========================================================================== */
.philosophy-banner {
    background: linear-gradient(135deg, var(--flp-cream) 0%, #dcfce7 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    text-align: center;
    border: 2px solid #bbf7d0;
}

.philosophy-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.philosophy-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--flp-green);
    margin-bottom: 1rem;
}

.philosophy-text {
    color: #166534;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ==========================================================================
   Certification Grid
   ========================================================================== */
.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.cert-item {
    text-align: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cert-item:hover {
    background: var(--flp-cream);
    transform: translateY(-4px);
}

.cert-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.cert-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--flp-green);
}

/* ==========================================================================
   Related Legal Pages - Maillage Interne SEO
   ========================================================================== */
.related-legal-pages {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2rem;
    border: 1px solid #e2e8f0;
}

.related-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--flp-green);
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.related-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.related-link:hover,
.related-link:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 90, 62, 0.1);
    border-color: var(--flp-green);
}

.related-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.related-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.related-content strong {
    color: var(--flp-green);
    font-size: 1rem;
}

.related-content span {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ==========================================================================
   Contact CTA
   ========================================================================== */
.contact-cta {
    background: linear-gradient(135deg, var(--flp-green) 0%, var(--flp-green-light) 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    color: white;
    margin-top: 3rem;
}

.contact-cta h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-cta p {
    opacity: 0.95;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--flp-gold);
    color: var(--flp-green);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cta-btn-primary:hover,
.cta-btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--flp-green);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-btn-secondary:hover,
.cta-btn-secondary:focus {
    background: white;
    color: var(--flp-green);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .mentions-hero {
        padding: 4rem 1rem 3rem;
    }

    .mentions-content {
        padding: 2rem 1rem;
    }

    .info-card,
    .legal-section {
        padding: 1.75rem;
    }

    .philosophy-banner {
        padding: 2rem 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        gap: 0.75rem;
    }

    .trust-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .engagements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .micro-cta {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mentions-hero h1 {
        font-size: 1.75rem;
    }

    .mentions-hero-subtitle {
        font-size: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .engagements-grid {
        grid-template-columns: 1fr;
    }

    .certification-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Accessibility - Focus States
   ========================================================================== */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--flp-gold);
    outline-offset: 2px;
}

/* Smooth scroll pour les ancres */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Contain pour isolation du rendu - améliore les performances de peinture */
.legal-section,
.info-card,
.engagement-item,
.cert-item {
    contain: layout style;
}

/* Will-change pour optimiser les animations GPU */
.info-card,
.toc-link,
.engagement-item,
.cert-item,
.cta-btn-primary,
.cta-btn-secondary,
.related-link {
    will-change: transform;
}

/* Optimisation backdrop-filter pour mobile */
@supports (backdrop-filter: blur(10px)) {
    .trust-badge,
    .mentions-hero-badge {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Fallback sans backdrop-filter pour performances */
@supports not (backdrop-filter: blur(10px)) {
    .trust-badge,
    .mentions-hero-badge {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* Content-visibility pour lazy rendering des sections hors viewport */
.legal-section:nth-child(n+3) {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .info-card,
    .toc-link,
    .engagement-item,
    .cert-item,
    .cta-btn-primary,
    .cta-btn-secondary,
    .related-link {
        will-change: auto;
    }
}

/* ==========================================================================
   CLS (Cumulative Layout Shift) Prevention
   ========================================================================== */

/* Réserver l'espace pour les icônes */
.card-icon,
.section-icon,
.engagement-icon {
    aspect-ratio: 1;
    min-height: 50px;
}

/* Dimensions fixes pour éviter le layout shift */
.mentions-hero {
    min-height: 350px;
}

.toc-nav {
    min-height: 180px;
}

.engagements-section {
    min-height: 200px;
}

/* Font-display pour les polices personnalisées */
@font-face {
    font-display: swap;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .mentions-hero {
        background: #1e5a3e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        min-height: auto;
    }

    .trust-badges,
    .toc-nav,
    .contact-cta,
    .micro-cta,
    .related-legal-pages,
    .breadcrumb-nav {
        display: none !important;
    }

    .info-card,
    .legal-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        contain: unset;
    }

    .mentions-content {
        max-width: 100%;
        padding: 1rem;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="mailto:"]::after,
    a[href^="tel:"]::after {
        content: "";
    }
}

/* ==========================================================================
   High Contrast Mode Support
   ========================================================================== */
@media (prefers-contrast: high) {
    .info-card,
    .legal-section,
    .toc-nav {
        border-width: 2px;
        border-color: #000;
    }

    .cta-btn-primary,
    .cta-btn-secondary,
    .micro-cta-btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   EXPLICIT DARK MODE - html.dark CLASS
   ========================================================================== */
html.dark .mentions-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html.dark .mentions-content {
    background: #0f172a;
    color: #f1f5f9;
}

html.dark .toc-nav {
    background: #1e293b;
}

html.dark .toc-title {
    color: #f1f5f9;
}

html.dark .toc-link {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

html.dark .toc-link:hover {
    background: #006241;
    color: white;
    border-color: #006241;
}

html.dark .info-card,
html.dark .legal-section {
    background: #1e293b;
    border-color: #475569;
}

html.dark .info-card:hover,
html.dark .legal-section:hover {
    border-color: #006241;
    box-shadow: 0 4px 20px rgba(0, 98, 65, 0.2);
}

html.dark .card-title,
html.dark .section-title,
html.dark .legal-title {
    color: #f1f5f9;
}

html.dark .card-text,
html.dark .legal-text,
html.dark p {
    color: #cbd5e1;
}

html.dark h3 {
    color: #D4A853;
}

html.dark .highlight-box {
    background: rgba(0, 98, 65, 0.15);
    border-color: #006241;
    color: #d4edda;
}

html.dark .warning-box {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fef3c7;
}

html.dark .card-icon,
html.dark .section-icon {
    background: rgba(0, 98, 65, 0.2);
    color: #D4A853;
}

html.dark .trust-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .engagements-section {
    background: #1e293b;
}

html.dark .engagement-card {
    background: #334155;
    color: #f1f5f9;
}

html.dark .cta-btn-primary {
    background: #006241;
}

html.dark .cta-btn-primary:hover {
    background: #004d33;
}

html.dark .cta-btn-secondary {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

html.dark .cta-btn-secondary:hover {
    background: #475569;
}

html.dark .contact-cta {
    background: linear-gradient(135deg, #006241 0%, #004d33 100%);
}

html.dark .related-legal-pages {
    background: #1e293b;
}

html.dark .related-page-link {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

html.dark .related-page-link:hover {
    background: rgba(0, 98, 65, 0.2);
    border-color: #006241;
    color: #D4A853;
}

html.dark a {
    color: #D4A853;
}

html.dark a:hover {
    color: #f0d78c;
}
