/* My Account Premium Styles - Lin Teas - VERSION SIMPLIFIÉE PREMIUM */

/* =============================================================================
   MASQUER ÉLÉMENTS WORDPRESS/WOOCOMMERCE PAR DÉFAUT
   ============================================================================= */

/* Masquer breadcrumbs, page header, entry header */
body.woocommerce-account .breadcrumb,
body.woocommerce-account .woocommerce-breadcrumb,
body.woocommerce-account .breadcrumbs,
body.woocommerce-account .page-header,
body.woocommerce-account .entry-header {
    display: none !important;
}

/* Masquer le titre "Mon compte" par défaut (on va le recréer en premium) */
body.woocommerce-account .entry-title,
body.woocommerce-account h1.wp-block-heading {
    display: none !important;
}

/* Masquer la barre d'admin WordPress en haut */
body.woocommerce-account #wpadminbar {
    display: none !important;
}

/* =============================================================================
   FORMULAIRE DE CONNEXION PREMIUM (AVANT AUTHENTIFICATION)
   ============================================================================= */

/* Background premium pour la page de connexion */
body.woocommerce-account:not(.logged-in) {
    background: #F8F9FA !important;
}

body.woocommerce-account:not(.logged-in) .site-content {
    background: #F8F9FA !important;
    padding: 60px 20px !important;
}

/* Hero section pour le formulaire de connexion */
body.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 48px;
    position: relative;
}

/* Titre "Se connecter" en premium */
body.woocommerce-account:not(.logged-in) .woocommerce h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #2C3E50;
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #7FB3A3;
}

/* Formulaire de connexion */
body.woocommerce-account:not(.logged-in) .woocommerce-form-login {
    margin: 0;
}

/* Labels */
body.woocommerce-account:not(.logged-in) .woocommerce-form-login label {
    display: block;
    margin-bottom: 8px;
    color: #2C3E50;
    font-weight: 500;
}

/* Champs de formulaire */
body.woocommerce-account:not(.logged-in) .woocommerce-form-login input[type="text"],
body.woocommerce-account:not(.logged-in) .woocommerce-form-login input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 20px;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form-login input[type="text"]:focus,
body.woocommerce-account:not(.logged-in) .woocommerce-form-login input[type="password"]:focus {
    border-color: #7FB3A3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 179, 163, 0.1);
}

/* Checkbox "Se souvenir de moi" */
body.woocommerce-account:not(.logged-in) .woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form-login input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Bouton "Se connecter" */
body.woocommerce-account:not(.logged-in) .woocommerce-form-login button[type="submit"],
body.woocommerce-account:not(.logged-in) .woocommerce-form-login .button {
    width: 100%;
    background: linear-gradient(135deg, #B85450, #C86B66);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-bottom: 16px;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form-login button[type="submit"]:hover,
body.woocommerce-account:not(.logged-in) .woocommerce-form-login .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(184, 84, 80, 0.3);
}

/* Lien "Mot de passe perdu" */
body.woocommerce-account:not(.logged-in) .woocommerce-LostPassword a {
    color: #7FB3A3;
    text-decoration: none;
    font-weight: 500;
    display: block;
    text-align: center;
}

body.woocommerce-account:not(.logged-in) .woocommerce-LostPassword a:hover {
    color: #6FA393;
    text-decoration: underline;
}

/* =============================================================================
   HERO SECTION PREMIUM (UNIQUEMENT POUR PAGE CONNECTÉE)
   ============================================================================= */

/* Créer un hero section premium AVANT le container WooCommerce */
body.woocommerce-account.logged-in .site-content::before {
    content: '';
    display: block;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #7FB3A3 0%, #ACD7D2 100%);
    margin-bottom: -80px;
    position: relative;
    z-index: 1;
}

/* Ajouter le titre "Mon Compte" dans le hero */
body.woocommerce-account.logged-in .site-content {
    position: relative;
}

body.woocommerce-account.logged-in .site-content::after {
    content: 'Mon Compte';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-align: center;
    z-index: 10;
}

/* =============================================================================
   STRUCTURE PRINCIPALE PREMIUM
   ============================================================================= */

/* Page Mon Compte - Background premium */
body.woocommerce-account {
    background: #F8F9FA !important;
}

body.woocommerce-account .site-content {
    background: #F8F9FA !important;
    padding: 40px 20px !important;
}

/* Centrer le parent .page-content pour permettre le centrage du .woocommerce */
body.woocommerce-account.logged-in .page-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: auto !important;
}

/* Container principal - UNIQUEMENT POUR UTILISATEURS CONNECTÉS */
body.woocommerce-account.logged-in .woocommerce {
    max-width: 100%;
    margin: 0 !important;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
    display: grid !important;
    grid-template-columns: 250px 1fr !important;
    gap: 40px;
    min-height: 600px;
    position: relative;
    z-index: 5;
}

/* Masquer le lien "Modifier Mon compte" qui sort du cadre */
body.woocommerce-account .entry-edit-link {
    display: none !important;
}

/* =============================================================================
   NAVIGATION LATÉRALE PREMIUM
   ============================================================================= */

body.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 24px 0;
    float: none !important;
    width: 100% !important;
    max-width: 250px !important;
    grid-column: 1 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
    padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 14px 20px;
    color: #5A6C7D;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: white;
    color: #7FB3A3;
    border-left-color: #7FB3A3;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: white;
    color: #7FB3A3;
    border-left-color: #7FB3A3;
    font-weight: 600;
}

/* =============================================================================
   CONTENU PRINCIPAL PREMIUM
   ============================================================================= */

body.woocommerce-account .woocommerce-MyAccount-content {
    padding: 0;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 2 !important;
}

/* Titres */
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-family: 'Playfair Display', serif;
    color: #2C3E50;
    margin-bottom: 24px;
}

body.woocommerce-account .woocommerce-MyAccount-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #7FB3A3;
    padding-bottom: 12px;
}

/* Paragraphes */
body.woocommerce-account .woocommerce-MyAccount-content p {
    color: #5A6C7D;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Premier paragraphe "Bonjour admin" */
body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type {
    background: linear-gradient(135deg, #E8F5F3 0%, #F0F9F7 100%);
    padding: 20px 24px;
    border-radius: 12px;
    border-left: 4px solid #7FB3A3;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* Strong dans le premier paragraphe */
body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type strong {
    color: #2C3E50;
    font-weight: 600;
}

/* Lien de déconnexion dans le premier paragraphe */
body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type a {
    color: #B85450;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type a:hover {
    color: #A04440;
    text-decoration: underline;
}

/* =============================================================================
   FORMULAIRES PREMIUM
   ============================================================================= */

/* Champs de formulaire */
body.woocommerce-account input[type="text"],
body.woocommerce-account input[type="email"],
body.woocommerce-account input[type="password"],
body.woocommerce-account input[type="tel"],
body.woocommerce-account textarea,
body.woocommerce-account select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

body.woocommerce-account input[type="text"]:focus,
body.woocommerce-account input[type="email"]:focus,
body.woocommerce-account input[type="password"]:focus,
body.woocommerce-account input[type="tel"]:focus,
body.woocommerce-account textarea:focus,
body.woocommerce-account select:focus {
    border-color: #7FB3A3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 179, 163, 0.1);
}

/* Labels */
body.woocommerce-account label {
    display: block;
    margin-bottom: 8px;
    color: #2C3E50;
    font-weight: 500;
}

/* Boutons */
body.woocommerce-account button,
body.woocommerce-account .button,
body.woocommerce-account input[type="submit"] {
    background: linear-gradient(135deg, #B85450, #C86B66);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

body.woocommerce-account button:hover,
body.woocommerce-account .button:hover,
body.woocommerce-account input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(184, 84, 80, 0.3);
}

/* Boutons secondaires */
body.woocommerce-account .button.alt {
    background: #7FB3A3;
}

body.woocommerce-account .button.alt:hover {
    background: #6FA393;
    box-shadow: 0 8px 16px rgba(127, 179, 163, 0.3);
}

/* =============================================================================
   TABLEAUX (COMMANDES, ADRESSES, ETC.)
   ============================================================================= */

body.woocommerce-account table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

body.woocommerce-account table thead {
    background: #F8F9FA;
}

body.woocommerce-account table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #2C3E50;
    border-bottom: 2px solid #7FB3A3;
}

body.woocommerce-account table td {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    color: #5A6C7D;
}

body.woocommerce-account table tr:hover {
    background: #F8F9FA;
}

/* Liens dans les tableaux */
body.woocommerce-account table a {
    color: #7FB3A3;
    text-decoration: none;
    font-weight: 500;
}

body.woocommerce-account table a:hover {
    color: #6FA393;
    text-decoration: underline;
}

/* =============================================================================
   MESSAGES ET NOTIFICATIONS
   ============================================================================= */

body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

body.woocommerce-account .woocommerce-message {
    background: #E8F5E9;
    border-left-color: #4CAF50;
    color: #2E7D32;
}

body.woocommerce-account .woocommerce-info {
    background: #E3F2FD;
    border-left-color: #2196F3;
    color: #1565C0;
}

body.woocommerce-account .woocommerce-error {
    background: #FFEBEE;
    border-left-color: #F44336;
    color: #C62828;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    /* Hero section responsive */
    body.woocommerce-account .woocommerce::before {
        height: 150px;
        margin: -20px -20px 20px -20px;
    }

    body.woocommerce-account .woocommerce::after {
        font-size: 2rem;
        top: -100px;
    }

    /* Container en colonne sur mobile */
    body.woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px;
    }

    /* Navigation horizontale sur mobile */
    body.woocommerce-account .woocommerce-MyAccount-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex;
        gap: 8px;
        white-space: nowrap;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 16px;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
    body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
        border-left: none;
        border-bottom-color: #7FB3A3;
    }

    /* Tableaux responsive */
    body.woocommerce-account table {
        font-size: 0.9rem;
    }

    body.woocommerce-account table th,
    body.woocommerce-account table td {
        padding: 12px 8px;
    }
}

/* =============================================================================
   MASQUER LE CTA EN BAS DE PAGE (NON PERTINENT SUR PAGE MON COMPTE)
   ============================================================================= */

/* Masquer la section CTA "Découvrez l'univers Lin Teas" sur les pages Mon Compte */
body.woocommerce-account .page-cta-section,
body.woocommerce-account .cta-section {
    display: none !important;
}
