/* =========================================================
   SITE DYMO SHOP - CONDITIONS GÉNÉRALES DE VENTE
   cgv.css
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    /* Branding SiteDymo Shop */
    --cgv-primary: #16a34a;
    --cgv-primary-dark: #15803d;
    --cgv-primary-darker: #166534;

    --cgv-primary-light: #f0fdf4;
    --cgv-primary-soft: #dcfce7;
    --cgv-primary-border: #bbf7d0;

    --cgv-text: #111827;
    --cgv-text-soft: #374151;
    --cgv-muted: #6b7280;

    --cgv-border: #e5e7eb;
    --cgv-background: #f8fafc;
    --cgv-white: #ffffff;

    --cgv-success: #16a34a;

    --cgv-radius-sm: 8px;
    --cgv-radius-md: 14px;
    --cgv-radius-lg: 20px;

    --cgv-shadow-sm:
        0 4px 15px rgba(15, 23, 42, 0.05);

    --cgv-shadow-md:
        0 10px 30px rgba(15, 23, 42, 0.07);

    --cgv-shadow-lg:
        0 20px 50px rgba(15, 23, 42, 0.09);
}


/* =========================================================
   RESET LOCAL
   ========================================================= */

.cgv-page,
.cgv-page * {
    box-sizing: border-box;
}


/* =========================================================
   PAGE PRINCIPALE
   ========================================================= */

.cgv-page {
    min-height: 100vh;

    padding: 40px 20px 80px;

    background:
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #ffffff 45%,
            #f8fafc 100%
        );

    color: var(--cgv-text);

    font-family: "Inter", sans-serif;
}


/* =========================================================
   HERO
   ========================================================= */

.cgv-hero {
    max-width: 1200px;

    margin: 0 auto 30px;

    min-height: 230px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    padding: 45px 50px;

    border-radius: var(--cgv-radius-lg);

    /*
     * Branding vert SiteDymo
     */
    background:
        linear-gradient(
            135deg,
            #052e16 0%,
            #14532d 45%,
            #16a34a 100%
        );

    color: #ffffff;

    box-shadow:
        0 20px 50px rgba(
            22,
            163,
            74,
            0.18
        );

    overflow: hidden;

    position: relative;
}


/*
 * Effet lumineux principal
 */

.cgv-hero::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    right: -100px;
    top: -140px;

    border-radius: 50%;

    background:
        rgba(134, 239, 172, 0.14);

    pointer-events: none;
}


/*
 * Effet décoratif secondaire
 */

.cgv-hero::after {
    content: "";

    position: absolute;

    width: 200px;
    height: 200px;

    left: 45%;
    bottom: -135px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.06);

    pointer-events: none;
}


.cgv-hero-content {
    position: relative;

    z-index: 2;

    max-width: 760px;
}


.cgv-eyebrow {
    display: inline-block;

    margin-bottom: 12px;

    color: #bbf7d0;

    font-size: 0.78rem;

    font-weight: 800;

    letter-spacing: 0.14em;
}


.cgv-hero h1 {
    margin: 0 0 14px;

    color: #ffffff;

    font-size: clamp(
        2rem,
        4vw,
        3.1rem
    );

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -0.03em;
}


.cgv-hero p {
    margin: 0;

    max-width: 680px;

    color: #dcfce7;

    font-size: 1rem;

    line-height: 1.7;
}


/* =========================================================
   ICÔNE HERO
   ========================================================= */

.cgv-hero-icon {
    position: relative;

    z-index: 2;

    width: 100px;
    height: 100px;

    flex: 0 0 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background:
        rgba(255, 255, 255, 0.11);

    border:
        1px solid rgba(
            187,
            247,
            208,
            0.25
        );

    color: #dcfce7;

    font-size: 3rem;

    backdrop-filter: blur(8px);

    box-shadow:
        0 10px 35px rgba(
            0,
            0,
            0,
            0.12
        );
}


/* =========================================================
   FIL D'ARIANE
   ========================================================= */

.cgv-breadcrumb {
    max-width: 1200px;

    margin: 0 auto 30px;

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    color: var(--cgv-muted);

    font-size: 0.9rem;
}


.cgv-breadcrumb a {
    color: var(--cgv-primary);

    text-decoration: none;

    font-weight: 600;

    transition:
        color 0.2s ease;
}


.cgv-breadcrumb a:hover {
    color: var(--cgv-primary-dark);
}


.cgv-breadcrumb span {
    color: #9ca3af;
}


/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */

.cgv-layout {
    max-width: 1200px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        260px minmax(0, 1fr);

    gap: 30px;

    align-items: start;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.cgv-sidebar {
    position: sticky;

    top: 100px;
}


.cgv-sidebar-card {
    padding: 24px;

    background: var(--cgv-white);

    border: 1px solid var(--cgv-border);

    border-radius: var(--cgv-radius-md);

    box-shadow: var(--cgv-shadow-sm);
}


.cgv-sidebar-card h2 {
    margin: 0 0 18px;

    color: var(--cgv-text);

    font-size: 1.05rem;

    font-weight: 800;
}


.cgv-sidebar nav {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


.cgv-sidebar nav a {
    display: block;

    padding: 10px 12px;

    border-radius: var(--cgv-radius-sm);

    color: var(--cgv-text-soft);

    text-decoration: none;

    font-size: 0.9rem;

    line-height: 1.4;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        padding-left 0.2s ease,
        box-shadow 0.2s ease;
}


.cgv-sidebar nav a:hover {
    background: var(--cgv-primary-light);

    color: var(--cgv-primary);

    padding-left: 16px;
}


.cgv-sidebar nav a.active {
    background:
        linear-gradient(
            90deg,
            var(--cgv-primary-soft),
            var(--cgv-primary-light)
        );

    color: var(--cgv-primary-dark);

    font-weight: 700;

    padding-left: 18px;

    box-shadow:
        inset 3px 0 0 var(--cgv-primary);
}


/* =========================================================
   DOCUMENT
   ========================================================= */

.cgv-document {
    min-width: 0;

    background: var(--cgv-white);

    border: 1px solid var(--cgv-border);

    border-radius: var(--cgv-radius-lg);

    box-shadow: var(--cgv-shadow-md);

    overflow: hidden;
}


/* =========================================================
   EN-TÊTE DU DOCUMENT
   ========================================================= */

.cgv-document-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding: 30px 35px;

    border-bottom: 1px solid var(--cgv-border);

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f9fafb
        );
}


.document-label {
    display: inline-block;

    margin-bottom: 7px;

    color: var(--cgv-primary);

    font-size: 0.72rem;

    font-weight: 800;

    letter-spacing: 0.12em;
}


.cgv-document-header h2 {
    margin: 0;

    color: var(--cgv-text);

    font-size: 1.55rem;

    line-height: 1.3;

    font-weight: 800;
}


.last-update {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 4px;

    flex-shrink: 0;
}


.last-update span {
    color: var(--cgv-muted);

    font-size: 0.78rem;
}


.last-update strong {
    color: var(--cgv-text);

    font-size: 0.9rem;
}


/* =========================================================
   ARTICLES CGV
   ========================================================= */

.cgv-item {
    display: grid;

    grid-template-columns:
        58px minmax(0, 1fr);

    gap: 20px;

    padding: 34px 35px;

    border-bottom: 1px solid var(--cgv-border);

    opacity: 0;

    transform: translateY(18px);

    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        background 0.25s ease;
}


.cgv-item.cgv-item-visible {
    opacity: 1;

    transform: translateY(0);
}


.cgv-item:hover {
    background: #fcfffd;
}


/* =========================================================
   NUMÉRO DES ARTICLES
   ========================================================= */

.cgv-number {
    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            var(--cgv-primary-soft),
            var(--cgv-primary-light)
        );

    color: var(--cgv-primary-dark);

    border: 1px solid var(--cgv-primary-border);

    font-size: 0.82rem;

    font-weight: 800;
}


/* =========================================================
   CONTENU DES ARTICLES
   ========================================================= */

.cgv-item-content {
    min-width: 0;
}


.cgv-item-content h2 {
    margin: 0 0 14px;

    color: var(--cgv-text);

    font-size: 1.25rem;

    line-height: 1.35;

    font-weight: 800;
}


.cgv-item-content p {
    margin: 0 0 12px;

    color: var(--cgv-text-soft);

    font-size: 0.96rem;

    line-height: 1.8;
}


.cgv-item-content p:last-child {
    margin-bottom: 0;
}


.cgv-item-content a {
    color: var(--cgv-primary);

    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.2s ease;
}


.cgv-item-content a:hover {
    color: var(--cgv-primary-dark);

    text-decoration: underline;
}


/* =========================================================
   BLOC CONTACT
   ========================================================= */

.cgv-contact {
    display: flex;

    align-items: center;

    gap: 22px;

    margin: 30px 35px;

    padding: 26px;

    border: 1px solid var(--cgv-primary-border);

    border-radius: var(--cgv-radius-md);

    background:
        linear-gradient(
            135deg,
            var(--cgv-primary-light),
            #f8fffa
        );
}


.cgv-contact-icon {
    width: 56px;
    height: 56px;

    flex: 0 0 56px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    background: var(--cgv-primary-soft);

    border: 1px solid var(--cgv-primary-border);

    color: var(--cgv-primary-dark);

    font-size: 1.6rem;
}


.cgv-contact h2 {
    margin: 0 0 7px;

    color: var(--cgv-text);

    font-size: 1.1rem;

    font-weight: 800;
}


.cgv-contact p {
    margin: 0 0 16px;

    color: var(--cgv-text-soft);

    font-size: 0.9rem;

    line-height: 1.6;
}


.cgv-contact-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    padding: 11px 18px;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            var(--cgv-primary),
            var(--cgv-primary-dark)
        );

    color: #ffffff;

    text-decoration: none;

    font-size: 0.88rem;

    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.cgv-contact-btn:hover {
    background:
        linear-gradient(
            135deg,
            var(--cgv-primary-dark),
            var(--cgv-primary-darker)
        );

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(
            22,
            163,
            74,
            0.24
        );
}


.cgv-contact-btn span {
    font-size: 1.1rem;

    transition:
        transform 0.2s ease;
}


.cgv-contact-btn:hover span {
    transform: translateX(3px);
}


/* =========================================================
   BOUTON RETOUR EN HAUT
   ========================================================= */

.cgv-back-to-top {
    position: fixed;

    right: 24px;

    bottom: 24px;

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--cgv-primary),
            var(--cgv-primary-dark)
        );

    color: #ffffff;

    font-size: 20px;

    font-weight: 700;

    cursor: pointer;

    opacity: 0;

    visibility: hidden;

    transform: translateY(15px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background 0.2s ease;

    box-shadow:
        0 8px 20px rgba(
            22,
            163,
            74,
            0.25
        );

    z-index: 1000;
}


.cgv-back-to-top.show {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}


.cgv-back-to-top:hover {
    background:
        linear-gradient(
            135deg,
            var(--cgv-primary-dark),
            var(--cgv-primary-darker)
        );

    transform: translateY(-3px);
}


/* =========================================================
   ÉTAT DES LIENS EN CHARGEMENT
   ========================================================= */

.cgv-link-loading {
    opacity: 0.6;

    pointer-events: none;
}


/* =========================================================
   FOCUS ACCESSIBLE
   ========================================================= */

.cgv-sidebar nav a:focus-visible,
.cgv-contact-btn:focus-visible,
.cgv-item-content a:focus-visible,
.cgv-back-to-top:focus-visible {
    outline: 3px solid #86efac;

    outline-offset: 3px;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1000px) {

    .cgv-layout {
        grid-template-columns:
            220px minmax(0, 1fr);

        gap: 20px;
    }


    .cgv-hero {
        padding: 40px;
    }


    .cgv-document-header,
    .cgv-item {
        padding-left: 28px;

        padding-right: 28px;
    }


    .cgv-contact {
        margin-left: 28px;

        margin-right: 28px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .cgv-page {
        padding:
            20px 14px 60px;
    }


    .cgv-hero {
        min-height: auto;

        padding: 30px 24px;

        flex-direction: column;

        align-items: flex-start;

        gap: 24px;

        border-radius: 16px;
    }


    .cgv-hero h1 {
        font-size: 2rem;
    }


    .cgv-hero p {
        font-size: 0.92rem;
    }


    .cgv-hero-icon {
        width: 70px;
        height: 70px;

        flex-basis: 70px;

        border-radius: 18px;

        font-size: 2.1rem;
    }


    .cgv-breadcrumb {
        margin-bottom: 20px;

        font-size: 0.82rem;
    }


    .cgv-layout {
        display: block;
    }


    .cgv-sidebar {
        position: static;

        margin-bottom: 20px;
    }


    .cgv-sidebar-card {
        padding: 18px;
    }


    .cgv-sidebar nav {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 5px;
    }


    .cgv-sidebar nav a {
        font-size: 0.8rem;

        padding: 9px;
    }


    .cgv-sidebar nav a:hover,
    .cgv-sidebar nav a.active {
        padding-left: 9px;
    }


    .cgv-document {
        border-radius: 15px;
    }


    .cgv-document-header {
        padding: 24px 20px;

        flex-direction: column;

        align-items: flex-start;
    }


    .cgv-document-header h2 {
        font-size: 1.3rem;
    }


    .last-update {
        align-items: flex-start;
    }


    .cgv-item {
        grid-template-columns: 1fr;

        gap: 15px;

        padding: 26px 20px;
    }


    .cgv-number {
        width: 42px;
        height: 42px;

        border-radius: 12px;
    }


    .cgv-item-content h2 {
        font-size: 1.12rem;
    }


    .cgv-item-content p {
        font-size: 0.92rem;

        line-height: 1.75;
    }


    .cgv-contact {
        margin: 20px;

        padding: 20px;

        flex-direction: column;

        align-items: flex-start;

        gap: 16px;
    }


    .cgv-contact h2 {
        font-size: 1rem;
    }


    .cgv-contact p {
        font-size: 0.86rem;
    }


    .cgv-back-to-top {
        right: 16px;

        bottom: 16px;

        width: 42px;

        height: 42px;
    }

}


/* =========================================================
   PETITS ÉCRANS
   ========================================================= */

@media (max-width: 480px) {

    .cgv-page {
        padding-left: 10px;

        padding-right: 10px;
    }


    .cgv-hero {
        padding: 26px 20px;
    }


    .cgv-hero h1 {
        font-size: 1.7rem;
    }


    .cgv-eyebrow {
        font-size: 0.68rem;
    }


    .cgv-sidebar nav {
        grid-template-columns: 1fr;
    }


    .cgv-document-header {
        padding: 20px 16px;
    }


    .cgv-item {
        padding: 23px 16px;
    }


    .cgv-contact {
        margin: 16px;
    }


    .cgv-contact-btn {
        width: 100%;
    }

}


/* =========================================================
   RÉDUCTION DES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cgv-item,
    .cgv-sidebar nav a,
    .cgv-contact-btn,
    .cgv-contact-btn span,
    .cgv-back-to-top {
        transition: none !important;
    }


    .cgv-item {
        opacity: 1;

        transform: none;
    }

}