/* =========================================================
   WOOCOMMERCE MY ACCOUNT — PREMIUM DASHBOARD
   VERSION PROPRE + FONCTIONNELLE
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Saira:wght@700;800&family=Montserrat:wght@400;500;600;700&display=swap');


/* =========================================================
   RESET WOOCOMMERCE
========================================================= */

.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after,
.woocommerce-account .woocommerce-MyAccount-content::before,
.woocommerce-account .woocommerce-MyAccount-content::after {
    display: none !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: auto !important;
}


/* =========================================================
   VARIABLES
========================================================= */

.woocommerce-account {
    --hor-bg: #f6f8f9;
    --hor-card: #ffffff;
    --hor-border: #e7ecef;
    --hor-text: #15202b;
    --hor-muted: #6b7280;
    --hor-primary: #0f7c82;
    --hor-primary-dark: #0c5f63;
    --hor-radius: 24px;
    --hor-shadow:
        0 1px 2px rgba(16, 24, 40, .04),
        0 14px 34px rgba(16, 24, 40, .06);
}


/* =========================================================
   WRAPPER PRINCIPAL
========================================================= */

.woocommerce-account {
    background: var(--hor-bg);
}

.woocommerce-account .woocommerce {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 40px 100px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media (max-width: 980px) {
    .woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
        padding: 30px 20px 80px;
        gap: 24px;
    }
}


/* =========================================================
   BANNER TOP
========================================================= */

.hor-account-top {
    grid-column: 1 / -1;
}

.hor-user-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f7c82 0%, #17a0a8 100%);
    box-shadow: 0 18px 40px rgba(15, 124, 130, .18);
    margin-bottom: 10px;
}

.hor-user-banner::before {
    content: "";
    position: absolute;
    right: -100px;
    top: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.hor-user-banner::after {
    content: "";
    position: absolute;
    right: 100px;
    bottom: -80px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.hor-user-avatar {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    backdrop-filter: blur(8px);
}

.hor-user-info {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
}

.hor-user-name {
    color: white;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 6px;
}

.hor-user-email {
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    font-weight: 500;
}

.hor-user-logout {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .95);
    border: none;
    color: var(--hor-primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.hor-user-logout:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
    color: var(--hor-primary-dark);
}

@media (max-width: 768px) {
    .hor-user-banner {
        flex-wrap: wrap;
        padding: 24px;
    }

    .hor-user-name {
        font-size: 22px;
    }

    .hor-user-logout {
        width: 100%;
    }
}


/* =========================================================
   SIDEBAR
========================================================= */

.woocommerce-account .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 30px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 16px;
    color: var(--hor-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: rgba(15, 124, 130, .06);
    color: var(--hor-primary);
    transform: translateX(2px);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: linear-gradient(135deg, var(--hor-primary), #169aa1);
    color: white;
    box-shadow: 0 12px 28px rgba(15, 124, 130, .18);
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--hor-border);
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #c62828;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: #fff2f2;
}

@media (max-width: 980px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation li {
        flex: 0 0 auto;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation a {
        white-space: nowrap;
    }
}


/* =========================================================
   CONTENT
========================================================= */

.woocommerce-account .woocommerce-MyAccount-content {
    background: var(--hor-card);
    border: 1px solid var(--hor-border);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--hor-shadow);
    min-height: 600px;
    font-family: "Montserrat", sans-serif;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 24px;
        border-radius: 24px;
    }
}


/* =========================================================
   TYPO
========================================================= */

.woocommerce-account .woocommerce-MyAccount-content h2 {
    font-family: "Saira", sans-serif;
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--hor-text);
    font-weight: 800;
    letter-spacing: -.03em;
}

.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-family: "Saira", sans-serif;
    font-size: 20px;
    margin-bottom: 18px;
    color: var(--hor-text);
    font-weight: 700;
}

.woocommerce-account .woocommerce-MyAccount-content p {
    font-family: "Montserrat", sans-serif;
    color: var(--hor-muted);
    line-height: 1.8;
    font-size: 15px;
}

.woocommerce-account .woocommerce-MyAccount-content a {
    font-family: "Montserrat", sans-serif;
    color: var(--hor-primary);
    text-decoration: none;
    font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-content a:hover {
    text-decoration: underline;
}


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

.woocommerce-account .form-row {
    margin-bottom: 22px;
}

.woocommerce-account label {
    display: block;
    margin-bottom: 10px;
    color: var(--hor-text);
    font-size: 13px;
    font-weight: 700;
}

.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="tel"],
.woocommerce-account textarea,
.woocommerce-account select {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--hor-border);
    background: #fbfcfc;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.woocommerce-account textarea {
    min-height: 140px;
    padding-top: 16px;
}

.woocommerce-account input:focus,
.woocommerce-account textarea:focus,
.woocommerce-account select:focus {
    outline: none;
    border-color: rgba(15, 124, 130, .55);
    background: white;
    box-shadow: 0 0 0 4px rgba(15, 124, 130, .10);
}


/* =========================================================
   BUTTONS
========================================================= */

.woocommerce-account .woocommerce button,
.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce input[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content button,
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
    min-height: 52px;
    padding: 0 24px !important;
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, var(--hor-primary), #149aa2) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: "Montserrat", sans-serif !important;
    box-shadow: 0 12px 24px rgba(15, 124, 130, .16);
    transition: transform .2s ease, box-shadow .2s ease;
}

.woocommerce-account .woocommerce button:hover,
.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce input[type="submit"]:hover,
.woocommerce-account .woocommerce-MyAccount-content button:hover,
.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 124, 130, .22);
}

/* Supprime le cadre autour du bloc "Changement de mot de passe" */
.woocommerce-account fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-account fieldset legend {
    font-family: "Saira", sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--hor-text);
    padding: 0;
    margin-bottom: 16px;
}


/* =========================================================
   TABLE COMMANDES
========================================================= */

.woocommerce-account .woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.woocommerce-account .woocommerce-orders-table thead th {
    padding: 0 18px 10px;
    border: none;
    color: #98a2b3;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.woocommerce-account .woocommerce-orders-table tbody tr {
    background: #fbfcfc;
    box-shadow: inset 0 0 0 1px #eef2f4;
}

.woocommerce-account .woocommerce-orders-table tbody td {
    padding: 18px;
    border: none;
    font-size: 14px;
}

.woocommerce-account .woocommerce-orders-table tbody td:first-child {
    border-radius: 16px 0 0 16px;
}

.woocommerce-account .woocommerce-orders-table tbody td:last-child {
    border-radius: 0 16px 16px 0;
}


/* =========================================================
   STATUS COMMANDES
========================================================= */

.woocommerce-account mark.order-status {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
}

.status-completed {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.status-processing {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.status-pending {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

.status-cancelled {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}


/* =========================================================
   ALERTES
========================================================= */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border: none !important;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    font-size: 14px;
}

.woocommerce-message,
.woocommerce-info {
    background: #effaf8;
    color: #0f5f64;
}

.woocommerce-error {
    background: #fff1f1;
    color: #b42318;
}


/* =========================================================
   FIXES MOBILE — DÉBORDEMENTS
========================================================= */

.woocommerce-account {
    overflow-x: hidden;
}

.woocommerce-account .woocommerce {
    max-width: 100%;
    box-sizing: border-box;
}

.hor-user-info {
    min-width: 0;
    overflow: hidden;
}

.hor-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hor-user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .woocommerce-account .woocommerce-MyAccount-navigation {
        max-width: 100%;
        overflow: hidden;
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--hor-bg);
        padding: 8px 0;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation a {
        min-height: 44px;
        padding: 0 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .woocommerce-account .woocommerce {
        padding: 20px 16px 60px;
        gap: 16px;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .hor-user-banner {
        padding: 20px 16px;
        gap: 14px;
    }

    .hor-user-name {
        font-size: 20px;
    }

    .woocommerce-account .woocommerce-orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* =========================================================
   FIX MESSAGE + BOUTON "AUCUNE COMMANDE / TÉLÉCHARGEMENT"
========================================================= */

/* Supprime l'icône ::before native de WooCommerce qui parasite l'alignement */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info::before {
    display: none !important;
    content: none !important;
}

/* Conteneur : texte à gauche, bouton à droite — sans débordement */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    padding: 18px 20px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Texte — prend tout l'espace disponible */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message>*:not(.button),
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info>*:not(.button) {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

/* Bouton — taille fixe, jamais floatté, jamais hors cadre */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button {
    float: none !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 !important;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile : empilement vertical, bouton pleine largeur */
@media (max-width: 640px) {

    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
        flex-direction: column !important;
        align-items: stretch !important;
        flex-wrap: wrap !important;
    }

    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-message .button,
    .woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button {
        width: 100% !important;
        text-align: center !important;
    }
}


/* =========================================================
   FIX ADRESSES — LIEN "AJOUTER" DANS LE TITRE
========================================================= */

.woocommerce-account .woocommerce-Address-title {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .woocommerce-account .woocommerce-Address-title {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px;
    }

    .woocommerce-account .woocommerce-Address-title h3 {
        margin: 0 !important;
    }
}

.woocommerce-account .woocommerce-Address-title h3 {
    margin: 0 !important;
    width: auto !important;
    flex-shrink: 1;
    min-width: 0;
}

.woocommerce-account .woocommerce-Address-title>a {
    float: none !important;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--hor-primary);
    text-decoration: none;
    white-space: nowrap;
}

.woocommerce-account .woocommerce-Address-title>a:hover {
    text-decoration: underline;
}


/* Espacement entre l'intro et les titres d'adresse */
.woocommerce-account .woocommerce-MyAccount-content>p:first-child {
    margin-bottom: 24px;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-addresses,
.woocommerce-account .woocommerce-MyAccount-content .col2-set {
    margin-top: 20px;
}

/* Espacement entre le titre et le texte d'adresse */
.woocommerce-account .woocommerce-Address address {
    margin-top: 16px;
    font-style: normal;
}

/* =========================================================
   MASQUER LE LIEN "TÉLÉCHARGEMENTS" DU MENU
========================================================= */

.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads {
    display: none !important;
}

/* Fix centrage bouton "Ajouter un moyen de paiement" */
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content a.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}