* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #fff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    z-index: 50;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 50px;
    height: auto;
}

.navbar .links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.navbar a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.navbar a i {
    font-size: 20px;
    transition: transform 0.2s;
}

.navbar a .hidden_text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    transition: all 0.3s ease;
    white-space: nowrap;
    background: rgba(168, 85, 247, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-size: 0.85rem;
}

.navbar a:hover .hidden_text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.navbar a:hover i {
    transform: scale(1.1);
    color: #a855f7;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}


.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    min-height: calc(100vh - 200px);
    margin-top: 80px;
}

section {
    padding: 6rem 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

section > div,
section > form,
section > .content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h1, h2, h3 {
    font-weight: bold;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 1rem;
    text-align: center;
}

h3 {
    font-size: 1.25rem;
}

.section-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


.log_reg {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: #1e293b;
    border-radius: 1rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.log_reg__field {
    margin-bottom: 1.5rem;
    position: relative;
}

.log_reg__icon {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #a855f7;
    font-size: 1.1rem;
}

.log_reg__input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background: #0f172a;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 0.5rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.log_reg__input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.checkout__title {
    font-size: 1.25rem;
    margin: 2rem 0 1.5rem 0;
    color: #a855f7;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(168, 85, 247, 0.2);
}

.button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, #a855f7, #7c3aed);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.log_reg__submit {
    margin-top: 2rem;
}


.separateur {
    width: 100%;
    overflow: hidden;
    margin: 0;
}

.separateur img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}


footer {
    background: linear-gradient(135deg, #111827 0%, #1a1f3a 100%);
    padding: 3rem 2rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    margin-top: 4rem;
}

.footer {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    color: #9ca3af;
    text-align: center;
    margin: 0.5rem 0;
}

.footer a {
    color: #a855f7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #d8b4fe;
    text-decoration: underline;
}


.categorie {
    margin: 3rem 0;
}

.categorie h2 {
    background: linear-gradient(to right, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid rgba(168, 85, 247, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.produit {
    background: #1e293b;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.produit:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
}

.produit img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.produit h3 {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.produit p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.stock {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.stock-ok {
    color: #10b981;
}

.stock-faible {
    color: #f59e0b;
}

.stock-rupture {
    color: #ef4444;
}

.btn-panier {
    background: linear-gradient(to right, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    margin-top: auto;
}

.btn-panier:hover {
    opacity: 0.9;
    transform: scale(1.02);
}


.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.voir-produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.voir-produit {
    background: #1e293b;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.voir-produit:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
}

.voir-produit img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.pegi-voir-produit img {
    width: 127px;
    height: 155px;
    object-fit: cover;
    margin-bottom: 1rem;
}
.voir-produit h3 {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.voir-produit p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

@keyframes popupIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.popup-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.popup-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.popup-close {
    background: linear-gradient(to right, #a855f7, #7c3aed);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.popup-close:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
    }

    .navbar .links {
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo img {
        width: 40px;
    }

    .menu-btn {
        display: block;
    }

    .main {
        margin-top: 60px;
        padding: 1rem;
    }

    section {
        padding: 3rem 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .log_reg {
        padding: 1.5rem;
        max-width: 100%;
    }

    .produits-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .produit img {
        height: 150px;
    }

    .checkout__title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .navbar .links {
        display: none;
    }

    h2 {
        font-size: 1.5rem;
    }

    .log_reg {
        padding: 1rem;
    }

    .produits-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2rem 1rem;
    }

    footer {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .cart {
        grid-template-columns: 1fr;
    }
}

.a2f-container {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 0.5rem;
}

.a2f-container h4 {
    color: #a855f7;
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.a2f-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #0f172a;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.a2f-option:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}

.a2f-option input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #a855f7;
}

.a2f-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.a2f-option label strong {
    color: #d1d5db;
    display: block;
    margin-bottom: 0.25rem;
}

.a2f-option label small {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* panier*/
.cart {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ---- LEFT CART ---- */
.left-cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---- ARTICLE CARD ---- */
.info-cart-article {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
    background: #1e293b;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.info-cart-article:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.2);
    transform: translateY(-2px);
}

/* Image prend tout l'espace gauche */
.info-cart-article-left {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.info-cart-article-left figure {
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 180px;
}

.info-cart-article-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 0;
}

.info-cart-article:hover .info-cart-article-left img {
    transform: scale(1.05);
}

/* ---- CONTENU DROIT ---- */
.info-cart-article-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #1e293b;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-nom {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    line-height: 1.3;
}

.article-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-categorie {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.badge-pegi {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.article-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.55;
    flex-grow: 1;
    margin: 0;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(168, 85, 247, 0.15);
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Prix */
.article-prix {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.prix-unitaire {
    font-size: 0.8rem;
    color: #64748b;
}

.prix-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #a855f7;
    background: linear-gradient(to right, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Boutons quantité */
.article-quantite {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #0f172a;
    padding: 0.35rem 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.btn-qty {
    width: 34px;
    height: 34px;
    border-radius: 0.5rem;
    border: none;
    background: linear-gradient(to right, #a855f7, #7c3aed);
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-qty:hover {
    opacity: 0.85;
    transform: scale(1.08);
}

.btn-minus {
    background: linear-gradient(to right, #6b21a8, #4c1d95);
}

.qty-display {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #f1f5f9;
}

/* Panier vide */
.cart-empty {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    background: #1e293b;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 1rem;
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: rgba(168, 85, 247, 0.3);
}

/* ---- RIGHT CART ---- */
.right-cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 90px;
}

.info-cart,
.code-cart,
.price-cart {
    background: #1e293b;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.info-cart-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a855f7;
    margin-bottom: 0.75rem;
}

.info-cart-title:not(:first-child) {
    margin-top: 0.5rem;
}

.info-cart-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.info-cart-row i {
    color: #7c3aed;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.info-cart-divider {
    height: 1px;
    background: rgba(168, 85, 247, 0.15);
    margin: 0.75rem 0;
}

.no-address {
    color: #f59e0b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Prix récapitulatif */
.price-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.price-row.discount span:last-child {
    color: #10b981;
}

.price-divider {
    height: 1px;
    background: rgba(168, 85, 247, 0.2);
    margin: 0.25rem 0;
}

.price-row.total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
}

.price-row.total span:last-child {
    color: #a855f7;
    font-size: 1.25rem;
}

.btn-pay {
    margin-top: 0 !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .cart {
        grid-template-columns: 1fr;
    }

    .right-cart {
        position: static;
    }
}

@media (max-width: 600px) {
    .info-cart-article {
        grid-template-columns: 1fr;
    }

    .info-cart-article-left figure {
        min-height: 200px;
        max-height: 220px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

.cgu_input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(168, 85, 247, 0.07);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 0.6rem;
}

#cgu {
    width: 18px;
    height: 18px;
    accent-color: #a855f7;
    cursor: pointer;
    flex-shrink: 0;
}

.cgu-text {
    font-size: 0.88rem;
    color: #94a3b8;
}

.cgu-text a {
    color: #a855f7;
    text-decoration: none;
    border-bottom: 1px solid rgba(168, 85, 247, 0.4);
    transition: all 0.2s;
}

.cgu-text a:hover {
    color: #d8b4fe;
    border-bottom-color: #d8b4fe;
}