/**
 * Style de la page Profil — Redesign Premium
 * @author Shawn Dutil
 */

/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.container_profil {
    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;
}

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
    flex-shrink: 0;
    width: 220px;
    background: var(--vert-profond);
    border-radius: 2px;
    border-top: 2px solid var(--or);
    padding: 28px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: calc(var(--navbar-h) + 24px);
}

.sidebar-header h2 {
    font-family: 'Raleway', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--or);
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-menu a {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 2px;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 0;
    background: var(--or);
    transition: height 0.25s ease;
    border-radius: 1px;
}

.sidebar-menu a:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

.sidebar-menu a:hover::before,
.sidebar-menu a.active::before { height: 60%; }

.sidebar-menu a.active {
    color: var(--or-clair);
    background: rgba(201, 168, 76, 0.08);
    font-weight: 700;
    padding-left: 20px;
}

.sidebar-menu .logout {
    color: rgba(248, 113, 113, 0.7);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-menu .logout:hover { color: #fca5a5; background: rgba(248,113,113,0.06); }
.sidebar-menu .logout::before { background: #f87171; }

/* ===========================
   DASHBOARD CONTAINER
=========================== */
.dashboard-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-content {
    width: 100%;
}

/* ===========================
   CARTE PROFIL
=========================== */
.profil-card {
    background: #fff;
    border-radius: 2px;
    border-top: 2px solid var(--or);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.dashboard-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 400;
    font-style: italic;
    color: var(--vert-profond);
    margin: 0 0 28px 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}

.username {
    color: var(--or);
    font-weight: 700;
}

/* Messages */
.message {
    font-family: 'Raleway', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 18px;
    border-radius: 2px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.succes {
    background: #edf7ed;
    color: #2d6a2d;
    border-left: 3px solid #4caf50;
}

.message.erreur {
    background: #fdf0f0;
    color: #8b2020;
    border-left: 3px solid #e53935;
}

/* Section infos */
.info-section {
    max-width: 680px;
    margin: 0 auto;
}

.info-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--vert-profond);
    margin: 0 0 28px 0;
    padding-left: 14px;
    border-left: 3px solid var(--or);
}

/* Formulaire flottant */
.form-card-style {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.champ-groupe {
    display: flex;
    gap: 28px;
}

.champ {
    position: relative;
    flex: 1;
}

.champ input {
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    color: var(--texte-sombre);
    background: var(--creme);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    padding: 20px 16px 16px 40px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.champ-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--or);
    font-size: 0.85rem;
    pointer-events: none;
}

.champ label {
    position: absolute;
    top: 5px;
    left: 40px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
    pointer-events: none;
    transition: color 0.2s ease;
}

.champ input:focus + label { color: var(--or); }

/* Boutons actions */
.boutons-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn {
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    padding: 13px 28px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--or-clair) 0%, var(--or) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn:hover {
    color: #fff;
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45); 
}

.btn:active { transform: translateY(0); }

.btn-secondaire {
    background: transparent;
    color: var(--vert-profond);
    border: 1px solid rgba(28, 46, 28, 0.25);
    box-shadow: none;
}

.btn-secondaire::before { display: none; }
.btn-secondaire:hover {
    background: var(--vert-profond);
    border-color: var(--vert-profond);
    color: #fff;
    box-shadow: none;
}

/* ===========================
   MES PRODUITS
=========================== */
.mesProduits-card,
.dashboard-content-mesProduits {
    background: #fff;
    border-radius: 2px;
    border-top: 2px solid var(--or);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.mesProduits-card h2,
.dashboard-content-mesProduits h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    font-style: italic;
    color: var(--vert-profond);
    margin: 0 0 24px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    display: block;
    width: 100%;
}

/* Filtres */
.filtres-form {
    background: var(--creme);
    border-radius: 2px;
    border-left: 3px solid rgba(201, 168, 76, 0.4);
    padding: 24px;
    margin-bottom: 24px;
}

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

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

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

.tri-container {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

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

#recherche,
select {
    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;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

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

.tri-selects { display: flex; gap: 10px; }
.tri-selects select { width: auto; }

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

.btn-recherche:hover, .btn-reset:hover, .tri-categorie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.45);
}

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

/* Ajout produit */
.ajout-produit-container { text-align: right; margin-bottom: 16px; }

.btn-ajouter-produit {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    border-radius: 2px;
    padding: 11px 22px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-ajouter-produit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
}

/* Toggle vue */
.view-toggle { margin-bottom: 16px; display: flex; gap: 8px; }

.btn-toggle {
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    background: #fff;
    color: var(--vert-profond);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 2px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-toggle:hover { background: var(--creme); }
.btn-toggle.active {
    background: var(--vert-profond);
    color: var(--or-clair);
    border-color: var(--vert-profond);
}

/* Tableau produits */
.produits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.produits-table thead { background: var(--vert-profond); }

.produits-table th {
    font-family: 'Raleway', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--or);
    padding: 14px 16px;
    text-align: left;
}

.produits-table td {
    font-family: 'Raleway', sans-serif;
    color: #444;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
}

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

.miniature-produit {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.imageProduit {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 2px;
}

/* Boutons tableau */
.btn-link {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--vert-moyen);
    padding: 6px 12px;
    border-radius: 2px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    margin-right: 4px;
    transition: background 0.2s ease;
}

.btn-link:hover { background: var(--vert-profond); }

.btn-link.danger {
    background: transparent;
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.3);
}

.btn-link.danger:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

/* Retour profil */
.retour_profil {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(28, 46, 28, 0.5);
    text-decoration: none;
    margin-bottom: 20px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.retour_profil:hover { color: var(--or); border-bottom-color: var(--or); }
.retour_profil i { transition: transform 0.2s ease; }
.retour_profil:hover i { transform: translateX(-3px); }

/* Popup suppression */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 10, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background: #fff;
    border-top: 2px solid var(--or);
    border-radius: 2px;
    padding: 36px 40px;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.popup-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 28px;
    line-height: 1.6;
}

.btn-confirm {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 2px;
    padding: 11px 24px;
    cursor: pointer;
    margin: 0 6px;
    transition: background 0.2s ease;
}

.btn-confirm:hover { background: #a93226; }

.btn-cancel {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: transparent;
    color: var(--vert-profond);
    border: 1px solid rgba(28,46,28,0.25);
    border-radius: 2px;
    padding: 11px 24px;
    cursor: pointer;
    margin: 0 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

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

/* Grille produits */
.produits-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.produits-grid.active { display: grid; }

.produit-card {
    background: #fff;
    border-radius: 2px;
    border-bottom: 2px solid transparent;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.produit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.12);
    border-bottom-color: var(--or);
}

.produit-card img,
.produit-card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.produit-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vert-profond);
    padding: 12px 14px 4px;
    margin: 0;
}

.produit-card p {
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    color: #888;
    padding: 0 14px 12px;
    margin: 0;
}

.produit-card .actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
    flex-wrap: wrap;
}

/* Critères mot de passe */
.criteres p { color: #c0392b; font-size: 0.8rem; margin: 4px 0; font-family: 'Raleway', sans-serif; }
.criteres p.valid { color: #2d6a2d; }

/* Aucun produit */
.no-products {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #999;
    padding: 20px 0;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
    .container_profil { flex-direction: column; padding: 32px 20px; }
    .sidebar {
        width: 100%;
        position: static;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .sidebar-menu { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .sidebar-menu a { padding: 8px 14px; }
    .champ-groupe { flex-direction: column; gap: 20px; }
    .boutons-actions { flex-direction: column; }
    .btn { width: 100%; }
    .tri-container { flex-direction: column; gap: 12px; }
}

@media (max-width: 600px) {
    .profil-card { padding: 24px 20px; }
    .mesProduits-card { padding: 24px 20px; }
    .dashboard-title { font-size: 1.5rem; flex-direction: column; }
    .produits-table thead { display: none; }
    .produits-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        margin-bottom: 12px;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: 2px;
        padding: 12px;
    }
    .produits-table td { border: none; padding: 6px 0; }
    .btn-ajouter-produit, .btn-reset, .btn-recherche { width: 100%; justify-content: center; }
}