/**
 * Style de la page Mes Produits — Extension de stylesProfil.css
 * @author Shawn Dutil
 */

/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.container_mesProduits {
    display: flex;
    gap: 28px;
    padding: 48px 32px;
    background: var(--creme);
    min-height: calc(100vh - var(--navbar-h));
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

/* ===========================
   MESSAGES SUCCÈS / ERREUR
=========================== */
.message-success {
    font-family: 'Raleway', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #edf7ed;
    color: #2d6a2d;
    border-left: 3px solid #4caf50;
    padding: 12px 18px;
    border-radius: 2px;
    margin-bottom: 20px;
}

/* ===========================
   TABLEAU — LIGNES ALTERNÉES
   (remplace les inline styles PHP)
=========================== */
.produits-table tbody tr:nth-child(odd) {
    background: #fff;
}

.produits-table tbody tr:nth-child(even) {
    background: #fafaf7;
}

.produits-table tbody tr:hover {
    background: #fffdf5 !important;
}

/* Bouton nom produit dans le tableau */
.btn-lien-nom-mesProduit {
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--vert-profond);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    margin-bottom: 2px;
}

.btn-lien-nom-mesProduit:hover {
    color: var(--or);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1185px) {
    .container_mesProduits {
        flex-direction: column;
        padding: 32px 20px;
    }

    .container_mesProduits .sidebar {
        width: 100%;
        position: static;
    }

    .container_mesProduits .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }

    .container_mesProduits .sidebar-menu a {
        padding: 8px 14px;
    }

    .tri-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .mesProduits-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container_mesProduits { padding: 24px 16px; }

    .produits-table thead { display: none; }

    .produits-table tbody { display: flex; flex-direction: column; gap: 12px; }

    .produits-table tr {
        display: flex;
        flex-direction: column;
        background: #fff !important;
        border: 1px solid rgba(0,0,0,0.07);
        border-left: 3px solid rgba(201, 168, 76, 0.4);
        border-radius: 2px;
        padding: 16px;
    }

    .produits-table td { border: none; padding: 4px 0; }

    .imageProduit { max-width: 120px; }

    .tri-selects { flex-direction: column; }

    .btn-ajouter-produit,
    .btn-recherche,
    .btn-reset { width: 100%; justify-content: center; }
}

/* ===========================
   FORMULAIRE FILTRES
=========================== */
.filtres-form {
    background: var(--creme);
    border-radius: 2px;
    border-left: 3px solid rgba(201, 168, 76, 0.4);
    padding: 28px 24px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.filtres-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tri-container {
    display: flex;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}

.filtre {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtre .form-label {
    font-family: 'Raleway', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vert-profond);
}

.tri-btns {
    display: flex;
    gap: 8px;
}

.tri-btns button {
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    border: none;
    border-radius: 2px;
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.tri-btns button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(201, 168, 76, 0.42);
}

.tri-selects {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tri-selects select {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--vert-profond);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    padding: 10px 14px;
    outline: none;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tri-selects select:focus {
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.tri-categorie-btn {
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    border: none;
    border-radius: 2px;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.tri-categorie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(201, 168, 76, 0.42);
}

.btn-reset {
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: transparent;
    border: 1px solid rgba(28, 46, 28, 0.3);
    border-radius: 2px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn-reset:hover {
    background: var(--vert-profond);
    color: #fff;
    border-color: var(--vert-profond);
}

.recherche-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.recherche-container .filtre {
    flex: 1;
    max-width: 360px;
}

#recherche {
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    color: var(--texte-sombre);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#recherche::placeholder { color: #bbb; font-style: italic; }

#recherche:focus {
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.btn-recherche {
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    border: none;
    border-radius: 2px;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-recherche:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(201, 168, 76, 0.42);
}

@media (max-width: 900px) {
    .tri-container { flex-direction: column; align-items: flex-start; gap: 16px; }
    .tri-selects { flex-direction: column; align-items: flex-start; }
    .tri-selects select { min-width: 100%; }
    .recherche-container { flex-direction: column; align-items: stretch; }
    .recherche-container .filtre { max-width: 100%; }
    .btn-recherche, .btn-reset { width: 100%; text-align: center; justify-content: center; }
}