/**
 * ============================================================
 * BANDEAU BETA TEST - BLACK DOG KUNG FU
 * ============================================================
 * 
 * Fichier : blackdog-beta-banner.css
 * Version : 1.0.0
 * Date    : 2026-01-04
 * 
 * INTÉGRATION WORDPRESS :
 * ----------------------
 * Ajouter dans functions.php :
 * 
 * function blackdog_enqueue_beta_styles() {
 *     if (defined('BLACKDOG_BETA_MODE') && BLACKDOG_BETA_MODE) {
 *         wp_enqueue_style('blackdog-beta-banner', 
 *             get_template_directory_uri() . '/css/blackdog-beta-banner.css',
 *             array(),
 *             '1.0.0'
 *         );
 *     }
 * }
 * add_action('wp_enqueue_scripts', 'blackdog_enqueue_beta_styles');
 * 
 * ============================================================
 */

/* ============================================================
   BANDEAU PRINCIPAL
   ============================================================ */

.beta-banner {
    /* Positionnement : juste sous le header fixe de 75px */
    position: relative;
    z-index: 999;
    margin-top: 75px; /* var(--header-height) */
    
    /* Couleurs : style warning/attention avec tons chauds */
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(155, 27, 48, 0.1) 100%);
    border-bottom: 1px solid rgba(234, 88, 12, 0.3);
    
    /* Animation d'entrée */
    animation: betaBannerSlideIn 0.4s ease-out;
}

/* Animation d'entrée */
@keyframes betaBannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de fermeture */
.beta-banner-closing {
    animation: betaBannerSlideOut 0.3s ease-in forwards;
}

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

/* ============================================================
   CONTENU DU BANDEAU
   ============================================================ */

.beta-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 40px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* Icône warning */
.beta-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(234, 88, 12, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EA580C; /* warning color du CDC */
}

/* Zone de texte */
.beta-banner-text {
    flex: 1;
    min-width: 0;
}

/* Titre */
.beta-banner-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #EA580C;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Message */
.beta-banner-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary, #f5f3f0);
}

/* Liens dans le message */
.beta-banner-message a {
    color: #9B1B30; /* accent du CDC */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.beta-banner-message a:hover {
    color: #EA580C;
}

/* Texte en gras (emphase) */
.beta-banner-message strong {
    color: #EA580C;
}

/* ============================================================
   BOUTON DE FERMETURE
   ============================================================ */

.beta-banner-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary, #8a8583);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beta-banner-close:hover {
    background: rgba(234, 88, 12, 0.2);
    color: #EA580C;
}

.beta-banner-close:focus {
    outline: 2px solid #EA580C;
    outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE - TABLETTE
   ============================================================ */

@media (max-width: 768px) {
    .beta-banner-content {
        padding: 14px 20px;
        gap: 12px;
    }
    
    .beta-banner-icon {
        width: 36px;
        height: 36px;
    }
    
    .beta-banner-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .beta-banner-title {
        font-size: 1rem;
    }
    
    .beta-banner-message {
        font-size: 0.875rem;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 480px) {
    .beta-banner-content {
        flex-wrap: wrap;
    }
    
    /* Masquer l'icône sur mobile pour gagner de la place */
    .beta-banner-icon {
        display: none;
    }
    
    /* Repositionner le bouton fermer */
    .beta-banner-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    .beta-banner {
        position: relative;
    }
    
    .beta-banner-text {
        padding-right: 40px;
    }
}

/* ============================================================
   LIGHT MODE
   ============================================================ */

.light-mode .beta-banner {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.1) 0%, rgba(155, 27, 48, 0.05) 100%);
    border-bottom: 1px solid rgba(234, 88, 12, 0.2);
}

.light-mode .beta-banner-message {
    color: var(--text-primary, #1a1816);
}

/* ============================================================
   VARIANTE : HOMEPAGE AVEC HERO PLEIN ÉCRAN
   ============================================================
   
   Pour la homepage, le bandeau peut être en position fixe
   au-dessus du hero. Utiliser la classe .beta-banner--homepage
   
   Exemple : <div class="beta-banner beta-banner--homepage">
   
   ============================================================ */

.beta-banner--homepage {
    position: fixed;
    top: 75px; /* Sous le header */
    left: 0;
    right: 0;
    margin-top: 0;
}

/* Ajuster le hero pour laisser de la place au bandeau */
.has-beta-banner .hero {
    padding-top: 160px; /* 75px header + ~85px bandeau */
}

/* ============================================================
   VARIANTE : BANDEAU COMPACT (optionnel)
   ============================================================
   
   Version plus compacte pour les pages avec beaucoup de contenu.
   Utiliser la classe .beta-banner--compact
   
   ============================================================ */

.beta-banner--compact .beta-banner-content {
    padding: 10px 40px;
}

.beta-banner--compact .beta-banner-icon {
    width: 32px;
    height: 32px;
}

.beta-banner--compact .beta-banner-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.beta-banner--compact .beta-banner-message {
    font-size: 0.85rem;
}

/* ============================================================
   AJUSTEMENT DU MAIN CONTENT
   ============================================================
   
   Quand le bandeau est présent, le contenu principal n'a pas
   besoin de padding-top supplémentaire car le bandeau gère
   déjà le margin-top de 75px.
   
   ============================================================ */

/* Dashboard : ajuster le padding du main */
.beta-banner + .main,
.beta-banner ~ .main {
    padding-top: 40px;
}

/* Homepage : le hero gère son propre positionnement */
.beta-banner--homepage + .hero,
.beta-banner--homepage ~ .hero {
    /* Le hero commence à min-height: 100vh, donc pas d'ajustement nécessaire */
    /* sauf si on utilise .has-beta-banner sur le body */
}
