/* ========================================= */
/* FRENCH CODE STUDIO - PAGES LÉGALES        */
/* CSS mutualisé : Mentions légales,         */
/* Politique de confidentialité, CGV         */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Lato:wght@300;400;600;700&display=swap');

/* ========================================= */
/* 1. VARIABLES CSS                          */
/* ========================================= */

:root {
    /* Couleurs */
    --color-primary:        #2C3E50;
    --color-secondary:      #34495E;
    --color-accent:         #D4AF37;
    --color-accent-light:   #E8C468;
    --color-background:     #FAF9F6;
    --color-card:           #FFFFFF;
    --color-text:           #2C3E50;
    --color-text-light:     #6C7A89;
    --color-border:         #E5E5E5;

    /* Typographie */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Lato', 'Helvetica Neue', sans-serif;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Bordures */
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Ombres */
    --shadow-sm: 0 2px 8px  rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.16);

    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================= */
/* 2. RESET ET BASE                          */
/* ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================= */
/* 3. BOUTON RETOUR (commun)                 */
/* ========================================= */

.back-button-fixed {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
}

.back-button-fixed .back-link,
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    font-size: 2rem;
    color: var(--color-primary);
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.back-button-fixed .back-link:hover,
.back-link:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================= */
/* 4. CONTAINER PRINCIPAL (commun)           */
/* ========================================= */

/* Mentions légales & Politique */
main.container {
    max-width: 900px;
    margin: 60px auto;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
}


/* CGV : layout sans card globale */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 5%;
}

/* ========================================= */
/* 5. TITRES H1 / H2 (commun)               */
/* ========================================= */

h1, h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: var(--spacing-md);
}

h1::after {
    content: '';
    display: block;
    margin: var(--spacing-sm) auto 0;
    width: 80px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

h2 {
    font-size: 1.3rem;
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
    position: relative;
    padding-left: var(--spacing-sm);
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 4px;
    height: 1.2em;
    background: var(--color-accent);
    border-radius: 2px;
}

/* ========================================= */
/* 6. TEXTE, PARAGRAPHES ET LISTES (commun)  */
/* ========================================= */

p, li {
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

p:last-child,
li:last-child {
    margin-bottom: 0;
}

ul, ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

li {
    margin-bottom: var(--spacing-sm);
    padding-left: 0.5rem;
}

li::marker {
    color: var(--color-accent);
}

strong {
    color: var(--color-primary);
    font-weight: 600;
}

.email-text {
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 0.5px;
    word-break: break-all;
}

/* ========================================= */
/* 7. FOOTER (commun)                        */
/* ========================================= */

.site-footer {
    text-align: center;
    padding: var(--spacing-lg) 5%;
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
}

/* Footer spécifique CGV */
.cgv-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
    color: var(--color-text-light);
}

.cgv-footer p {
    margin-bottom: 0.5rem;
}

.cgv-footer strong {
    color: var(--color-primary);
}

.update-date {
    font-style: italic;
    color: var(--color-text-light);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* ========================================= */
/* 8. HEADER CGV (spécifique)                */
/* ========================================= */

.cgv-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--color-accent);
    animation: fadeInUp 0.6s ease-out backwards;
}

.cgv-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.cgv-subtitle {
    color: var(--color-text-light);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ========================================= */
/* 9. INTRO CGV (spécifique)                 */
/* ========================================= */

.cgv-intro {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.cgv-intro p {
    margin: 0;
}

.cgv-intro strong {
    color: var(--color-accent);
}

/* ========================================= */
/* 10. CONTENU CGV (spécifique)              */
/* ========================================= */

.cgv-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* ========================================= */
/* 11. SECTIONS CGV (spécifique)             */
/* ========================================= */

.cgv-section {
    margin-bottom: 3rem;
}

.cgv-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cgv-section p {
    text-align: justify;
}

/* ========================================= */
/* 12. ENCADRÉS CGV (spécifique)             */
/* ========================================= */

.highlight-box {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--color-accent);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
}

.highlight-box strong {
    color: var(--color-accent);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.8rem;
}

.highlight-box ul {
    margin-top: 0.8rem;
}

.important-notice {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(232, 196, 104, 0.15) 100%);
    border: 2px solid var(--color-accent);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    text-align: center;
}

.important-notice i {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: block;
}

.important-notice h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.important-notice p {
    text-align: center;
    margin-bottom: 0.5rem;
}

.important-notice strong {
    color: var(--color-accent);
}

/* ========================================= */
/* 13. ANIMATIONS                            */
/* ========================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main.container {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================= */
/* 14. RESPONSIVE                            */
/* ========================================= */
/*
   Breakpoints :
   - 1024px : tablette paysage
   - 768px  : tablette portrait / grands mobiles
   - 600px  : mobiles moyens
   - 480px  : petits mobiles
*/

/* ---- Tablette paysage (≤ 1024px) ---- */
@media (max-width: 1024px) {
    main.container {
        max-width: 800px;
        padding: 2rem;
        margin: 40px auto;
    }

    .container {
        padding: 3rem 6%;
    }

    .cgv-content {
        padding: 2.5rem;
    }
}

/* ---- Tablette portrait / grands mobiles (≤ 768px) ---- */
@media (max-width: 768px) {

    /* Bouton retour */
    .back-button-fixed {
        top: 20px;
        left: 20px;
    }

    .back-button-fixed .back-link,
    .back-link {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    /* Mentions & Politique */
    main.container {
        margin: 30px 16px;
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: var(--radius-lg);
    }

    /* CGV */
    .container {
        padding: 2rem 5%;
    }

    .cgv-content {
        padding: 1.5rem;
    }

    .cgv-intro {
        padding: 1.5rem;
    }

    .cgv-section ul {
        margin-left: 1rem;
    }

    /* Justification désactivée sur mobile (lisibilité) */
    .cgv-section p {
        text-align: left;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .cgv-title {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    .highlight-box {
        padding: 1rem;
    }

    .important-notice {
        padding: 1.5rem;
    }

    /* Typographie commune */
    h1 {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    h2 {
        font-size: 1.15rem;
    }

    p, li {
        font-size: 1rem;
    }

    /* Footer */
    .site-footer {
        margin-top: var(--spacing-lg);
        padding: var(--spacing-md) 5%;
    }
}

/* ---- Mobiles moyens (≤ 600px) ---- */
@media (max-width: 600px) {

    main.container {
        margin: 20px 12px;
        padding: var(--spacing-md) var(--spacing-sm);
        border-radius: var(--radius-md);
    }

    h1 {
        font-size: clamp(1.4rem, 6vw, 1.7rem);
    }

    h2 {
        font-size: 1.05rem;
        margin: var(--spacing-md) 0 var(--spacing-xs) 0;
    }

    .cgv-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .cgv-section {
        margin-bottom: 2rem;
    }

    .important-notice {
        padding: 1.2rem;
    }

    .important-notice i {
        font-size: 1.6rem;
    }

    .important-notice h3 {
        font-size: 1.1rem;
    }
}

/* ---- Petits mobiles (≤ 480px) ---- */
@media (max-width: 480px) {

    /* Bouton retour */
    .back-button-fixed {
        top: 15px;
        left: 15px;
    }

    .back-button-fixed .back-link,
    .back-link {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    /* Mentions & Politique */
    main.container {
        margin: 12px 8px;
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }

    /* CGV */
    .container {
        padding: 1.5rem 4%;
    }

    .cgv-content {
        padding: 1rem;
    }

    .section-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    /* Typographie commune */
    h1 {
        font-size: clamp(1.3rem, 7vw, 1.5rem);
    }

    h2 {
        font-size: 1rem;
        padding-left: var(--spacing-xs);
    }

    h2::before {
        width: 3px;
    }

    p, li {
        font-size: 0.95rem;
    }

    ul, ol {
        margin-left: var(--spacing-md);
    }

    /* Footer */
    .site-footer {
        font-size: 0.85rem;
        padding: var(--spacing-sm) 4%;
    }
}

/* ========================================= */
/* 15. ACCESSIBILITÉ                         */
/* ========================================= */

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

a:focus,
button:focus,
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

::selection {
    background: var(--color-accent-light);
    color: white;
}

::-webkit-scrollbar       { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-background); }
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-light); }

/* ========================================= */
/* 16. IMPRESSION                            */
/* ========================================= */

@media print {
    .back-button-fixed {
        display: none;
    }

    .cgv-content,
    .cgv-intro,
    main.container {
        box-shadow: none;
        border: 1px solid var(--color-border);
    }

    .cgv-section {
        page-break-inside: avoid;
    }

    body {
        background: white;
    }
}