/* ========================================
 * PAGE-RECETTE-NUTRITION-BADGES.CSS
 * Styles pour les badges nutritionnels sur l'image principale
 * Position : en haut à gauche, empilés verticalement
 * Style : glassmorphism inspiré des hero-feature-circle
 * ======================================== */

/* Container des badges */
.nutrition-badges-container {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    z-index: 15;
    pointer-events: none;
}

/* Style de base des badges nutritionnels sur l'image - Glassmorphism */
.nutrition-badges-container .tag-pill,
.alert-badges-container .tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    text-transform: none !important;
    letter-spacing: 0.3px;
    
    /* Effet glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    
    /* Animation fade-in - INVISIBLE par défaut */
    opacity: 0 !important;
    transform: translateY(-8px);
    transition: opacity 1s ease, transform 1s ease !important;
}

.nutrition-badges-container .tag-pill.visible,
.alert-badges-container .tag-pill.visible {
    opacity: 1 !important;
    transform: translateY(0);
}

/* === Variantes de couleur === */

/* Rose/Fuchsia - Macronutriments (protéines, lipides, etc.) */
.tag-pill--pink {
    background: rgba(219, 39, 119, 1.00);
    border-color: rgba(244, 114, 182, 0.6);
}

/* Vert - Vitamines */
.tag-pill--green {
    background: rgba(16, 185, 129, 1.00);
    border-color: rgba(52, 211, 153, 0.6);
}

/* Bleu/Cyan - Minéraux */
.tag-pill--blue {
    background: rgba(6, 182, 212, 1.00);
    border-color: rgba(34, 211, 238, 0.6);
}

/* Variantes supplémentaires (si besoin) */
.tag-pill--orange {
    background: rgba(180, 83, 9, 1.00);
    border-color: rgba(217, 119, 6, 0.6);
}

.tag-pill--purple {
    background: rgba(109, 40, 217, 1.00);
    border-color: rgba(139, 92, 246, 0.6);
}

.tag-pill--red {
    background: rgba(185, 28, 28, 1.00);
    border-color: rgba(220, 38, 38, 0.6);
}

.tag-pill--gold {
    background: rgba(180, 83, 9, 1.00);
    border-color: rgba(217, 119, 6, 0.6);
}

/* ======================================
 * RESPONSIVE BADGES NUTRITIONNELS
 * ====================================== */

/* Tablettes */
@media screen and (max-width: 1024px) {
    .nutrition-badges-container {
        top: 12px;
        left: 12px;
        gap: 8px;
    }
    
    .tag-pill {
        padding: 7px 14px;
        font-size: 0.75rem;
    }
}

/* Petites tablettes */
@media screen and (max-width: 768px) {
    .nutrition-badges-container {
        top: 10px;
        left: 10px;
        gap: 6px;
    }
    
    .tag-pill {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 20px;
    }
}

/* Téléphones */
@media screen and (max-width: 480px) {
    .nutrition-badges-container {
        top: 8px;
        left: 8px;
        gap: 4px;
        max-width: calc(100% - 60px);
    }
    
    .nutrition-badges-container .tag-pill,
    .alert-badges-container .tag-pill {
        padding: 3px 8px;
        font-size: 0.75rem;
        border-radius: 12px;
        border-width: 1px;
        letter-spacing: 0.1px;
    }
}

/* Très petits écrans */
@media screen and (max-width: 320px) {
    .nutrition-badges-container {
        top: 5px;
        left: 5px;
        gap: 3px;
        max-width: calc(100% - 50px);
    }
    
    .nutrition-badges-container .tag-pill,
    .alert-badges-container .tag-pill {
        padding: 2px 6px;
        font-size: 0.65rem;
        border-radius: 10px;
    }
}

/* ========================================
 * BADGES D'ALERTE (CONFLITS ALLERGÈNES/INGRÉDIENTS)
 * Position : en haut à droite, empilés verticalement
 * Style : identique aux badges nutritionnels
 * ======================================== */

/* Container des badges d'alerte */
.alert-badges-container {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 15;
    pointer-events: none;
}

/* === Variantes de couleur pour les alertes (progression négative : orange → noir) === */

/* Allergène Léger - Orange */
.tag-pill--allergy-leger {
    background: rgba(230, 126, 34, 0.95);
    border-color: rgba(243, 156, 18, 0.5);
}

/* Allergène Modéré - Orange-rouge */
.tag-pill--allergy-modere {
    background: rgba(211, 84, 0, 0.95);
    border-color: rgba(230, 126, 34, 0.5);
}

/* Allergène Sévère - Rouge foncé */
.tag-pill--allergy-severe {
    background: rgba(146, 43, 33, 0.95);
    border-color: rgba(192, 57, 43, 0.5);
}

/* Allergène Mortel - Noir */
.tag-pill--allergy-mortel {
    background: rgba(26, 26, 26, 0.95);
    border-color: rgba(60, 60, 60, 0.5);
}

/* Ingrédient À éviter - Orange-rouge */
.tag-pill--ingredient-evite {
    background: rgba(211, 84, 0, 0.95);
    border-color: rgba(230, 126, 34, 0.5);
}

/* Ingrédient Exclu - Rouge foncé */
.tag-pill--ingredient-exclu {
    background: rgba(146, 43, 33, 0.95);
    border-color: rgba(192, 57, 43, 0.5);
}

/* ======================================
 * RESPONSIVE BADGES D'ALERTE
 * ====================================== */

/* Tablettes */
@media screen and (max-width: 1024px) {
    .alert-badges-container {
        top: 12px;
        right: 12px;
        gap: 8px;
    }
}

/* Petites tablettes */
@media screen and (max-width: 768px) {
    .alert-badges-container {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
}

/* Téléphones */
@media screen and (max-width: 480px) {
    .alert-badges-container {
        top: 8px;
        right: 8px;
        gap: 4px;
        max-width: calc(100% - 60px);
    }
}

/* Très petits écrans */
@media screen and (max-width: 320px) {
    .alert-badges-container {
        top: 5px;
        right: 5px;
        gap: 3px;
        max-width: calc(100% - 50px);
    }
}
