:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-bg: #f3f4f6;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --radius-md: 8px;
    --radius-lg: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    gap: .5rem;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.logo-text {
    font-weight: 600;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--color-primary);
}

.site-main {
    padding-bottom: 3rem;
}

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1rem 0 2rem;
    font-size: 0.875rem;
    color: var(--color-muted);
    background: #ffffff;
}

/* Skip link */

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    padding: .5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    z-index: 1000;
}

.skip-link:focus {
    left: 0.5rem;
}

/* Hero */

.hero {
    padding: 2rem 0 1rem;
}

.hero h1 {
    margin: 0 0 .5rem;
}

.hero p {
    margin: 0;
    color: var(--color-muted);
}

/* Catalogue */

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.product-card img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.product-name {
    font-weight: 600;
}

.product-price {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.product-actions {
    margin-top: .5rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Boutons génériques */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-text);
    transition:
            background-color .15s ease,
            border-color .15s ease,
            box-shadow .15s ease,
            transform .05s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.btn:hover,
.btn:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.38);
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn[disabled],
.btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Cart / Checkout */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.cart-table th,
.cart-table td {
    border: 1px solid var(--color-border);
    padding: .5rem;
}

.cart-summary {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: center;
}

.cart-empty {
    margin-top: 1rem;
}

.checkout-form {
    max-width: 500px;
    margin-top: 1rem;
}

.form-group {
    margin-bottom: .75rem;
}

label {
    display: inline-block;
    margin-bottom: .25rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: .4rem .5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font: inherit;
}

/* Utilities */

.text-muted {
    color: var(--color-muted);
}

.sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
}
/* =========================
   Back-office (admin)
   ========================= */

.admin-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
            radial-gradient(circle at top, #1d4ed811, transparent 55%),
            #020617;
    color: #e5e7eb;
}

.admin-header {
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid #1f2937;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
}

.admin-header strong {
    font-size: .95rem;
}

.admin-header small {
    display: block;
    font-size: .8rem;
    color: #9ca3af;
}

.admin-header-nav a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 1rem;
    font-size: .9rem;
}

.admin-header-nav a:hover,
.admin-header-nav a:focus-visible {
    color: #93c5fd;
}

.admin-main {
    flex: 1;
    padding: 1.5rem 0 2rem;
}

.admin-main .container {
    max-width: 1100px;
}

.admin-main h1 {
    font-size: 1.5rem;
    margin: 0 0 .75rem;
}

.admin-main h2 {
    font-size: 1.1rem;
    margin: 1.25rem 0 .5rem;
    color: #e5e7eb;
}

.admin-subtitle {
    margin: 0 0 .75rem;
    font-size: .9rem;
    color: #9ca3af;
}

/* Cartes */

.card {
    background: #020617;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
    margin-bottom: 1rem;
}

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

.card-header-title {
    font-weight: 600;
}

.card-header-subtitle {
    font-size: .85rem;
    color: #9ca3af;
}

/* KPIs */

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

.admin-kpi {
    background: #020617;
    border-radius: 14px;
    padding: .75rem 1rem;
    border: 1px solid #1f2937;
}

.admin-kpi-label {
    font-size: .8rem;
    color: #9ca3af;
}

.admin-kpi-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Tableaux */

.admin-layout .cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-top: .5rem;
}

.admin-layout .cart-table th,
.admin-layout .cart-table td {
    padding: .5rem .6rem;
}

.admin-layout .cart-table th {
    text-align: left;
    background: #020617;
    color: #9ca3af;
    border-bottom: 1px solid #1f2937;
}

.admin-layout .cart-table tbody tr:nth-child(odd) {
    background: #020617;
}

.admin-layout .cart-table tbody tr:nth-child(even) {
    background: #020617;
}

.admin-layout .cart-table tbody tr + tr td {
    border-top: 1px solid #1f2937;
}

/* Badges statut commandes */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
}

.badge-status--nouvelle {
    background: #f97316;
    color: #111827;
}

.badge-status--en_preparation {
    background: #22c55e;
    color: #052e16;
}

.badge-status--expediee {
    background: #38bdf8;
    color: #0f172a;
}

/* Footer admin */

.admin-layout .site-footer {
    background: #020617;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
}
