/* ============================================================
 * DETAIL AGENDA V3 - CSS PREMIUM (CORRIGÉ MOBILE COMPACT)
 * Fichier : /assets/css/agenda-new/detail-page-v3.css
 * ============================================================ */

/* --- IMPORT VARIABLES V3 --- */
:root {
    --v3-accent: #FF6233;
    --v3-gold: #D4AF37;
    --v3-bg: #ffffff;
    --v3-surface: #ffffff;
    --v3-text: #1a1a1a;
    --v3-muted: #666666;
    --v3-border: #e0e0e0;
    --v3-card-bg: #ffffff;

    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Lora', serif;
}

/* GLOBAL : Box Sizing vital */
*, *::before, *::after {
    box-sizing: border-box;
}

/* DARK MODE */
html[data-theme="dark"] body.v3-mode {
    --v3-bg: #0b0e14;
    --v3-surface: #151a23;
    --v3-text: #e8edf5;
    --v3-muted: #9aa4b2;
    --v3-border: #2a3241;
    --v3-card-bg: #151a23;
}

/* --- LAYOUT --- */
.v3-d-layout {
    width: 100%;
    overflow-x: hidden; /* Coupe tout ce qui dépasse brutalement */
    background: var(--v3-bg);
    color: var(--v3-text);
    padding-bottom: 80px;
}

/* --- HERO --- */
.v3-d-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    margin-bottom: -80px;
    z-index: 1;
    width: 100%;
}

.v3-d-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05);
}

.v3-d-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(11, 14, 20, 0.95) 100%);
    z-index: 2;
}

.v3-d-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px 100px; /* Padding réduit sur les côtés */
    text-align: center;
}

/* Fil d'ariane */
.v3-breadcrumb {
    margin-bottom: 20px;
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.v3-breadcrumb ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
}
.v3-breadcrumb a { color: rgba(255,255,255,0.9); text-decoration: none; border-bottom: 1px solid transparent; }
.v3-breadcrumb a:hover { border-color: var(--v3-accent); }
.separator { opacity: 0.5; }

/* Badges Hero */
.v3-hero-badges-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.v3-badge-pro, .v3-badge-free {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.v3-badge-pro {
    background: var(--v3-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.v3-badge-free {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Titre */
.v3-d-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 4rem); /* Plus petit sur mobile */
    color: #fff;
    margin: 0 0 30px;
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    word-wrap: break-word;
}

/* --- TAGS HERO (Date, Lieu) --- */
.v3-d-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.v3-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px; /* Taille Desktop standard */
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
}
.v3-meta-pill i { color: var(--v3-accent); font-size: 1.1em; flex-shrink: 0; }

/* --- GRID --- */
.v3-d-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 20;
}

.v3-d-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 60px;
    align-items: start;
}

/* Cards */
.v3-d-card {
    background: var(--v3-card-bg);
    border: 1px solid var(--v3-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    /* Sécurité */
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Contenu */
.v3-d-desc-box h2 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--v3-text);
    border-left: 4px solid var(--v3-accent);
    padding-left: 20px;
}
.v3-d-html {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--v3-text);
}
.v3-d-html a { color: var(--v3-accent); font-weight: 700; text-decoration: underline; }

/* --- BOUTONS D'ACTION --- */
.v3-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.v3-actions-label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--v3-muted);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.v3-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.v3-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px; /* Taille Desktop */
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: 8px;
    color: var(--v3-text);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.v3-btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--v3-text);
}

.v3-btn-google:hover i { color: #DB4437; }
.v3-btn-outlook:hover i { color: #0078D4; }
.v3-btn-whatsapp:hover i { color: #25D366; }
.v3-btn-copy.success { background: #d4edda; color: #155724; border-color: #c3e6cb; }

/* --- SIDEBAR --- */
.v3-card-poster { padding: 0; overflow: hidden; position: relative; cursor: pointer; }
.v3-card-poster img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.v3-card-poster:hover img { transform: scale(1.05); }
.poster-hint {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.7); color: #fff; padding: 10px;
    text-align: center; font-family: var(--font-head); font-size: 0.8rem;
    opacity: 0; transition: opacity 0.3s;
}
.v3-card-poster:hover .poster-hint { opacity: 1; }
.v3-mobile-poster { display: none; margin-bottom: 30px; }
.v3-desktop-poster { display: block; }

.v3-card-infos h3 {
    font-family: var(--font-head); font-size: 1.2rem; font-weight: 800;
    margin-bottom: 25px; color: var(--v3-text); text-transform: uppercase;
}
.v3-info-list { list-style: none; padding: 0; margin: 0; }
.v3-info-list li {
    display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--v3-border);
}
.v3-info-list li:last-child { border-bottom: none; }
.v3-info-icon { color: var(--v3-accent); font-size: 1.2rem; width: 24px; text-align: center; }
.v3-info-content { display: flex; flex-direction: column; }
.v3-info-content strong {
    font-family: var(--font-head); font-size: 0.8rem; text-transform: uppercase; color: var(--v3-muted); margin-bottom: 5px;
}
.v3-info-content span {
    font-family: var(--font-body); font-size: 1rem; color: var(--v3-text); font-weight: 600;
}

.v3-btn-outline {
    display: block; width: 100%; text-align: center; padding: 15px;
    border: 2px solid var(--v3-text); color: var(--v3-text);
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    text-decoration: none; border-radius: 8px; transition: all 0.2s; margin-top: 20px;
}
.v3-btn-outline:hover { background: var(--v3-text); color: var(--v3-bg); }

.v3-btn-back {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 15px; background: var(--v3-accent); color: #fff;
    font-family: var(--font-head); font-weight: 700; border-radius: 50px;
    text-decoration: none; box-shadow: 0 10px 20px rgba(255, 98, 51, 0.3);
    transition: all 0.3s;
}
.v3-btn-back:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(255, 98, 51, 0.5); }

/* --- MODE PRO --- */
.v3-card.is-pro { background: #0f172a; border: 1px solid var(--v3-gold); }
.v3-card.is-pro h3, .v3-card.is-pro .v3-info-content span { color: #fff; }
.v3-card.is-pro .v3-info-icon { color: var(--v3-gold); }

/* --- LIGHTBOX --- */
.v3-lightbox-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.v3-lightbox-content {
    max-width: 95%; max-height: 90vh; object-fit: contain;
    border-radius: 4px; box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
.v3-lightbox-close {
    position: absolute; top: 30px; right: 30px; background: none; border: none;
    color: #fff; font-size: 3rem; cursor: pointer; transition: transform 0.2s;
}
.v3-lightbox-close:hover { transform: scale(1.2); color: var(--v3-accent); }


/* ============================================================
 *  MOBILE OPTIMISATIONS (MAX 600px)
 *  C'est ici qu'on règle les problèmes de taille !
 *  ============================================================ */
@media (max-width: 600px) {

    /* HERO : Padding réduit */
    .v3-d-hero { padding-top: 80px; margin-bottom: 0; height: auto; min-height: auto; }
    .v3-d-hero-content { padding: 40px 15px 40px; }

    /* GRID : Une colonne */
    .v3-d-grid { grid-template-columns: 1fr; gap: 40px; }
    .v3-d-container { padding: 0 15px; margin-top: 0; }

    /* CARD : Padding interne réduit */
    .v3-d-card { padding: 25px 20px; margin-bottom: 30px; }

    /* --- GESTION AFFICHE --- */
    .v3-mobile-poster { display: block; }
    .v3-desktop-poster { display: none; }

    /* --- TAGS (DATE/LIEU) PLUS PETITS --- */
    /* On réduit le padding et la police pour que ça tienne */
    .v3-meta-pill {
        padding: 6px 12px;      /* BEAUCOUP plus petit */
        font-size: 0.8rem;      /* Police plus fine */
        line-height: 1.3;
        flex: 0 1 auto;         /* Ne prend que la place nécessaire */
        white-space: normal;    /* AUTORISE le retour à la ligne dedans */
        text-align: center;
        max-width: 100%;
    }

    /* --- BOUTONS ACTIONS PLUS PETITS --- */
    .v3-btn-action {
        padding: 8px 12px;      /* Compact */
        font-size: 0.8rem;
        flex: 1 1 auto;         /* Se partagent l'espace intelligemment */
        justify-content: center;
        white-space: normal;    /* Texte peut passer à la ligne */
        text-align: center;
        min-width: 0;           /* Empêche de forcer la largeur parent */
    }

    /* Si vraiment petit écran, empiler pour éviter la bouillie */
    .v3-actions-buttons { gap: 8px; }
}
