/* ============================================================
   Déclic-e média — Page CGV
   ============================================================ */

/* ── Hero (hérite de legal-hero, surcharge l'image) ──────── */
.cgv-hero {
    background-image: url('../images/mentions_legale.jpg');
}

/* ── Layout principal ─────────────────────────────────────── */
.cgv-main { padding: 3rem 0 4rem; background: var(--gris-clair); }
.cgv-container {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 3rem;
    align-items: start;
}

/* ── Contenu CGV ──────────────────────────────────────────── */
.cgv-content {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: hidden;
}
.cgv-content h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bleu);
    margin: 1.75rem 0 .6rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--bleu-soft);
}
.cgv-content h2:first-child { margin-top: 0; }
.cgv-content h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--texte);
    margin: 1.1rem 0 .4rem;
}
.cgv-content p {
    font-size: .875rem;
    color: var(--gris-texte);
    line-height: 1.8;
    margin: 0 0 .75rem;
}
.cgv-content ul, .cgv-content ol {
    font-size: .875rem;
    color: var(--gris-texte);
    line-height: 1.8;
    margin: .4rem 0 .75rem 1.25rem;
    padding: 0;
}
.cgv-content a { color: var(--bleu); }
.cgv-content a:hover { color: var(--orange); }
.cgv-content strong { color: var(--texte); }

/* ── Colonne meta ─────────────────────────────────────────── */
.cgv-meta { display: flex; flex-direction: column; gap: 1rem; }

.cgv-meta-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 10px rgba(27,74,138,.06);
    border-left: 3px solid var(--bleu);
}
.cgv-meta-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--bleu);
    margin: 0 0 .5rem;
}
.cgv-meta-version {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bleu);
    margin: 0 0 .25rem;
    line-height: 1;
}
.cgv-meta-date {
    font-size: .82rem;
    color: var(--gris-texte);
    margin: 0 0 .5rem;
    line-height: 1.5;
}
.cgv-meta-note {
    font-size: .78rem;
    color: var(--orange);
    font-style: italic;
    margin: .5rem 0 0;
    padding-top: .5rem;
    border-top: 1px solid var(--bordure);
}
.cgv-contact-card { border-left-color: var(--orange); }

/* ── Bannière version archivée ────────────────────────────── */
.cgv-archive-banner {
    margin-top: 1rem;
    padding: .55rem 1rem;
    background: rgba(255, 200, 100, .6);
    border: 1px solid rgba(255,160,50,.5);
    border-radius: 8px;
    font-size: .82rem;
    color: #7a4800;
}
.cgv-archive-banner a { color: var(--bleu); font-weight: 600; margin-left: .4rem; }

/* ── Historique dans l'aside ──────────────────────────────── */
.cgv-history-card { border-left-color: var(--gris-medium); }

.cgv-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cgv-history-list li {
    padding: .55rem 0;
    border-bottom: 1px solid var(--bordure);
}
.cgv-history-list li:last-child { border-bottom: none; }
.cgv-history-list li.cgv-history-active .cgv-history-ver { color: var(--bleu); }
.cgv-history-list li.cgv-history-current { background: var(--bleu-soft); margin: 0 -.5rem; padding: .55rem .5rem; border-radius: 6px; }

.cgv-history-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    flex-wrap: wrap;
    overflow: hidden;
}
.cgv-history-ver  { font-weight: 700; min-width: 28px; color: var(--texte); }
.cgv-history-date { flex: 1; color: var(--gris-medium); font-size: .78rem; }

.cgv-history-badge {
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 10px;
    background: #d1fae5;
    color: #065f46;
    white-space: nowrap;
}
.cgv-history-badge.cgv-badge-viewing {
    background: var(--bleu-soft);
    color: var(--bleu);
}
.cgv-history-link {
    font-size: .75rem;
    color: var(--bleu);
    text-decoration: underline;
    white-space: nowrap;
}
.cgv-history-link:hover { color: var(--orange); }

.cgv-history-note {
    font-size: .72rem;
    color: var(--gris-medium);
    font-style: italic;
    margin: .2rem 0 0 28px;
}

/* ── Bouton PDF inline ────────────────────────────────────── */
.cgv-pdf-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .85rem;
    padding: 0 2px;
    opacity: .55;
    transition: opacity .15s;
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
}
.cgv-pdf-btn:hover { opacity: 1; }
.cgv-pdf-btn:disabled { cursor: wait; opacity: .3; }

/* ── Bloc historique sous le contenu ─────────────────────── */
.cgv-versions-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--bordure);
    padding-bottom: 2rem;
}
.cgv-versions-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--bleu);
    margin: 0 0 1rem;
}
.cgv-versions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.cgv-version-item {
    background: #fff;
    border-radius: 10px;
    padding: .85rem 1rem;
    box-shadow: 0 2px 8px rgba(27,74,138,.06);
    border-left: 3px solid var(--bordure);
    min-width: 160px;
    flex: 1 1 160px;
    max-width: 240px;
}
.cgv-version-item.cgv-version-active  { border-left-color: var(--bleu); }
.cgv-version-item.cgv-version-viewing { border-left-color: var(--orange); background: #fffbf5; }
.cgv-version-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .3rem;
}
.cgv-version-date {
    font-size: .78rem;
    color: var(--gris-medium);
    margin: 0;
}

/* ── Vide ─────────────────────────────────────────────────── */
.cgv-empty {
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: var(--gris-texte);
    box-shadow: 0 2px 10px rgba(27,74,138,.06);
    grid-column: 1 / -1;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
    .cgv-container {
        grid-template-columns: 1fr;
    }
    .cgv-meta {
        flex-direction: row;
        flex-wrap: wrap;
        order: -1;
    }
    .cgv-meta-card { flex: 1; min-width: 200px; }
}
@media (max-width: 540px) {
    .cgv-content { padding: 1.5rem 1.25rem; }
}
