/* ==========================================================================
   Luz'in Boutique — Feuille de style publique
   --------------------------------------------------------------------------
   Style inspiré de la charte graphique de Luz'in (https://www.luzin.net).
   Toutes les couleurs et valeurs principales sont regroupées en variables
   en haut de fichier : modifiez-les ici pour changer facilement le style.
   ========================================================================== */

:root {
    /* Couleurs principales (charte Luz'in) */
    --color-primary: #fbbf09;      /* jaune Luz'in */
    --color-primary-dark: #e5a520; /* jaune au survol */
    --color-text: #3c3c3b;         /* texte principal */
    --color-heading: #3c3c3b;      /* titres */
    --color-muted: #667085;        /* texte secondaire */
    --color-border: #e4e7ec;
    --color-bg: #ffffff;
    --color-bg-soft: #f7f7f7;
    --color-accent-blue: #60c3db;
    --color-accent-green: #9fd63b;
    --color-accent-pink: #f7455f;
    --color-danger: #d92d20;

    /* Typographie (Roboto Condensed, comme le site Luz'in) */
    --font-family: 'Roboto Condensed', Helvetica, Arial, Lucida, sans-serif;

    /* Boutons */
    --btn-bg: #f8b62c;
    --btn-color: #000000;
    --btn-radius: 5px;

    /* Mise en page */
    --content-max-width: 1100px;
    --header-height: 70px;
    --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-family: var(--font-family);
    margin: 0 0 0.5em;
}

a { color: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.site-header .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-heading);
    font-weight: 700;
    font-size: 1.2rem;
}

.site-header .brand img {
    height: 44px;
    width: auto;
    display: block;
}

.site-header nav {
    margin-left: auto;
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.site-header nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

.site-header nav a:hover { color: var(--color-primary-dark); }

/* --------------------------------------------------------------------------
   Contenu principal
   -------------------------------------------------------------------------- */
.site-main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 60vh;
}

/* --------------------------------------------------------------------------
   Messages (flash)
   -------------------------------------------------------------------------- */
.messages { list-style: none; padding: 0; }
.messages li {
    background: #fff8e1;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.5rem;
}
.messages li.error {
    background: #fef3f2;
    border-color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    background: var(--btn-bg);
    color: var(--btn-color);
    border: 0;
    padding: 0.55rem 1rem;
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
}
.btn:hover { background: var(--color-primary-dark); }
.btn.secondary {
    background: transparent;
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-dark);
}
.btn.secondary:hover { background: var(--color-bg-soft); }

/* --------------------------------------------------------------------------
   Catalogue (grille de produits)
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.2rem;
}

.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--color-bg-soft);
}
.card .body {
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}
.card h3 { margin: 0; font-size: 1.05rem; }
.card .desc { color: var(--color-muted); font-size: 0.88rem; flex: 1; }
.price { font-weight: 700; }

/* --------------------------------------------------------------------------
   Page produit
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 1.5rem; }
.row { display: flex; gap: 1rem; align-items: flex-start; }
.product-detail img.primary {
    max-width: 420px;
    width: 100%;
    border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 0.6rem;
    border-bottom: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Divers
   -------------------------------------------------------------------------- */
.empty { color: var(--color-muted); padding: 2rem 0; }
.badge {
    background: #fff8e1;
    color: var(--color-primary-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
}
.notice {
    background: var(--color-bg-soft);
    border-left: 4px solid var(--color-primary);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Formulaire de commande (checkout)
   -------------------------------------------------------------------------- */
.checkout-form {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.checkout-form fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem 1.2rem;
    margin: 0;
}

.checkout-form legend {
    font-weight: 700;
    color: var(--color-heading);
    padding: 0 0.4rem;
}

.checkout-form .field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.checkout-form .field:last-child {
    margin-bottom: 0;
}

.checkout-form .field-row {
    display: flex;
    gap: 1rem;
}

.checkout-form .field-row .field {
    flex: 1;
}

.checkout-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form textarea {
    width: 100%;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--color-text);
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(251, 191, 9, 0.25);
}

.checkout-form .errorlist {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    color: var(--color-danger);
    font-size: 0.85rem;
}

.checkout-form .form-errors {
    background: #fef3f2;
    border: 1px solid var(--color-danger);
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    color: var(--color-danger);
}

.checkout-form .btn-cancel {
    align-self: flex-start;
    font-size: 0.8rem;
    color: var(--color-muted);
    text-decoration: underline;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}

.checkout-form .btn-cancel:hover {
    color: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Pied de page (mentions légales)
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--color-text);
    color: #ffffff;
    padding: 1.5rem;
    margin-top: 2rem;
}
.site-footer .legal {
    max-width: var(--content-max-width);
    margin: 0 auto;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #dddddd;
}
