/* theme.css : Whèkè Food, thème « soleil et braise » */
:root {
    --jaune: #FDBF18;
    --jaune-fonce: #E5A800;
    --creme: #FFF8E6;
    --creme-2: #FBEFD0;
    --brun: #3A2410;
    --brun-2: #6B5238;
    --anthracite: #2B2622;
    --tomate: #D2402A;
    --tomate-fonce: #B53420;
    --vert: #2F7A2B;
    --vert-fond: #E4F2DF;
    --bronze: #A8641A;
    --filet: rgba(58, 36, 16, 0.14);
    --ombre: 0 6px 18px rgba(58, 36, 16, 0.10);
    --ombre-forte: 0 14px 32px rgba(58, 36, 16, 0.18);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--creme);
    color: var(--brun);
    min-height: 100vh;
    line-height: 1.5;
    padding-bottom: 40px;
}

h1, h2, h3 { font-family: var(--font-display); }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { font-size: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }
::selection { background: var(--jaune); color: var(--brun); }
.icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important; scroll-behavior: auto !important;
    }
}

/* ---------- BOUTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
    font-weight: 800; font-size: 14px; letter-spacing: 0.2px; cursor: pointer; text-decoration: none;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.1s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-action { background: var(--tomate); color: #fff; }               /* commander, ajouter */
.btn-action:hover:not(:disabled) { background: var(--tomate-fonce); }
.btn-marque { background: var(--jaune); color: var(--brun); }
.btn-marque:hover { background: var(--jaune-fonce); }
.btn-contour { background: transparent; border-color: var(--brun); color: var(--brun); }
.btn-contour:hover { background: var(--brun); color: var(--jaune); }
.btn-contour-clair { background: transparent; border-color: var(--jaune); color: var(--jaune); }
.btn-contour-clair:hover { background: var(--jaune); color: var(--brun); }

/* ---------- EN-TÊTE ---------- */
header.entete {
    background: var(--anthracite);
    border-bottom: 4px solid var(--jaune);
    padding: 12px 28px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
}
.entete .logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.entete .logo img {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--jaune);
}
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.entete .marque { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--creme); letter-spacing: 1.5px; }
.logo-tag { font-size: 10.5px; color: var(--jaune); letter-spacing: 1.2px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn-header {
    padding: 9px 16px; border: 1.5px solid rgba(255, 248, 230, 0.35); border-radius: 999px;
    background: transparent; color: var(--creme); cursor: pointer; font-weight: 700; font-size: 13px;
    display: flex; align-items: center; gap: 7px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.25s var(--ease);
}
.btn-header:hover { border-color: var(--jaune); color: var(--jaune); }
.btn-header.orders { border-color: var(--jaune); color: var(--jaune); }
.btn-header.orders:hover { background: var(--jaune); color: var(--brun); }
#panier_btn.pulse { transform: scale(1.12); }

.bandeau-ferme {
    background: var(--tomate); color: #fff; text-align: center; padding: 12px 20px;
    font-size: 14px; font-weight: 700; line-height: 1.5;
}
.bandeau-ferme small { display: block; font-weight: 500; opacity: 0.92; margin-top: 2px; }

/* ---------- PIED DE PAGE ---------- */
footer.pied {
    background: var(--anthracite); color: var(--creme); text-align: center;
    padding: 44px 20px 22px; margin-top: 60px; border-top: 4px solid var(--jaune);
    font-size: 13.5px;
}
.pied .foot-brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--jaune); }
.pied .foot-sous { color: rgba(255, 248, 230, 0.75); margin-bottom: 14px; }
.foot-infos { line-height: 1.9; margin-bottom: 18px; }
.foot-infos a { color: var(--jaune); text-decoration: underline; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.foot-links a { color: var(--creme); text-decoration: none; font-weight: 700; font-size: 13px; }
.foot-links a:hover { color: var(--jaune); }
.pied .copyright { color: rgba(255, 248, 230, 0.6); font-size: 12px; margin-top: 6px; }

/* ---------- WHATSAPP, TOAST, RETOUR EN HAUT ---------- */
.wa-float {
    position: fixed; bottom: 20px; right: 20px; z-index: 950; width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--ombre-forte); transition: transform 0.2s var(--ease), bottom 0.2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }

#notif {
    position: fixed; bottom: 88px; right: 20px; display: none; align-items: center; gap: 8px;
    background: var(--vert); color: #fff; padding: 13px 22px; border-radius: 12px;
    font-weight: 700; font-size: 14px; box-shadow: var(--ombre-forte); z-index: 2000;
}
#notif.show { display: flex; }

#backToTop {
    position: fixed; bottom: 20px; left: 20px; width: 42px; height: 42px; border-radius: 50%;
    background: var(--anthracite); border: 2px solid var(--jaune); color: var(--jaune);
    align-items: center; justify-content: center; cursor: pointer; display: none; z-index: 900;
}
#backToTop.visible { display: flex; }

/* ---------- PANIER ---------- */
#panier_overlay {
    position: fixed; inset: 0; background: rgba(43, 38, 34, 0.6); backdrop-filter: blur(3px);
    display: none; z-index: 1500; animation: fadeIn 0.3s var(--ease);
}
#panier_overlay.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#panier_popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 92%; max-width: 440px;
    background: var(--creme); color: var(--brun); border-radius: 22px; padding: 26px;
    border: 3px solid var(--jaune); box-shadow: var(--ombre-forte);
    display: none; z-index: 1600; animation: popIn 0.35s var(--ease);
}
#panier_popup.open { display: block; }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.94); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

#panier_popup h2 { display: flex; align-items: center; gap: 8px; font-size: 21px; margin-bottom: 15px; }
.close-panier { position: absolute; top: 18px; right: 18px; background: transparent; border: none; color: var(--brun-2); display: flex; cursor: pointer; }
.close-panier:hover { color: var(--tomate); }
.panier-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; }
.panier-total .montant { color: var(--tomate); }

.cart-vide { text-align: center; color: var(--brun-2); padding: 24px 0; font-size: 14px; }
.cart-item { display: flex; gap: 12px; padding: 12px; margin-bottom: 10px; background: #fff; border: 1px solid var(--filet); border-radius: 14px; }
.cart-item img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.cart-info { flex: 1; min-width: 0; }
.cart-nom { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.cart-prix { font-size: 12px; color: var(--brun-2); margin-top: 2px; }
.cart-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--filet); background: var(--creme); color: var(--brun); font-size: 17px; cursor: pointer; }
.cart-btn:hover { border-color: var(--bronze); background: var(--jaune); }
.cart-qte { min-width: 24px; text-align: center; font-weight: 800; }
.cart-sous { margin-top: 6px; font-weight: 800; color: var(--tomate); font-size: 14px; }
.cart-suppr { margin-top: 6px; background: none; border: none; color: var(--brun-2); font-size: 12px; text-decoration: underline; cursor: pointer; }
.cart-suppr:hover { color: var(--tomate); }

/* Barre « Voir mon panier » collée en bas sur mobile */
.barre-panier {
    display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 960;
    background: var(--tomate); color: #fff; border: none; border-radius: 16px; padding: 15px 18px;
    align-items: center; justify-content: space-between; font-weight: 800; font-size: 15px;
    box-shadow: var(--ombre-forte); cursor: pointer;
}

@media screen and (max-width: 768px) {
    #panier_popup {
        top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: 100%;
        border-radius: 22px 22px 0 0; border-bottom: none; padding: 22px 20px 30px; animation: slideUp 0.35s var(--ease);
    }
    @keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
    body.has-cart .barre-panier { display: flex; }
    body.has-cart { padding-bottom: 96px; }
    body.has-cart .wa-float { bottom: 82px; }
    body.has-cart #backToTop { bottom: 82px; }
    body.has-cart #notif { bottom: 150px; }
}

@media screen and (max-width: 480px) {
    header.entete { padding: 10px 14px; }
    .entete .marque { font-size: 16px; letter-spacing: 1px; }
    .logo-tag { font-size: 9px; }
}

/* ---------- ÉLÉMENTS COMMUNS AUX AUTRES PAGES ---------- */
.carte { background: #fff; border: 1px solid var(--filet); border-radius: 18px; box-shadow: var(--ombre); padding: 24px; }
.champ {
    width: 100%; padding: 13px 16px; border: 1.5px solid var(--filet); border-radius: 12px;
    background: #fff; color: var(--brun); font-size: 16px; outline: none;
}
.champ:focus { border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(253, 191, 24, 0.35); }
.etat-ok { background: var(--vert-fond); color: var(--vert); border: 1px solid var(--vert); }
.etat-attente { background: var(--creme-2); color: var(--bronze); border: 1px solid var(--bronze); }
.etat-ko { background: #FBE3DD; color: var(--tomate-fonce); border: 1px solid var(--tomate); }


/* ---------- ADMIN ---------- */
header.entete { flex-wrap: wrap; gap: 10px; }
.header-actions { flex-wrap: wrap; }

.page-admin { max-width: 1100px; margin: 22px auto 0; padding: 0 16px; display: grid; gap: 18px; }
.page-admin h1 { font-size: 26px; }
.page-admin h2 { font-size: 19px; margin-bottom: 12px; }
.intro { color: var(--brun-2); font-size: 14.5px; line-height: 1.6; }

.message-flash { padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; background: var(--creme-2); border: 1px solid var(--bronze); }

.grille-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; margin-bottom: 12px; }
.grille-form label, .page-admin label.lab { display: block; font-size: 13px; font-weight: 800; margin-bottom: 5px; }

.btn-petit { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: transparent; border-color: var(--tomate); color: var(--tomate-fonce); }
.btn-danger:hover { background: var(--tomate); color: #fff; }
.btn-vert { background: var(--vert); color: #fff; }
.btn-vert:hover { background: #256321; }

.tableau-wrap { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.tableau th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--brun-2); padding: 10px 8px; border-bottom: 2px solid var(--filet); }
.tableau td { padding: 12px 8px; border-bottom: 1px solid var(--filet); vertical-align: top; }

.puce { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.puce.ok { background: var(--vert-fond); color: var(--vert); }
.puce.attente { background: var(--creme-2); color: var(--bronze); }
.puce.ko { background: #FBE3DD; color: var(--tomate-fonce); }
.puce.neutre { background: #EFE8DA; color: var(--brun-2); }

.bandeau-mode { padding: 12px 16px; border-radius: 12px; font-weight: 800; font-size: 14px; }
.liste-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--filet); }
.liste-ligne:last-child { border-bottom: none; }
.mdp-champ { position: relative; }
.mdp-champ .champ { padding-right: 96px; }
.mdp-champ button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--creme-2); border: none; border-radius: 8px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--brun); cursor: pointer; }