/**
 * JOY•STORE User System V3 - Style Noir/Rouge
 * Basé sur le style de l'historique commandes
 */

:root {
    --auth-bg-general: #000000;
    --auth-bg-form: rgba(10, 10, 10, 0.7);
    --auth-border: rgba(255, 255, 255, 0.1);
    --auth-input-bg: rgba(10, 10, 10, 0.7);
    --auth-input-border: rgba(255, 255, 255, 0.1);
    --auth-input-text: #FFFFFF;
    --auth-button-bg: #8B0000;
    --auth-button-text: #FFFFFF;
    --auth-title: #FFFFFF;
    --auth-link: #8B0000;
    
    --dash-bg-general: #000000;
    --dash-header-bg: rgba(10, 10, 10, 0.7);
    --dash-button-bg: #8B0000;
    --dash-button-text: #FFFFFF;
}

/* ==================== AUTH ==================== */
.joystore-auth-container {
    background: var(--auth-bg-general);
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.joystore-auth-box {
    background: var(--auth-bg-form);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
}

.joystore-logo {
    text-align: center;
    margin-bottom: 25px;
}

.joystore-logo img {
    max-width: 120px;
    height: auto;
}

.joystore-site-name {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    padding: 10px 0;
}

.joystore-auth-title {
    color: var(--auth-title);
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.joystore-auth-subtitle {
    color: #999999;
    text-align: center;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.joystore-remember-me {
    margin-bottom: 20px;
}

.joystore-remember-me label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #999999;
    font-size: 14px;
}

.joystore-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.joystore-success-box {
    text-align: center;
    padding: 30px;
}

.joystore-success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.joystore-success-text {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.joystore-success-subtext {
    color: #999999;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.joystore-btn-secondary {
    background: transparent;
    border: 2px solid var(--auth-button-bg);
    color: var(--auth-button-bg);
}

.joystore-btn-secondary:hover {
    background: var(--auth-button-bg);
    color: #FFFFFF;
}

.joystore-form-group {
    margin-bottom: 20px;
}

/* Container pour input password avec icône œil */
.joystore-password-wrapper {
    position: relative;
    width: 100%;
}

.joystore-password-wrapper .joystore-input {
    padding-right: 45px; /* Espace pour l'icône */
}

.joystore-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #999999;
    user-select: none;
    transition: color 0.2s;
}

.joystore-password-toggle:hover {
    color: var(--auth-button-bg);
}

.joystore-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 8px;
    color: var(--auth-input-text);
    font-size: 15px;
    box-sizing: border-box;
}

.joystore-input:focus {
    outline: none;
    border-color: var(--auth-button-bg);
}

/* Fix autofill (champs remplis automatiquement) */
.joystore-input:-webkit-autofill,
.joystore-input:-webkit-autofill:hover,
.joystore-input:-webkit-autofill:focus,
.joystore-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-input-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--auth-input-bg) inset !important;
    border: 1px solid var(--auth-input-border) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.joystore-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.joystore-btn-primary {
    background: var(--auth-button-bg);
    color: var(--auth-button-text);
}

.joystore-btn-primary:hover {
    background: #660000;
    transform: translateY(-2px);
}

.joystore-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.joystore-auth-links a {
    color: var(--auth-link);
    text-decoration: none;
}

.joystore-auth-links a:hover {
    text-decoration: underline;
}

/* ==================== DASHBOARD ==================== */
.joystore-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
    background: var(--dash-bg-general);
    color: #fff;
}

.joystore-profile-header {
    background: var(--dash-header-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.joystore-profile-info h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 8px 0;
}

.joystore-profile-info p {
    color: #999;
    margin: 0;
}

.joystore-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--dash-button-bg);
}

.joystore-profile-tabs {
    background: var(--dash-header-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
}

.joystore-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #999;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
}

.joystore-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.joystore-tab.active {
    background: var(--dash-button-bg);
    color: #fff;
}

.joystore-tab.joystore-logout {
    color: #999; /* Même couleur que les autres onglets */
}

.joystore-profile-content {
    background: var(--dash-header-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
}

/* ==================== WIDGETS ==================== */
.joystore-custom-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.joystore-widget-card {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s;
}

.joystore-widget-card:hover {
    border-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 0, 0, 0.2);
}

.widget-icon svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.widget-info {
    flex: 1;
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    margin: 0 0 4px 0;
}

.widget-count {
    font-size: 20px;
    font-weight: 700;
    color: #8B0000;
    margin: 0;
}

/* ==================== FORMS ==================== */
.joystore-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.joystore-form-section h4 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 15px 0;
}

.joystore-form-group label {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.joystore-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.joystore-message {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.joystore-message-success {
    color: #27AE60;
}

.joystore-message-error {
    color: #E74C3C;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .joystore-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .joystore-form-row {
        grid-template-columns: 1fr;
    }
    
    .joystore-custom-widgets-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== RACCOURCIS DASHBOARD ==================== */
.joystore-raccourcis-container {
    background: transparent;
    padding: 0;
    margin: 0;
}

.joystore-raccourcis-intro {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.joystore-raccourcis-intro p {
    color: #999999;
    margin: 0;
    font-size: 14px;
}

/* Grille : 2 col mobile/tablette, 4 col PC */
.joystore-raccourcis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 1200px) {
    .joystore-raccourcis-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

/* Carte */
.joystore-raccourci-card {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.joystore-raccourci-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Layout intérieur : icône GAUCHE + texte DROITE */
.joystore-raccourci-card .card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    min-height: 80px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.joystore-raccourci-card .card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.joystore-raccourci-card .card-icon svg {
    width: 36px;
    height: 36px;
    display: block;
}

.joystore-raccourci-card .card-emoji {
    font-size: 36px;
    line-height: 1;
}

.joystore-raccourci-card .card-content {
    flex: 1;
    min-width: 0;
}

.joystore-raccourci-card .card-title {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.joystore-raccourci-card .card-count {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

/* Mobile */
@media (max-width: 480px) {
    .joystore-raccourcis-grid { gap: 10px; }
    .joystore-raccourci-card .card-inner { padding: 14px 12px; gap: 10px; min-height: 70px; }
    .joystore-raccourci-card .card-icon { width: 36px; height: 36px; }
    .joystore-raccourci-card .card-icon svg { width: 28px; height: 28px; }
    .joystore-raccourci-card .card-title  { font-size: 11px; }
    .joystore-raccourci-card .card-count  { font-size: 22px; }
}

