:root {
    color-scheme: dark;
    --bg: #020617;
    --surface: #0f172a;
    --surface-2: #1e293b;
    --border: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #f97316;
    --accent-2: #3b82f6;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
}
::-webkit-scrollbar-track {
    background: transparent;
}

body {
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(249, 115, 22, 0.08), transparent);
    background-attachment: fixed;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(249, 115, 22, 0.35);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.nav-link {
    position: relative;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.925rem;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover {
    color: var(--text);
    background: rgba(30, 41, 59, 0.7);
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fb923c, #f97316 45%, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Cartes ---------- */
.recipe-card {
    background: linear-gradient(160deg, #0f172a 0%, #0b1220 100%);
    border: 1px solid rgba(30, 41, 59, 0.9);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.recipe-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 20px 40px -15px rgba(249, 115, 22, 0.25), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}
.recipe-card img {
    transition: transform 0.4s ease;
}
.recipe-card:hover img {
    transform: scale(1.05);
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.9rem;
    padding: 0.65rem 1.4rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(249, 115, 22, 0.55);
}
.btn-primary:hover {
    box-shadow: 0 12px 28px -8px rgba(249, 115, 22, 0.7);
    filter: brightness(1.08);
}
.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border-color: rgba(51, 65, 85, 0.8);
}
.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(71, 85, 105, 1);
}
.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.55);
}
.btn-blue:hover {
    filter: brightness(1.1);
    box-shadow: 0 12px 28px -8px rgba(59, 130, 246, 0.7);
}

/* ---------- Formulaires ---------- */
.field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.85rem;
    color: #e2e8f0;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder {
    color: #475569;
}
.field:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
select.field option {
    background: #0f172a;
    color: #e2e8f0;
}
input[type="file"].field {
    padding: 0.6rem 1rem;
}
input[type="file"].field::file-selector-button {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 0.6rem;
    padding: 0.3rem 0.8rem;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
input[type="file"].field::file-selector-button:hover {
    background: #334155;
}

.label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

/* ---------- Alertes ---------- */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 0.85rem;
    border: 1px solid;
    font-size: 0.925rem;
    margin-bottom: 1.25rem;
}
.alert-error {
    background: rgba(127, 29, 29, 0.25);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}
.alert-success {
    background: rgba(20, 83, 45, 0.25);
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

/* ---------- Divers ---------- */
.panel {
    background: linear-gradient(160deg, #0f172a 0%, #0b1220 100%);
    border: 1px solid rgba(30, 41, 59, 0.9);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
}

.text-gradient {
    background: linear-gradient(90deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.divider-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.5), transparent);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.7);
    color: #cbd5e1;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(30, 41, 59, 1);
    color: #94a3b8;
}

.dropdown-dark {
    background: #0f172a;
    border: 1px solid rgba(30, 41, 59, 1);
    border-radius: 0.9rem;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
}
.dropdown-dark a {
    color: #cbd5e1;
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-dark a:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #fff;
}
