/* ========================================
   PALETTE DE COULEURS - Élégance Bordelaise
   ======================================== */
:root {
    /* Couleurs principales - Palette adoucie et raffinée */
    --primary: #9B5366;      /* Bordeaux rosé doux */
    --secondary: #C9A961;    /* Or champagne subtil */
    --accent: #7A9B7D;       /* Vert sauge */

    /* Couleurs neutres */
    --light: #FAF8F5;        /* Blanc cassé très doux */
    --dark: #3A3A3A;         /* Gris anthracite doux */
    --white: #FFFFFF;

    /* Couleurs d'état */
    --success: #6BAA75;
    --danger: #D97076;
    --warning: #E8B563;
    --info: #6BA5B8;

    /* Dégradés et variations */
    --primary-light: #B77B8A;
    --primary-dark: #7A3D4E;
    --secondary-light: #DCC288;
    --secondary-dark: #A68B4A;

    /* Couleurs de fond */
    --bg-soft: #F5F2EE;      /* Fond doux beige */
}

/* ========================================
   STYLES GLOBAUX
   ======================================== */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--light);
    color: var(--dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background-color: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-light) !important;
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

.navbar .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    transition: all 0.3s ease;
}

.navbar .btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.navbar .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    transition: all 0.3s ease;
}

.navbar .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Dropdown menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light);
    color: var(--primary);
}

.dropdown-divider {
    border-color: var(--light);
}

/* Panier icon animation */
.navbar a[title="Panier"]:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}


/* ========================================
   BOUTONS
   ======================================== */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ========================================
   FORMULAIRES
   ======================================== */
.form-control {
    border-color: #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(139, 21, 56, 0.15);
}

.form-floating > label {
    color: #6c757d;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

/* ========================================
   PAGE DE CONNEXION
   ======================================== */
.login-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(139, 21, 56, 0.3);
}

.login-icon i {
    color: var(--white);
}

/* Divider "ou" */
.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: #e0e0e0;
}

.divider-text {
    position: relative;
    display: inline-block;
    background-color: var(--white);
    padding: 0 1rem;
    color: #999;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Bouton de connexion amélioré */
.login-card .btn-primary {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========================================
   PAGE D'INSCRIPTION
   ======================================== */
.register-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.register-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.register-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.register-icon i {
    color: var(--dark);
}

/* Formulaire d'inscription */
.register-form .form-floating {
    margin-bottom: 0;
}

.register-card .btn-primary {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Messages d'erreur personnalisés */
.register-form .invalid-feedback,
.register-form .form-error-message,
.invalid-feedback {
    display: block !important;
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Affichage des erreurs pour tous les formulaires */
.form-error-icon {
    margin-right: 0.25rem;
}

/* Style des champs en erreur */
.is-invalid {
    border-color: var(--danger) !important;
}

/* ========================================
   CARDS & MENUS
   ======================================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: var(--primary);
    font-weight: 700;
}

.badge {
    padding: 0.5em 1em;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--primary);
}

.badge-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a1a 100%);
    color: var(--light);
    flex-shrink: 0;
    margin-top: auto;
}

.footer .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2rem !important;
}

.footer-title {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem !important;
}

@media (min-width: 992px) {
    .footer-title {
        justify-content: flex-start;
    }
}

.footer-text {
    color: #c4c4c4;
    line-height: 1.6;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer a {
    color: #c4c4c4;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
}

.footer-links {
    display: inline-block;
    text-align: left;
}

.footer-links li {
    margin-bottom: 0.5rem !important;
}

@media (min-width: 992px) {
    .footer-links {
        display: block;
    }
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-schedule {
    display: inline-block;
}

.footer-schedule li {
    color: #c4c4c4;
    font-size: 0.875rem;
    margin-bottom: 0.4rem !important;
    padding: 0.3rem 0;
    display: flex;
    gap: 1rem;
}

.footer-schedule li span:first-child {
    min-width: 80px;
    flex-shrink: 0;
}

.footer-schedule .text-secondary {
    color: var(--secondary) !important;
    font-weight: 500;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer .col-md-6 {
        margin-bottom: 1.5rem;
    }

    .footer .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* Icônes sociales */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem !important;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary);
    color: var(--dark) !important;
    transform: translateY(-3px);
}

.social-icon i {
    color: var(--secondary);
}

.social-icon:hover i {
    color: var(--dark);
}

/* Barre de copyright */
.footer .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
}

.footer .small {
    color: #9a9a9a;
    font-size: 0.8rem;
}

/* Liens légaux mobile */
.footer-legal-links a {
    color: var(--secondary) !important;
    text-decoration: none;
    font-size: 0.75rem;
    transition: opacity 0.3s ease;
}

.footer-legal-links a:hover {
    opacity: 0.8;
}

.footer-legal-links span {
    color: #6a6a6a;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: var(--success);
    color: var(--white);
}

.alert-danger {
    background-color: var(--danger);
    color: var(--white);
}

.alert-warning {
    background-color: var(--warning);
    color: var(--dark);
}

.alert-info {
    background-color: var(--info);
    color: var(--white);
}

/* ========================================
   PAGE D'ACCUEIL
   ======================================== */

/* Hero Section */
.hero-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 75vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(155, 83, 102, 0.85) 0%, rgba(122, 61, 78, 0.80) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s backwards;
}

/* About Section */
.about-image-wrapper {
    position: relative;
}

.about-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--dark);
    padding: 1.5rem;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    z-index: 1;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    color: var(--white);
}

/* Stats Section */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

/* Review Cards */
.review-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.review-stars {
    display: flex;
    gap: 0.25rem;
}

.star-filled {
    color: var(--secondary);
}

.review-text {
    font-style: italic;
    color: var(--dark);
    line-height: 1.7;
}

.review-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review-avatar i {
    color: var(--white);
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* ========================================
   PAGE MON COMPTE
   ======================================== */

/* En-tête du compte */
.account-header {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.account-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(139, 21, 56, 0.3);
}

.account-avatar i {
    color: var(--white);
}

/* Cards du compte */
.account-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.account-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--light) 0%, #f0ebe5 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--primary);
}

.card-header-custom h4,
.card-header-custom h5 {
    color: var(--primary);
    font-weight: 700;
}

.account-card .card-body {
    padding: 1.5rem;
}

/* Champs d'information */
.info-field {
    background-color: var(--light);
    padding: 0.875rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--dark);
    border: 1px solid #e0e0e0;
}

.info-field i {
    color: var(--primary);
}

/* Action links */
.action-link {
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 8px;
}

.action-link:hover {
    background-color: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

.action-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon i {
    color: var(--white);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--white);
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--dark);
    font-weight: 500;
}

/* Bouton outline-secondary personnalisé */
.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: var(--white);
}

/* Bouton outline-danger personnalisé */
.btn-outline-danger {
    border-color: var(--danger);
    color: var(--danger);
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

/* ========================================
   CATALOGUE DE MENUS
   ======================================== */

/* Hero Section Menu */
.menu-hero-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=1920&h=600&fit=crop');
    background-size: cover;
    background-position: center;
    min-height: 40vh;
}

/* Sidebar Filtres */
.filter-sidebar {
    position: static;
}

.filter-group h6 {
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.filter-group .form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(155, 83, 102, 0.25);
}

.filter-group .form-check-label {
    font-size: 0.875rem;
    color: var(--dark);
}

/* Cards de menu */
.menu-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.menu-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.menu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-card:hover .menu-card-image img {
    transform: scale(1.1);
}

.menu-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
}

.menu-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-card-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.menu-card-description {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.menu-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-card-tags .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.menu-card-info {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.menu-card-price {
    flex-grow: 1;
}

/* Vue Liste */
.list-view .menu-card {
    flex-direction: row;
}

.list-view .menu-card-image {
    width: 300px;
    height: auto;
    min-height: 250px;
}

.list-view .menu-card-body {
    padding: 2rem;
}

/* Détail du menu */
.menu-detail-image {
    position: relative;
}

.menu-detail-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1;
}

.menu-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-detail-info {
    background-color: var(--light);
}

.menu-detail-price {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Recipe Cards dans le détail du menu */
.recipe-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.recipe-card-header {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.recipe-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-card-header img {
    transform: scale(1.1);
}

.recipe-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.recipe-card-body {
    padding: 1.5rem;
}

.recipe-card-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.recipe-card-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.recipe-allergens {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--light) 0%, #f0ebe5 100%);
    border: 2px solid var(--primary);
}

/* Responsive */
@media (max-width: 991px) {
    .filter-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .list-view .menu-card {
        flex-direction: column;
    }

    .list-view .menu-card-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 575px) {
    .menu-card-image {
        height: 180px;
    }

    .menu-detail-badge {
        left: 10px;
        bottom: 10px;
    }
}
