/* assets/css/style.css - Design professionnel méditerranéen */

:root {
    --primary-color: #D4A574; /* Or méditerranéen */
    --secondary-color: #2C5F2D; /* Vert olive */
    --accent-color: #E8755F; /* Terracotta */
    --dark-color: #1A1A1A;
    --light-color: #F5F1E8;
    --text-color: #333;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: radial-gradient(circle at 20% 20%, rgba(212, 165, 116, 0.08), transparent 25%),
                radial-gradient(circle at 80% 10%, rgba(44, 95, 45, 0.07), transparent 22%),
                linear-gradient(180deg, #f8f5ef 0%, #f6f2e9 100%);
}

h1, h2, h3, h4 {
    color: var(--dark-color);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Header & Navigation */
.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-menu a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #C89558;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: #234F24;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), rgba(44, 95, 45, 0.1));
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #333;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    color: white;
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.card-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Admin layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--light-color);
}

.admin-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-menu a {
    text-decoration: none;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-menu a:hover {
    background: rgba(212, 165, 116, 0.12);
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow);
}

.sidebar-ghost {
    color: #666;
}

.sidebar-danger {
    color: #b23b3b;
}

.sidebar-separator {
    border-top: 1px solid #eee;
    margin: 0.6rem 0;
}

.admin-content {
    flex: 1;
    padding: 2rem 3rem;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.muted {
    color: #666;
}

.topbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(212, 165, 116, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-panels {
    gap: 1.5rem !important;
}

.settings-summary {
    background: #faf8f4;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.settings-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(212, 165, 116, 0.15);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.seo-score-box {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px dashed #ddd;
    border-radius: 12px;
    background: #fffaf5;
}

.table-wrapper {
    overflow-x: auto;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.list-stack {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.list-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 10px;
}

.list-row img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.list-info h4 {
    margin-bottom: 0.2rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.btn-compact {
    padding: 0.5rem 0.9rem;
}

.pill-group {
    display: flex;
    gap: 0.5rem;
}

.pill-option {
    border: 1px solid #ddd;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    cursor: pointer;
}

.form-grid .form-group {
    margin-bottom: 1rem;
}

/* Admin visual refresh */
.admin-layout {
    position: relative;
    min-height: 100vh;
}

.admin-layout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.08), rgba(44, 95, 45, 0.04));
    z-index: 0;
}

.admin-sidebar {
    background: linear-gradient(180deg, #fff, #fdf9f2);
    border-right: 1px solid #e8e2d5;
    padding: 1.8rem 1.4rem;
    box-shadow: var(--shadow);
    z-index: 1;
}

.sidebar-brand {
    letter-spacing: -0.01em;
}

.sidebar-menu a {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    font-weight: 650;
}

.sidebar-menu a:hover {
    background: rgba(212, 165, 116, 0.12);
    color: var(--primary-color);
}

.admin-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 3rem;
}

.admin-hero {
    background: linear-gradient(120deg, rgba(212, 165, 116, 0.18), rgba(44, 95, 45, 0.12));
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.4rem;
}

.admin-hero .hero-text p {
    margin-top: 0.35rem;
    color: #3f3a32;
}

.hero-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.chip {
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
    color: #3b332a;
}

.stat-card {
    border: 1px solid rgba(0,0,0,0.04);
    padding: 1.35rem;
}

.stat-icon {
    background: rgba(212, 165, 116, 0.14);
}

.card, .stat-card, .seo-score-box, .settings-summary, .list-row {
    backdrop-filter: saturate(1.02);
}

@media (max-width: 960px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        position: relative;
        height: auto;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .admin-content {
        padding: 1.5rem;
    }
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .seo-score-box {
        grid-template-columns: 1fr;
    }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Package Cards */
.package-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid transparent;
}

.package-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.package-card.featured {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.package-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

.package-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.package-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.package-features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Recipe View */
.recipe-header {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(44, 95, 45, 0.2));
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.recipe-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.ingredients-list {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.ingredients-list ul {
    list-style: none;
    margin-top: 1rem;
}

.ingredients-list li {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredients-list li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Recipe Steps */
.recipe-step {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.recipe-step.completed {
    background: rgba(44, 95, 45, 0.05);
    border-left: 4px solid var(--secondary-color);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary-color);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.step-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 3rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-content .stars {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    justify-content: center;
}

.rating-stars .star {
    cursor: pointer;
    color: #ddd;
    transition: var(--transition);
}

.rating-stars .star:hover,
.rating-stars .star.active {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard-sidebar {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.dashboard-sidebar ul {
    list-style: none;
}

.dashboard-sidebar li {
    margin-bottom: 1rem;
}

.dashboard-sidebar a {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
    background: var(--primary-color);
    color: #fff;
}

.dashboard-content {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
}

.table tr:hover {
    background: rgba(212, 165, 116, 0.05);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(44, 95, 45, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.alert-error {
    background: rgba(232, 117, 95, 0.1);
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
}

.alert-info {
    background: rgba(212, 165, 116, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: #fff;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .grid {
        padding: 1rem;
    }
    
    .package-card.featured {
        transform: scale(1);
    }
}