/* ======================================
   FONTS — Google Webfonts (racing + clean)
====================================== */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

/* ======================================
   RESET & BASE
====================================== */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%; /* ← nécessaire */
}

body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    background: #f6ece2;
    color: #3a2a1f;
    overflow-x: hidden;
    display: flex;            /* ← structure verticale */
    flex-direction: column;   /* ← header → main → footer */
}

main {
    flex: 1; /* ← pousse le footer en bas */
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3, .nvbarButton, #banner div {
    font-family: "Chakra Petch", sans-serif;
}

/* ======================================
   HEADER + BANNER
====================================== */

#banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1.2rem 2rem;
    background: #3c2415;
    color: #ffddb3;
    border-bottom: 4px solid #c76b1f;
    text-transform: uppercase;
}

#banner img {
    height: 80px;
}

#banner div {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 3px;
}

/* ======================================
   NAVBAR
====================================== */

nav {
    background: linear-gradient(90deg, #3c2415, #8c4b1f, #d97a2c);
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.1rem;
}

.nvbarButton {
    color: #ffe4c4;
    text-decoration: none;
    font-size: 1.15rem;
    transition: .2s ease;
    position: relative;
}

.nvbarButton:hover {
    color: #ffc47c;
    transform: scale(1.07);
}

.nvbarButton::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    height: 2px;
    width: 0;
    background: #ffb253;
    transition: .3s ease;
    transform: translateX(-50%);
}

.nvbarButton:hover::after {
    width: 100%;
}

/* ======================================
   HEADER ACTION BUTTONS (top right)
====================================== */

.header-actions {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.headerBtn {
    background: #4b2f1e;          /* brun foncé mais plus clair que ton header */
    color: #ffddb3;               /* beige clair (lisible) */
    text-decoration: none;
    font-size: 1.35rem;
    padding: .55rem .85rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.30);
    transition: .2s ease;
    font-family: "Chakra Petch", sans-serif;
}

.headerBtn:hover {
    background: #6a4126;          /* brun plus clair au hover */
    transform: scale(1.08);
}



/* ======================================
   MAIN LAYOUT
====================================== */

main {
    max-width: 1320px;
    margin: 0 auto;
}

.gridProduct {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

/* ======================================
   HERO
====================================== */

#hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    text-align: center;
    padding: 3.5rem 2rem 4rem;
    background: linear-gradient(180deg, #3c2415 0%, #8c4b1f 50%, #d97a2c 100%);
    color: #ffe6c6;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    margin-bottom: 2rem;
}

#hero h1 {
    font-size: 3.3rem;
    margin-bottom: .5rem;
    color: #fff6e9;
    text-shadow: 0 0 8px rgba(0,0,0,0.35), 0 0 3px rgba(0,0,0,0.6);
}

#hero h2 {
    font-size: 1.6rem;
    opacity: .9;
    margin-bottom: 1rem;
    color: #fff6e9;
}

#hero p {
    max-width: 650px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    opacity: .92;
}

/* CTA buttons */

.cta-btn {
    padding: .85rem 2.2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: .2s ease;
    display: inline-block;
}

.cta-btn.primary {
    background: #ff8c32;
    color: #2e1d14;
}

.cta-btn.primary:hover {
    background: #ffa34c;
    transform: scale(1.05);
}

.cta-btn.secondary {
    border: 2px solid #ff9b52;
    color: #ffe4c4;
}

.cta-btn.secondary:hover {
    border-color: #ffc47c;
    color: #ffddb3;
    transform: scale(1.05);
}

/* ======================================
   FEATURES
====================================== */

#home-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1rem 2rem;
    text-align: center;
}

.feature {
    width: 260px;
}

.feature img {
    width: 128px;
    height: 128px;
    object-fit: contain;
    margin: 0 auto .7rem;
}

.feature h3 {
    margin: .4rem 0;
    font-size: 1.2rem;
}

/* ======================================
   PRODUCT GRID
====================================== */

.vignettes {
    width: 80%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.produit {
    width: calc((100% - 4 * 2rem) / 5);
    max-width: 280px;
    min-width: 280px;
    background: #fff8ef;
    border-radius: 14px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(100,50,20,.2);
    transition: .25s ease;
    cursor: pointer;
}

.produit:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 22px rgba(100,50,20,.25);
}

.produit img {
    border-radius: 10px;
    height: 150px;
    object-fit: contain;
    margin: 0 auto;
}

.nom {
    font-weight: 700;
    margin: .6rem 0;
    color: #573723;
}

.prix {
    color: #d1651b;
    font-size: 1.2rem;
    font-weight: bold;
}

/* ===============================
   FORMULAIRE D’INSCRIPTION
================================= */

.inscription, .connexion {
    background: #fff8ef;
    padding: 2.5rem 3rem;
    margin: 3rem auto;
    max-width: 420px;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(100,50,20,.18);
    text-align: center;
    border: 2px solid #ffddb3;
}

.inscription input[type="text"],
.inscription input[type="email"],
.inscription input[type="password"],
.connexion input[type="text"],
.connexion input[type="email"],
.connexion input[type="password"]{
    width: 100%;
    padding: .9rem 1.1rem;
    margin: .6rem 0 1rem;
    border: 2px solid #d8b08a;
    border-radius: 10px;
    background: #fffdf9;
    font-size: 1rem;
    transition: .25s ease;
    font-family: "Montserrat", sans-serif;
    color: #3a2a1f;
}

.inscription input[type="text"]:focus,
.inscription input[type="email"]:focus,
.inscription input[type="password"]:focus,
.connexion input[type="text"]:focus,
.connexion input[type="email"]:focus,
.connexion input[type="password"]:focus{
    border-color: #d97a2c;
    box-shadow: 0 0 8px rgba(217,122,44,.35);
    outline: none;
}

.inscription input[type="submit"], .connexion input[type="submit"] {
    margin-top: .5rem;
    width: 100%;
    padding: 1rem;
    background: #ff8c32;
    border: none;
    border-radius: 10px;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.2rem;
    color: #2e1d14;
    cursor: pointer;
    transition: .25s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.inscription input[type="submit"]:hover,
.connexion input[type="submit"]:hover{
    background: #ffa34c;
    transform: scale(1.04);
}

.lien-inscription-connexion {
    display: inline-block;
    margin-top: 1rem;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.1rem;
    text-decoration: none;
    color: #8c4b1f;
    position: relative;
    transition: .2s ease;
}

.lien-inscription-connexion::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d97a2c;
    transition: .3s ease;
    transform: translateX(-50%);
}

.lien-inscription-connexion:hover {
    color: #c76b1f;
    transform: scale(1.04);
}

.lien-inscription-connexion:hover::after {
    width: 100%;
}

.error-box {
    background: #ffbbbb;
    border-left: 5px solid #d40000;
    padding: .9rem 1.2rem;
    margin: 1rem auto;
    max-width: 350px;
    border-radius: 8px;
    color: #7a0d0d;
    font-family: "Montserrat", sans-serif;
    font-size: .95rem;
    box-shadow: 0 4px 12px rgba(150, 0, 0, .15);
    text-align: center;
}

/* ======================================
   PAGE : INSCRIPTION RÉUSSIE
====================================== */

.inscription-success {
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.success-card {
    background: #fff8ef;
    padding: 2.5rem 3rem;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(100,50,20,.22);
    border: 2px solid #ffddb3;
}

.success-card h1 {
    font-family: "Chakra Petch", sans-serif;
    color: #573723;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-card p {
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #3a2a1f;
    opacity: .9;
}

.btn-retour {
    display: inline-block;
    padding: .9rem 2rem;
    font-family: "Chakra Petch", sans-serif;
    background: #ff8c32;
    color: #2e1d14;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: .2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-retour:hover {
    background: #ffa34c;
    transform: scale(1.05);
}


/* ======================================
   TITLES & FOOTER
====================================== */

h1 {
    text-align: center;
    margin-top: 2rem;
    font-size: 2.3rem;
    color: #573723;
}

#footer {
    text-align: center;
    padding: 1.5rem;
    background: #3c2415;
    color: #ffe0c0;
    border-top: 4px solid #d97a2c;
    margin-top: 4rem;
}

.footer-small {
    font-size: .85rem;
    opacity: .7;
}

/* ======================================
   FICHE PRODUIT
====================================== */

.FicheProduit {
    display: flex;
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: 1300px;
    margin: 3rem auto;
    background: #fff8ef;
    border-radius: 22px;
    border: 2px solid #ffddb3;
    box-shadow: 0 10px 40px rgba(100,50,20,.18);
    align-items: flex-start;
}

.IllustrationFiche img {
    min-width: 40rem;
    min-height: 40rem;
    border-radius: 18px;
    background: #fff;
    padding: 1.2rem;
    box-shadow: 0 6px 18px rgba(100,50,20,.15);
    border: 1px solid #f0d5bb;
}

.FicheProduit h1.nom {
    margin: 0;
    font-size: 2.4rem;
    color: #573723;
}

.FicheProduit h2.prix {
    font-size: 3rem;
    margin: .5rem 0 1rem;
    color: #d1651b;
    font-weight: 700;
}

.FicheProduit .stock {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #6a4b33;
}

.FicheProduit .rupture {
    color: #a30000;
    font-weight: bold;
}

.FicheProduit .description {
    line-height: 1.55;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #3a2a1f;
    opacity: .9;
    max-width: 600px;
    border-radius: 18px;
    background: #fff;
    padding: 1.2rem;
    box-shadow: 0 6px 18px rgba(100,50,20,.15);
    border: 1px solid #f0d5bb;
}

.btnAjouter {
    display: inline-block;
    padding: .95rem 2rem;
    background: #ff8c32;
    color: #2e1d14;
    font-family: "Chakra Petch", sans-serif;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.15rem;
    letter-spacing: 1px;
    transition: 0.2s ease;
    box-shadow: 0 4px 14px rgba(217,122,45,.35);
}

.btnBasPage {
    display: flex;
    flex-direction: column;
}

.btnAjouter:hover {
    background: #ffa34c;
    transform: translateY(-3px);
}

.btnAjouter.indisponible {
    background: #777 !important;
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
}

.btnRetour {
    display: inline-block;
    margin-top: 1.4rem;
    text-decoration: none;
    color: #8c4b1f;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.1rem;
    transition: .2s ease;
}

.btnRetour:hover {
    color: #c76b1f;
    transform: translateX(-3px);
}

/* ======================================
   RESPONSIVE FICHE PRODUIT
====================================== */

@media(max-width: 950px) {
    .FicheProduit {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .IllustrationFiche img {
        width: 100%;
        max-width: 380px;
        margin: 0 auto 1.5rem;
    }

    .description {
        margin-left: auto;
        margin-right: auto;
    }

    .btnRetour {
        margin-top: 2rem;
    }
}




/* ======================================
   RESPONSIVE
====================================== */

@media(max-width: 900px) {
    nav {
        gap: 1.4rem;
    }

    #hero h1 {
        font-size: 2.4rem;
    }

    #home-features {
        flex-direction: column;
        padding: 2.5rem 1rem;
    }
}

/* ======================================
   MULTIPLE BUTTONS MATCHING HEADER BTNS
====================================== */

.quadruple-buttons-admin {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn-orange {
    background: #ff8c32;
    color: #2e1d14;
    text-decoration: none;
    font-size: 1.1rem;
    padding: .8rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-family: "Chakra Petch", sans-serif;
    transition: .2s ease;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-orange:hover {
    background: #ffa34c;
    transform: scale(1.05);
}

/* ======================================
   COMPTES UTILISATEUR
====================================== */

.compte-container {
    width: 90%;
    max-width: 700px;
    margin: 3rem auto;
}

.compte-container h1 {
    text-align: center;
    font-size: 2.4rem;
    color: #3c2415;
    margin-bottom: 2rem;
}

.compte-section {
    background: #fff9f3;
    border: 2px solid #ffddb3;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 18px rgba(100,50,20,0.15);
}

.compte-section h2 {
    margin-bottom: 1.2rem;
    font-family: "Chakra Petch", sans-serif;
    color: #3c2415;
}

.compte-form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: .3rem;
    font-weight: 600;
    color: #4a311f;
}

.compte-form input {
    width: 100%;
    padding: .8rem;
    border-radius: 10px;
    border: 2px solid #d8b08a;
    background: #fffdf9;
    transition: .2s;
}

.compte-form input:focus {
    border-color: #ff8c32;
    box-shadow: 0 0 6px rgba(255,140,50,0.4);
    outline: none;
}

/* BOUTON ORANGE (ton style) */
.btn-orange {
    display: inline-block;
    margin-top: 1.5rem;
    background: #ff8c32;
    color: #2e1d14;
    padding: .9rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: "Chakra Petch";
    transition: .2s;
    width: 100%;
    text-align: center;
}
.btn-orange:hover {
    background: #ffa34c;
}

/* Déconnexion */
.compte-logout {
    text-align: center;
    margin-top: 2rem;
}

.logout-btn {
    background: #b23232;
    color: white;
    padding: .9rem 1.5rem;
    text-decoration: none;
    border-radius: 12px;
    font-family: "Chakra Petch";
    transition: .2s;
}
.logout-btn:hover {
    background: #d44646;
}

.input-readonly {
    background: #f3e7dd !important;
    border: 2px solid #d8c1a8 !important;
    color: #6a5544;
    cursor: not-allowed;
}

.alert {
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-family: "Montserrat", sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.alert-error {
    background: #ffdad4;
    border: 2px solid #d72626;
    color: #7a1313;
}

.alert-success {
    background: #dfffe3;
    border: 2px solid #2d9c40;
    color: #165f24;
}

/* ======================================
   ADMIN TABLE
====================================== */

.admin-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-page h1 {
    margin: 2rem 0;
    color: #573723;
    font-size: 2.2rem;
    text-align: center;
}

.admin-table {
    width: 90%;
    margin: 2rem auto;
    border-collapse: collapse;
    background: #fff8ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(100,50,20,.2);
}

.admin-table th {
    background: #3c2415;
    color: #ffddb3;
    padding: 1rem;
    font-family: "Chakra Petch";
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0d8c0;
    text-align: center;
}

.admin-table tr:hover {
    background: #ffedd8;
}

.mini-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.crud-btn {
    padding: .5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    margin: 0 .2rem;
    font-family: "Chakra Petch";
}

.crud-btn.edit {
    background: #ff8c32;
    color: #2e1d14;
}

.crud-btn.edit:hover {
    background: #ffa34c;
}

.crud-btn.delete {
    background: #c23616;
    color: #fff;
}

.crud-btn.delete:hover {
    background: #e55039;
}

/* ===== Formulaire Admin ===== */

form.admin-form {
    width: 90%;
    max-width: 600px;
    margin: 2rem auto;
    background: #fff8ef;
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(100,50,20,0.18);
    border: 2px solid #ffddb3;
    font-family: "Montserrat", sans-serif;
}

/* Label */
form.admin-form label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 .4rem;
    color: #3c2415;
}

/* Inputs texte / number / file / textarea */
form.admin-form input[type="text"],
form.admin-form input[type="number"],
form.admin-form input[type="file"],
form.admin-form input[type="password"],
form.admin-form textarea {
    width: 100%;
    padding: .8rem 1rem;
    border: 2px solid #d8b08a;
    border-radius: 10px;
    background: #fffdf9;
    font-size: 1rem;
    transition: .25s ease;
    font-family: "Montserrat", sans-serif;
}

/* Hover + focus */
form.admin-form input:hover,
form.admin-form textarea:hover {
    border-color: #ff8c32;
}

form.admin-form input:focus,
form.admin-form textarea:focus {
    border-color: #d97a2c;
    box-shadow: 0 0 6px rgba(255,140,50,0.3);
    outline: none;
}

/* Style du bouton submit */
form.admin-form button {
    margin-top: 1.8rem;
    width: 100%;
    padding: 1rem;
    background: #ff8c32;
    color: #2e1d14;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.15rem;
    transition: .25s ease;
    text-transform: uppercase;
    letter-spacing: .5px;
}

form.admin-form button:hover {
    background: #ffa34c;
    transform: scale(1.03);
}

.mini-img-large {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ======================================
   PANIER
====================================== */

.page-panier {
    max-width: 1200px;
    margin: 2rem auto 5rem;
    padding: 2rem;
}

.panier-vide {
    text-align: center;
    background: #fff8ef;
    padding: 3rem;
    border-radius: 18px;
    border: 2px solid #ffddb3;
    box-shadow: 0 6px 18px rgba(100,50,20,.15);
}

.retour-boutique {
    margin-top: 1.5rem;
    display: inline-block;
    padding: .9rem 1.8rem;
    background: #ff8c32;
    color: #2e1d14;
    border-radius: 12px;
    text-decoration: none;
    font-family: "Chakra Petch";
    transition: .2s ease;
}

.retour-boutique:hover {
    background: #ffa34c;
}

.panier-contenu {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.table-panier {
    width: 100%;
    border-collapse: collapse;
    background: #fff8ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(100,50,20,.2);
}

.table-panier thead {
    background: #3c2415;
    color: #ffddb3;
}

.table-panier th,
.table-panier td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f0d8c0;
}

.table-panier tr:hover {
    background: #ffedd8;
}

.panier-produit {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.panier-produit img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #f0d8c0;
    background: #fff;
}

.form-quantite input[type="number"] {
    width: 60px;
    padding: .4rem;
    border-radius: 6px;
    border: 2px solid #d8b08a;
    background: #fffdf9;
}

.btn-quantite {
    margin-left: .5rem;
    padding: .4rem .8rem;
    border: none;
    background: #ff8c32;
    color: #2e1d14;
    border-radius: 6px;
    cursor: pointer;
    transition: .2s ease;
}

.btn-quantite:hover {
    background: #ffa34c;
}

.btn-supprimer {
    font-size: 1.4rem;
    text-decoration: none;
    color: #b23232;
    transition: .2s ease;
}

.btn-supprimer:hover {
    color: #e55039;
}

.panier-total {
    text-align: right;
    margin-top: 1rem;
}

.panier-total h2 {
    font-size: 2rem;
    color: #573723;
}

.panier-total span {
    color: #d1651b;
    font-weight: bold;
}

.btn-commander {
    display: inline-block;
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.retour-boutique-lien {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #8c4b1f;
    transition: .2s;
}

.retour-boutique-lien:hover {
    color: #c76b1f;
    transform: translateX(-3px);
}

@media(max-width: 750px) {
    .panier-produit {
        flex-direction: column;
    }
}


