/**
 * Quick Actions - Menu dropdown pour utilisateurs connectés
 * Section "Ma cuisine" dans le header avec actions rapides personnalisées
 * 
 * @version 1.1
 * @date 2026-01-22
 */

/* ============================================
   SECTION QUICK ACTIONS DANS LE DROPDOWN
   ============================================ */

/* Conteneur de la section Quick Actions */
#quickActionsSection {
    padding: 0;
    margin: 0;
}

.dropdown-quick-actions {
    padding: 5px 0;
}

/* Séparateur avant la section */
#quickActionsDivider,
.dropdown-divider-quick-actions {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 8px 0;
}

.dark-mode #quickActionsDivider,
.dark-mode .dropdown-divider-quick-actions {
    background: linear-gradient(to right, transparent, #444, transparent);
}

/* Items Quick Actions */
.dropdown-item-quick-action {
    display: flex !important;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 8px;
    position: relative;
}

.dark-mode .dropdown-item-quick-action {
    color: #e0e0e0;
}

.dropdown-item-quick-action:hover {
    background: rgba(255, 107, 107, 0.08);
    transform: translateX(3px);
}

.dark-mode .dropdown-item-quick-action:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* Animation d'entrée */
.dropdown-item-quick-action {
    animation: qaSlideIn 0.3s ease forwards;
    opacity: 0;
}

.dropdown-item-quick-action:nth-child(1) { animation-delay: 0.05s; }
.dropdown-item-quick-action:nth-child(2) { animation-delay: 0.1s; }
.dropdown-item-quick-action:nth-child(3) { animation-delay: 0.15s; }
.dropdown-item-quick-action:nth-child(4) { animation-delay: 0.2s; }

@keyframes qaSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   ICÔNES AVEC GRADIENT
   ============================================ */

.qa-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 1rem;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-item-quick-action:hover .qa-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Icône Liste de courses - Bleu */
.qa-icon-cart {
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
}

/* Icône Favoris - Rouge/Rose */
.qa-icon-heart {
    background: linear-gradient(135deg, #ff6b6b 0%, #f03e3e 100%);
}

/* Icône Planning - Orange */
.qa-icon-planning {
    background: linear-gradient(135deg, #ffa94d 0%, #fd7e14 100%);
}

/* Icône Continuer - Vert */
.qa-icon-continue {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

/* ============================================
   ICÔNES NAVIGATION (même style que quick actions)
   ============================================ */

/* Style neutre par défaut pour les items de navigation */
.qa-icon-nav {
    background: #555;
    font-size: 0.9rem;
}

/* Recettes - Rouge/corail */
.qa-icon-recettes {
    background: linear-gradient(135deg, #ff6b6b 0%, #e55a5a 100%);
}

/* Thèmes - Violet */
.qa-icon-themes {
    background: linear-gradient(135deg, #b197fc 0%, #9775fa 100%);
}

/* Ingrédients de saison - Vert */
.qa-icon-saison {
    background: linear-gradient(135deg, #7cb083 0%, #6a9a70 100%);
}

/* Ustensiles - Gris acier */
.qa-icon-ustensiles {
    background: linear-gradient(135deg, #adb5bd 0%, #868e96 100%);
}

/* Articles - Bleu sombre */
.qa-icon-articles {
    background: linear-gradient(135deg, #74c0fc 0%, #4dabf7 100%);
}

/* ============================================
   CONTENU TEXTE
   ============================================ */

.qa-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* Pour permettre text-overflow */
}

.qa-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.dark-mode .qa-title {
    color: #f0f0f0;
}

.qa-subtitle {
    font-size: 0.75rem;
    color: #777;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark-mode .qa-subtitle {
    color: #999;
}

/* Nom de recette tronqué dans Continuer */
.qa-subtitle-recipe {
    max-width: 140px;
}

/* État vide */
.dropdown-item-quick-action.qa-empty {
    opacity: 0.6;
}

.dropdown-item-quick-action.qa-empty .qa-subtitle {
    font-style: italic;
}

/* ============================================
   BADGES
   ============================================ */

.qa-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Badge "NOUVEAU" */
.qa-badge-new {
    background: linear-gradient(135deg, #ff922b 0%, #fd7e14 100%);
    color: white;
    animation: qaPulse 2s ease-in-out infinite;
}

@keyframes qaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Badge temps écoulé (pour "Continuer") */
.qa-badge-activity {
    background: rgba(81, 207, 102, 0.15);
    color: #2f9e44;
    border: 1px solid rgba(81, 207, 102, 0.3);
    font-size: 0.65rem;
}

.dark-mode .qa-badge-activity {
    background: rgba(81, 207, 102, 0.2);
    color: #69db7c;
    border-color: rgba(81, 207, 102, 0.4);
}

/* ============================================
   ITEM "CONTINUER" - STYLE SPÉCIAL
   ============================================ */

.dropdown-item-continue {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.08) 0%, rgba(64, 192, 87, 0.05) 100%);
    border: 1px solid rgba(81, 207, 102, 0.2);
    margin-top: 4px;
}

.dark-mode .dropdown-item-continue {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.12) 0%, rgba(64, 192, 87, 0.08) 100%);
    border-color: rgba(81, 207, 102, 0.25);
}

.dropdown-item-continue:hover {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.15) 0%, rgba(64, 192, 87, 0.1) 100%);
    border-color: rgba(81, 207, 102, 0.35);
}

.dark-mode .dropdown-item-continue:hover {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.2) 0%, rgba(64, 192, 87, 0.15) 100%);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .dropdown-item-quick-action {
        padding: 12px 12px;
        margin: 3px 5px;
    }
    
    .qa-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        margin-right: 10px;
    }
    
    .qa-title {
        font-size: 0.85rem;
    }
    
    .qa-subtitle {
        font-size: 0.7rem;
    }
    
    .qa-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .qa-subtitle-recipe {
        max-width: 110px;
    }
}

/* ============================================
   ÉTATS DE CHARGEMENT
   ============================================ */

.qa-loading .qa-subtitle {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: qaShimmer 1.5s infinite;
    color: transparent;
    border-radius: 4px;
    min-width: 80px;
}

.dark-mode .qa-loading .qa-subtitle {
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
}

@keyframes qaShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   DARK MODE AJUSTEMENTS
   ============================================ */

.dark-mode .qa-icon-cart {
    background: linear-gradient(135deg, #339af0 0%, #228be6 100%);
}

.dark-mode .qa-icon-heart {
    background: linear-gradient(135deg, #f03e3e 0%, #c92a2a 100%);
}

.dark-mode .qa-icon-planning {
    background: linear-gradient(135deg, #fd7e14 0%, #e67700 100%);
}

.dark-mode .qa-icon-continue {
    background: linear-gradient(135deg, #40c057 0%, #37b24d 100%);
}
