/* ================================================================
   assets/css/styles.css — Cuisine Congolaise
   Complément de Tailwind CSS (classes personnalisées du projet)
   ================================================================ */

/* ── Couleurs personnalisées ─────────────────────────────────── */
.main-blue  { background-color: #1e40af; }
.light-blue { background-color: #3b82f6; }
.hover-blue:hover { background-color: #2563eb; }

/* ── Cartes ──────────────────────────────────────────────────── */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-image {
    width: 150px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 16px auto;
    transition: transform 0.3s ease;
}
.category-card:hover .category-image {
    transform: scale(1.05);
}

/* ── Cartes de recettes ───────────────────────────────────────── */
.recipe-card {
    border-left: 4px solid #3b82f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ── Cartes de commentaires ───────────────────────────────────── */
.comment-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ── Menu déroulant (desktop) ────────────────────────────────── */
.dropdown:hover .dropdown-content { display: block; }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e40af;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100;
    border-radius: 0.5rem;
    top: 100%;
    left: 0;
}
.dropdown-content a {
    color: white;
    padding: 12px 16px;
    display: block;
    border-radius: 0.5rem;
}
.dropdown-content a:hover { background-color: #2563eb; }

/* ── Icônes sociales ─────────────────────────────────────────── */
.social-icon {
    font-size: 24px;
    transition: all 0.3s ease;
}
.social-icon:hover { transform: translateY(-2px); }

/* ── Boutons de filtre ───────────────────────────────────────── */
.filter-btn {
    transition: all 0.3s ease;
}
.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ── Modal recette ───────────────────────────────────────────── */
#recipeModal { backdrop-filter: blur(5px); }
#recipeModal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to   { opacity: 1; transform: translateY(0);     }
}
#recipeModal .max-h-screen { max-height: 90vh; }

/* ── Carrousel hero ──────────────────────────────────────────── */
.carousel-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.carousel-wrapper {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide {
    flex-shrink: 0;
    width: 33.333%;
    height: 100%;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-btn {
    z-index: 20;
    transition: transform 0.3s;
}
.carousel-btn:hover { transform: translateY(-50%) scale(1.1); }

.indicator         { cursor: pointer; }
.indicator.active  { background-color: white !important; opacity: 1; }

/* ── Stat card (admin & public) ──────────────────────────────── */
.stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
}

/* ── Tableau admin ───────────────────────────────────────────── */
.table-wrap {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.table-wrap table        { width: 100%; border-collapse: collapse; }
.table-wrap thead th     { background: #1e40af; color: #fff;
                           padding: .75rem 1rem; text-align: left;
                           font-size: .85rem; letter-spacing: .03em; }
.table-wrap tbody tr     { border-bottom: 1px solid #e5e7eb; }
.table-wrap tbody tr:last-child { border-bottom: none; }
.table-wrap tbody tr:hover { background: #f1f5f9; }
.table-wrap tbody td     { padding: .75rem 1rem; vertical-align: middle; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .65rem;
    border-radius: 9999px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }

/* ── Formulaires ─────────────────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    padding: .55rem .75rem;
    font-size: .95rem;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-textarea { resize: vertical; }

/* ── Accessibilité ───────────────────────────────────────────── */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0);    }
}
.animate-fade-in { animation: fadeInUp 0.6s ease forwards; }

/* ── Boutons — effet brillance ───────────────────────────────── */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transition: left .5s;
}
button:hover::before { left: 100%; }

/* ── Images ─────────────────────────────────────────────────── */
img { transition: transform 0.3s ease; }
img:hover { transform: scale(1.02); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .carousel-btn { padding: 8px; }
    .carousel-btn i { font-size: 16px; }
    .dropdown-content { min-width: 180px; }
    .recipe-card { margin-bottom: 1rem; }
}
