:root {
    --bg-base: #302b27;
    --bg-card: #403a35;
    --bg-darker: #1d1917;
    --bg-lighter: #4d4640;
    --text-main: #fff;
    --text-muted: #b7b0aa;
    --accent: #d9a15b;
    --accent-soft: #edd0a5;
    --font-main: "Poppins", sans-serif;
    --shadow-out: 8px 8px 16px var(--bg-darker), -8px -8px 16px var(--bg-lighter);
    --shadow-floating: 0 20px 50px rgba(0,0,0,.45);
    --transition: all .3s cubic-bezier(.25,.8,.25,1);
}

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

html { scroll-behavior:smooth; }

body {
    font-family:var(--font-main);
    background:var(--bg-base);
    color:var(--text-main);
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
}

body.modal-open { overflow:hidden; }

a { color:inherit; text-decoration:none; }

button, input, select { font:inherit; }

button { cursor:pointer; border:0; }

img { max-width:100%; display:block; }

header {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    padding:2rem 5%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    z-index:100;
}

.logo-wrap {
    display:flex;
    align-items:center;
    gap:1rem;
    cursor:pointer;
}

.logo {
    font-size:1.5rem;
    font-weight:800;
    letter-spacing:3px;
}

.nav-links {
    display:flex;
    gap:2rem;
    font-size:.85rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:1px;
}

.nav-links a { transition:color .25s; }
.nav-links a:hover { color:var(--accent); }

.header-actions { display:flex; align-items:center; }

.btn-buy-now {
    background:rgba(255,255,255,.18);
    color:#fff;
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    padding:.8rem 1.4rem;
    border-radius:10px;
    display:flex;
    align-items:center;
    gap:.55rem;
    font-weight:600;
    border:1px solid rgba(255,255,255,.12);
    transition:var(--transition);
}

.btn-buy-now:hover { background:rgba(255,255,255,.28); transform:translateY(-2px); }

.cart-badge {
    min-width:25px;
    height:25px;
    padding:0 7px;
    border-radius:20px;
    background:var(--accent);
    color:#18120e;
    display:grid;
    place-items:center;
    font-size:.78rem;
    font-weight:800;
}

.hero {
    min-height:80vh;
    position:relative;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:0 5%;
    overflow:visible;
    background:
        linear-gradient(90deg, rgba(20,12,10,.92) 0%, rgba(20,12,10,.72) 35%, rgba(20,12,10,.35) 75%, rgba(20,12,10,.15) 100%);
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}

.hero-content {
    max-width:760px;
    padding-top:4rem;
}

.eyebrow {
    color:var(--accent-soft);
    font-size:.8rem;
    font-weight:700;
    letter-spacing:4px;
    margin-bottom:1rem;
}

.hero h1 {
    font-size:clamp(3rem,6vw,5rem);
    line-height:1.08;
    font-weight:800;
    text-transform:uppercase;
    margin-bottom:1.2rem;
}

.hero-subtitle {
    max-width:600px;
    color:#ddd6d1;
    font-size:1rem;
    line-height:1.7;
}

.search-pill {
    position:absolute;
    left:50%;
    bottom:-35px;
    transform:translateX(-50%);
    width:90%;
    max-width:800px;
    min-height:70px;
    padding:.5rem;
    display:flex;
    align-items:center;
    background:#fff;
    color:#111;
    border-radius:40px;
    box-shadow:var(--shadow-floating);
    z-index:10;
}

.search-pill > svg { margin-left:1rem; color:#777; flex:none; }

.search-pill input {
    flex:1;
    min-width:0;
    border:0;
    outline:0;
    padding:1rem 1.2rem;
    background:transparent;
    color:#111;
}

.search-pill input::placeholder { color:#777; }

.search-btn {
    background:var(--bg-base);
    color:#fff;
    padding:1rem 2rem;
    border-radius:30px;
    font-weight:700;
    transition:var(--transition);
}

.search-btn:hover { background:#111; }

.showcase-section { padding:6rem 0 4rem; }

.section-header {
    text-align:center;
    margin-bottom:2rem;
    padding:0 5%;
}

.section-header h2 {
    font-size:clamp(1.8rem,4vw,2.5rem);
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:1px;
}

.nav-cats {
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:1.5rem;
    margin-bottom:1.2rem;
    color:var(--text-muted);
    font-size:.9rem;
    font-weight:600;
    text-transform:uppercase;
}

.nav-cats span {
    cursor:pointer;
    transition:color .25s, transform .25s;
}

.nav-cats span:hover,
.nav-cats span.active {
    color:#fff;
}

.nav-cats span.active { transform:translateY(-2px); }

.product-carousel {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:2rem;
    padding:2rem 5%;
}

.product-card {
    width:100%;
    background:var(--bg-card);
    border-radius:26px;
    padding:1.2rem;
    box-shadow:var(--shadow-out);
    transition:var(--transition);
    display:flex;
    flex-direction:column;
}

.product-card:hover { transform:translateY(-8px); }

.p-card-header { padding:.5rem .4rem 1rem; }

.p-title {
    font-size:1rem;
    font-weight:700;
    margin-bottom:.35rem;
}

.p-meta {
    display:flex;
    justify-content:space-between;
    gap:1rem;
    color:var(--text-muted);
    font-size:.78rem;
    text-transform:capitalize;
}

.p-price { color:var(--accent-soft); font-weight:700; }

.p-image {
    width:100%;
    height:250px;
    object-fit:cover;
    border-radius:18px;
    margin-bottom:1rem;
}

.add-cart-btn {
    width:100%;
    padding:1rem;
    border-radius:13px;
    background:var(--bg-base);
    color:#fff;
    font-weight:700;
    text-transform:uppercase;
    box-shadow:var(--shadow-out);
    transition:var(--transition);
    margin-top:auto;
}

.add-cart-btn:hover { color:var(--accent); }

.add-cart-btn:active { transform:scale(.98); }

.empty-state {
    width:100%;
    text-align:center;
    padding:3rem 1rem;
    color:var(--text-muted);
}

.info-section { padding:4rem 5% 6rem; }

.info-section h2 {
    text-align:center;
    font-size:2rem;
    font-weight:800;
    margin-bottom:3rem;
    color:var(--text-muted);
}

.info-section h2 span { color:#fff; }

.info-grid {
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:1.5rem;
}

.info-box {
    background:var(--bg-card);
    border-radius:20px;
    padding:1.5rem;
    display:flex;
    align-items:center;
    gap:1.3rem;
    box-shadow:var(--shadow-out);
    transition:var(--transition);
}

.info-box:hover { transform:translateY(-5px); }

.info-link {
    color:inherit;
    text-decoration:none;
    cursor:pointer;
}

.info-text {
    min-width:0;
}

.info-text strong,
.info-text small {
    display:block;
}

.info-text strong {
    font-size:.9rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.7px;
}

.info-text small {
    margin-top:.35rem;
    color:var(--text-muted);
    font-size:.78rem;
    font-weight:500;
    text-transform:none;
    letter-spacing:0;
    line-height:1.4;
}

.info-icon {
    width:56px;
    height:56px;
    flex:none;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:var(--bg-base);
    box-shadow:var(--shadow-out);
    color:var(--accent-soft);
    font-weight:800;
    font-size:1.3rem;
}

.cart-overlay {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.7);
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
    z-index:1000;
    opacity:0;
    visibility:hidden;
    transition:var(--transition);
}

.cart-overlay.active { opacity:1; visibility:visible; }

.cart-sidebar {
    position:fixed;
    top:0;
    right:-460px;
    width:min(450px,100%);
    height:100%;
    background:var(--bg-base);
    z-index:1001;
    box-shadow:var(--shadow-floating);
    display:flex;
    flex-direction:column;
    transition:right .4s cubic-bezier(.25,.8,.25,1);
}

.cart-sidebar.active { right:0; }

.cart-header {
    padding:1.5rem 2rem;
    border-bottom:1px solid rgba(255,255,255,.07);
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.cart-header h3 { font-size:1.4rem; }

.cart-header button,
.admin-topbar button {
    width:42px;
    height:42px;
    border-radius:12px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:1.8rem;
}

.cart-items {
    flex:1;
    overflow-y:auto;
    padding:1.5rem;
    display:flex;
    flex-direction:column;
    gap:1rem;
}

.cart-item {
    display:flex;
    gap:1rem;
    padding:1rem;
    background:var(--bg-card);
    border-radius:15px;
}

.cart-item img {
    width:75px;
    height:75px;
    object-fit:cover;
    border-radius:10px;
}

.cart-item-info { flex:1; min-width:0; }

.cart-item-title {
    font-size:.9rem;
    font-weight:700;
    margin-bottom:.3rem;
}

.cart-item-price {
    color:var(--accent-soft);
    font-weight:700;
    font-size:.85rem;
}

.qty-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:.7rem;
}

.qty-controls {
    display:flex;
    align-items:center;
    gap:.9rem;
    background:var(--bg-base);
    border-radius:8px;
    padding:.3rem .5rem;
}

.qty-btn { background:none; color:#fff; padding:0 .25rem; font-weight:800; }

.remove-btn {
    background:none;
    color:#ff7777;
    font-size:.75rem;
    text-decoration:underline;
}

.cart-footer {
    padding:1.5rem 2rem;
    border-top:1px solid rgba(255,255,255,.07);
}

.cart-total {
    display:flex;
    justify-content:space-between;
    font-size:1.15rem;
    font-weight:800;
    margin-bottom:1rem;
}

.checkout-btn {
    width:100%;
    padding:1rem;
    border-radius:14px;
    background:#25d366;
    color:#07140b;
    font-weight:800;
    transition:var(--transition);
}

.checkout-btn:hover { transform:translateY(-2px); }

.admin-modal {
    position:fixed;
    inset:0;
    z-index:2000;
    background:var(--bg-base);
    overflow-y:auto;
    padding:2rem 5%;
    display:none;
}

.admin-modal.active { display:block; }

.admin-topbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding-bottom:1rem;
    border-bottom:1px solid rgba(255,255,255,.1);
}

.admin-grid {
    display:grid;
    grid-template-columns:1fr 2fr;
    gap:2rem;
    margin-top:2rem;
}

.admin-panel {
    background:var(--bg-card);
    padding:1.5rem;
    border-radius:20px;
    box-shadow:var(--shadow-out);
}

.admin-panel h3 { margin-bottom:1.5rem; }

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

.form-group label {
    display:block;
    margin-bottom:.45rem;
    color:var(--text-muted);
    font-size:.85rem;
}

.form-group input,
.form-group select {
    width:100%;
    padding:.9rem;
    border:0;
    outline:0;
    border-radius:10px;
    background:var(--bg-base);
    color:#fff;
    box-shadow:inset 4px 4px 8px var(--bg-darker), inset -4px -4px 8px var(--bg-lighter);
}

.admin-btn {
    width:100%;
    padding:1rem;
    margin-top:.6rem;
    border-radius:10px;
    background:#fff;
    color:var(--bg-base);
    font-weight:800;
}

.admin-btn.secondary {
    display:none;
    background:transparent;
    color:#fff;
    border:1px solid rgba(255,255,255,.25);
}

.admin-list-item {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    padding:.8rem;
    margin-bottom:.8rem;
    border-radius:10px;
    background:var(--bg-base);
}

.admin-product-main {
    display:flex;
    align-items:center;
    gap:.8rem;
    min-width:0;
}

.admin-product-main img {
    width:50px;
    height:50px;
    object-fit:cover;
    border-radius:8px;
}

.admin-product-name { font-weight:700; }
.admin-product-price { color:var(--text-muted); font-size:.78rem; }

.admin-actions {
    display:flex;
    gap:.4rem;
}

.admin-actions button {
    padding:.5rem .7rem;
    border-radius:7px;
    color:#fff;
    background:#555;
}

.admin-actions .delete { background:#c95151; }

.toast {
    position:fixed;
    left:50%;
    bottom:30px;
    transform:translateX(-50%) translateY(100px);
    background:var(--accent);
    color:#1d140d;
    padding:.9rem 1.5rem;
    border-radius:30px;
    font-weight:700;
    opacity:0;
    z-index:3000;
    transition:var(--transition);
}

.toast.show {
    transform:translateX(-50%) translateY(0);
    opacity:1;
}

@media (max-width:900px) {
    .nav-links { display:none; }

    header { padding:1.3rem 5%; }

    .hero {
        min-height:70vh;
        background:
            linear-gradient(180deg, rgba(20,12,10,.55) 0%, rgba(20,12,10,.85) 100%);
        background-size:cover;
        background-position:center 30%;
    }

    .hero-content { padding-top:3rem; }

    .hero h1 { font-size:clamp(2.5rem,9vw,4rem); }

    .hero-subtitle { font-size:.9rem; max-width:440px; }

    .search-pill {
        width:90%;
        bottom:-75px;
        min-height:0;
        padding:1rem;
        border-radius:25px;
        flex-wrap:wrap;
    }

    .search-pill > svg {
        margin-left:.5rem;
        margin-right:.2rem;
    }

    .search-pill input {
        width:calc(100% - 45px);
        padding:.9rem .5rem;
    }

    .search-btn {
        width:100%;
        margin-top:.5rem;
    }

    .showcase-section { padding-top:9rem; }

    .nav-cats {
        justify-content:flex-start;
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:.5rem;
        scrollbar-width:none;
    }

    .nav-cats::-webkit-scrollbar { display:none; }

    .nav-cats span { white-space:nowrap; }

    .admin-grid { grid-template-columns:1fr; }

    .product-carousel { grid-template-columns:1fr; }
}

@media (max-width:560px) {
    .logo { font-size:1.25rem; }
    .logo-wrap svg { width:28px; height:28px; }

    .btn-buy-now {
        padding:.7rem .8rem;
    }

    .btn-buy-now span:nth-child(2) { display:none; }

    .hero {
        min-height:78vh;
        background-position:center bottom;
    }

    .hero h1 { font-size:2.55rem; }

    .info-grid { grid-template-columns:1fr; }

    .cart-sidebar { width:100%; }

    .admin-list-item {
        align-items:flex-start;
        flex-direction:column;
    }

    .admin-actions { width:100%; }

    .admin-actions button { flex:1; }
}


/* Hero responsive image: desktop >= 769px, mobile <= 768px. */
@media (max-width: 768px) {
    .hero {
        background-image:
            linear-gradient(90deg, rgba(20,12,10,.78) 0%, rgba(20,12,10,.52) 45%, rgba(20,12,10,.22) 100%),
            url("../assets/hero-mobile.png");
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }
}

@media (min-width: 769px) {
    .hero {
        background-image:
            linear-gradient(90deg, rgba(20,12,10,.92) 0%, rgba(20,12,10,.72) 35%, rgba(20,12,10,.35) 75%, rgba(20,12,10,.15) 100%),
            url("../assets/hero-desktop.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

.p-image-button.no-image {
    min-height:220px;
    display:grid;
    place-items:center;
    background:linear-gradient(145deg, #2c2724, #1f1b19);
    cursor:pointer;
}

.p-image-placeholder {
    font-size:1rem;
    font-weight:800;
    letter-spacing:3px;
    color:var(--accent-soft);
}

.cart-item-placeholder,
.admin-item-placeholder {
    display:grid;
    place-items:center;
    flex:0 0 auto;
    width:70px;
    height:70px;
    border-radius:12px;
    background:#2c2724;
    color:var(--accent-soft);
    font-weight:800;
}

/* Product actions + product detail lightbox */
.p-image-button {
    position:relative;
    width:100%;
    padding:0;
    border:0;
    background:none;
    border-radius:18px;
    overflow:hidden;
    display:block;
    cursor:zoom-in;
    margin-bottom:1rem;
}

.p-image-button .p-image {
    margin-bottom:0;
    transition:transform .35s ease;
}

.p-image-button:hover .p-image { transform:scale(1.035); }

.image-zoom-hint {
    position:absolute;
    left:12px;
    bottom:12px;
    display:flex;
    align-items:center;
    gap:7px;
    padding:.55rem .75rem;
    border-radius:999px;
    background:rgba(20,17,15,.78);
    color:#fff;
    font-size:.72rem;
    font-weight:700;
    opacity:0;
    transform:translateY(5px);
    transition:opacity .25s ease, transform .25s ease;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}

.p-image-button:hover .image-zoom-hint,
.p-image-button:focus-visible .image-zoom-hint {
    opacity:1;
    transform:translateY(0);
}

.product-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.65rem;
    margin-top:auto;
}

.product-actions button {
    min-height:52px;
    padding:.75rem .8rem;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.45rem;
    font-size:.78rem;
    font-weight:800;
    line-height:1.15;
    transition:var(--transition);
}

.product-actions button:active { transform:scale(.98); }

.product-actions .add-cart-btn {
    width:auto;
    margin-top:0;
    padding:.75rem .8rem;
}

.whatsapp-order-btn {
    background:#25d366;
    color:#07140b;
}

.whatsapp-order-btn:hover {
    background:#20bd5b;
    transform:translateY(-2px);
}

.product-modal {
    position:fixed;
    inset:0;
    z-index:2500;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1.5rem;
    background:rgba(10,8,7,.82);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .25s ease, visibility .25s ease;
}

.product-modal.active {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.product-modal-card {
    position:relative;
    width:min(920px,100%);
    max-height:min(90vh,900px);
    overflow:auto;
    display:grid;
    grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,.08);
    border-radius:28px;
    box-shadow:0 30px 90px rgba(0,0,0,.6);
    transform:translateY(15px) scale(.98);
    transition:transform .3s ease;
}

.product-modal.active .product-modal-card {
    transform:translateY(0) scale(1);
}

.product-modal-close {
    position:absolute;
    top:14px;
    right:14px;
    z-index:3;
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(20,16,14,.72);
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}

.product-modal-image-wrap {
    min-height:500px;
    background:#28231f;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product-modal-image-wrap img {
    width:100%;
    height:100%;
    min-height:500px;
    max-height:650px;
    object-fit:contain;
}

.product-modal-content {
    padding:3.2rem 2.3rem 2.3rem;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.product-modal-category {
    color:var(--accent-soft);
    font-size:.78rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:2px;
    margin-bottom:.7rem;
}

.product-modal-content h3 {
    font-size:clamp(1.6rem,3vw,2.4rem);
    line-height:1.15;
    margin-bottom:.8rem;
}

.product-modal-price {
    color:var(--accent-soft);
    font-size:1.25rem;
    font-weight:800;
    margin-bottom:1.2rem;
}

.product-modal-description {
    color:var(--text-muted);
    font-size:.9rem;
    line-height:1.7;
    margin-bottom:1.5rem;
}

.product-modal-actions {
    display:grid;
    grid-template-columns:1fr;
    gap:.7rem;
}

.product-modal-actions button {
    min-height:54px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.55rem;
    font-weight:800;
    transition:var(--transition);
}

.modal-cart-btn {
    background:var(--bg-base);
    color:#fff;
}

.modal-cart-btn:hover { color:var(--accent); }

.modal-whatsapp-btn {
    background:#25d366;
    color:#07140b;
}

.modal-whatsapp-btn:hover {
    background:#20bd5b;
    transform:translateY(-2px);
}

@media (max-width:768px) {
    .product-actions { gap:.55rem; }

    .product-actions button {
        min-height:50px;
        font-size:.73rem;
        padding:.65rem .5rem;
    }

    .product-actions svg { flex:none; }

    .product-modal { padding:.7rem; }

    .product-modal-card {
        width:100%;
        max-height:94vh;
        display:block;
        border-radius:22px;
    }

    .product-modal-image-wrap,
    .product-modal-image-wrap img {
        min-height:0;
        height:46vh;
        max-height:520px;
    }

    .product-modal-image-wrap img { object-fit:contain; }

    .product-modal-content { padding:1.4rem 1.2rem 1.2rem; }
    .product-modal-content h3 { font-size:1.55rem; }
    .product-modal-description { font-size:.82rem; margin-bottom:1rem; }

    .product-modal-close {
        width:38px;
        height:38px;
        top:10px;
        right:10px;
    }
}

@media (max-width:420px) {
    .product-actions button span { white-space:nowrap; }
    .product-actions button { font-size:.69rem; }
}

.auth-modal{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.72);backdrop-filter:blur(10px)}
.auth-modal.active{display:flex}
.auth-card{position:relative;width:min(100%,520px);padding:34px;border-radius:28px;background:#3f3934;box-shadow:0 30px 90px rgba(0,0,0,.45);color:#fff}
.auth-card h2{margin:8px 0 8px;font-size:28px}.auth-card p{color:#d7d0c8;line-height:1.5}.auth-brand{font-weight:800;letter-spacing:.2em;font-size:14px}.auth-close{position:absolute;right:18px;top:18px;border:0;border-radius:14px;background:#2d2925;color:#fff;font-size:30px;width:48px;height:48px;cursor:pointer}.auth-message{min-height:22px;margin:12px 0 0!important;color:#f0c77a!important}.field-help{display:block;margin-top:7px;color:#bdb5ad;font-size:12px}
#admin-image-file{padding:12px;background:#2d2925;color:#eee;border-radius:14px;border:1px solid rgba(255,255,255,.08);width:100%}
.admin-top-actions{display:flex;gap:10px;align-items:center}.admin-logout{border:0;border-radius:12px;padding:11px 15px;background:#2d2925;color:#fff;cursor:pointer}

/* Correction débordement de l'en-tête Administration sur mobile */
.admin-topbar {
    width:100%;
    max-width:100%;
    min-width:0;
    gap:12px;
    flex-wrap:wrap;
}

.admin-topbar h2 {
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
}

.admin-top-actions {
    max-width:100%;
    min-width:0;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.admin-topbar .admin-logout {
    width:auto;
    max-width:100%;
    min-width:0;
    height:auto;
    padding:10px 14px;
    font-size:.9rem;
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.admin-modal,
.admin-grid,
.admin-panel,
.admin-panel form {
    min-width:0;
    max-width:100%;
}

.form-group input,
.form-group select,
#admin-image-file {
    max-width:100%;
    min-width:0;
}

@media (max-width:560px) {
    .admin-modal {
        padding:1.1rem 4%;
    }

    .admin-topbar {
        align-items:flex-start;
    }

    .admin-topbar h2 {
        flex:1 1 180px;
        font-size:1.55rem;
        line-height:1.2;
    }

    .admin-top-actions {
        flex:0 1 auto;
    }

    .admin-topbar > button:not(.admin-logout) {
        flex:0 0 42px;
    }

    .admin-topbar .admin-logout {
        flex:0 1 auto;
    }
}


/* Administration: boutons d'en-tête robustes sur mobile */
.admin-top-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:.55rem;
    flex-wrap:wrap;
    min-width:0;
}
.admin-logout {
    border:0;
    border-radius:12px;
    padding:.75rem 1rem;
    background:rgba(255,255,255,.10);
    color:#fff;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
}
.admin-close {
    width:48px;
    height:48px;
    flex:0 0 48px;
    border:0;
    border-radius:14px;
    background:rgba(255,255,255,.10);
    color:#fff;
    font-size:1.8rem;
    cursor:pointer;
}
@media (max-width:560px) {
    .admin-topbar {
        gap:.7rem;
        flex-wrap:wrap;
    }
    .admin-topbar h2 {
        min-width:0;
        flex:1 1 100%;
        overflow-wrap:anywhere;
    }
    .admin-top-actions {
        width:100%;
        justify-content:flex-end;
    }
    .admin-logout {
        min-height:48px;
    }
}
