/*
 Theme Name: Astra Enfant
 Theme URI: https://wpastra.com/
 Description: Thème enfant pour Astra
 Author: Maxime Masson
 Template: astra
 Version: 1.0.0
*/

/* ========================= MES BRACELETS — STYLE MAQUETTE ========================= */
/* Version Desktop + Mobile Cards comme la maquette */

.way-bracelets-container{
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px !important;
}
.way-bracelets-header h1{
    color: var(--way-blue) !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 10px 0 !important;
}
.way-bracelets-header p{
    margin: 0 0 18px 0 !important;
    color: rgba(4,7,80,.75) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
}
.way-bracelets-card{
    background: #fff !important;
    border-radius: 18px !important;
    border: 1px solid rgba(4,7,80,.10) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.18) !important;
    overflow: hidden !important;
}
.way-table{
    width: 100% !important;
    border-collapse: collapse !important;
}
.way-table thead th{
    text-align: left !important;
    padding: 18px 22px !important;
    color: var(--way-blue) !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-bottom: 4px solid var(--way-orange) !important;
    background: #fff !important;
    white-space: nowrap !important;
}
.way-table tbody td{
    padding: 18px 22px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(4,7,80,.10) !important;
    font-size: 16px !important;
    color: var(--way-blue) !important;
}
.way-table tbody tr:last-child td{
    border-bottom: 0 !important;
}
.way-table code{
    font-size: 12px !important;
    color: rgba(4,7,80,.80) !important;
    font-weight: 600 !important;
}
.way-badge{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .02em !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.12) !important;
}
.way-badge-freemium{
    background: #fcf1d6 !important;
    color: var(--way-orange) !important;
}
.way-badge-premium{
    background: var(--way-orange) !important;
    color: #fff !important;
}
.way-status{
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 900 !important;
}
.way-status-yes{
    color: #2dbb3f !important;
}
.way-status-no{
    color: #e53935 !important;
}
.way-accordion-toggle{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    color: #fff !important;
    background: var(--way-orange) !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.18) !important;
    border: 0 !important;
    cursor: pointer !important;
    text-transform: none !important;
}
.way-accordion-toggle:hover{
    background: var(--way-orange-hover) !important;
}
.way-accordion-toggle::after{
    content: "▼" !important;
    font-size: 10px !important;
    transition: transform .2s ease !important;
}
.way-accordion-toggle.active::after{
    transform: rotate(180deg) !important;
}
.way-accordion-row{
    display: none !important;
}
.way-accordion-row.active{
    display: table-row !important;
}
.way-accordion-row td{
    padding: 18px 22px !important;
    background: #f2f2f2 !important;
    border-top: 1px solid rgba(4,7,80,.10) !important;
}
/* ✅ FIX : Désactiver les labels dans l'accordion */
.way-accordion-row td::before{
    display: none !important;
    content: none !important;
}

.way-btn{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.18) !important;
}
.way-btn-primary{
    background: var(--way-orange) !important;
    color: #fff !important;
}
.way-btn-secondary{
    background: var(--way-blue) !important;
    color: #fff !important;
}
.way-btn-danger{
    background: #e53935 !important;
    color: #fff !important;
}
.way-btn-danger:hover{
    background: #c62828 !important;
    color: #fff !important;
}
.way-accordion-buttons{
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.way-fiche-link{
    margin-top: 10px !important;
    padding: 14px !important;
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid rgba(4,7,80,.10) !important;
}
.way-fiche-link strong{
    display:block !important;
    margin-bottom: 6px !important;
    color: var(--way-blue) !important;
}
.way-fiche-link code{
    color: var(--way-orange) !important;
    font-weight: 800 !important;
    word-break: break-all !important;
}

/* ========================= MOBILE UNIQUEMENT - DESIGN CARTES COMME MAQUETTE ========================= */
@media (max-width: 768px){
    /* Container avec fond orange */
    .way-bracelets-container{
        padding: 20px 12px !important;
        background: transparent !important;
    }
    
    /* Header */
    .way-bracelets-header h1{
        font-size: 28px !important;
        margin-bottom: 12px !important;
    }
    
    .way-bracelets-header p{
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    /* Garder la card mais retirer son style */
    .way-bracelets-card{
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
    
    /* Cacher uniquement le header du tableau */
    .way-table thead{
        display: none !important;
    }
    
    .way-table{
        background: transparent !important;
        border: 0 !important;
    }
    
    /* Transformer tbody en flex container */
    .way-table tbody{
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* Chaque TR devient une carte */
    .way-table tbody > tr:not(.way-accordion-row){
        display: block !important;
        background: #fff !important;
        border-radius: 16px !important;
        padding: 20px 16px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
        border: 1px solid rgba(4,7,80,0.08) !important;
    }
    
    /* Chaque TD devient une ligne d'info */
    .way-table tbody td{
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(4,7,80,0.08) !important;
    }
    
    .way-table tbody td:last-child{
        border-bottom: 0 !important;
    }
    
    /* Labels à gauche (via ::before) */
    .way-table tbody td::before{
        content: attr(data-label) !important;
        font-weight: 900 !important;
        color: var(--way-blue) !important;
        font-size: 14px !important;
    }
    
    /* N° Commande */
    .way-table tbody td:nth-child(1)::before{
        content: "N° Commande" !important;
    }
    
    .way-table tbody td:nth-child(1) strong{
        color: var(--way-orange) !important;
        font-size: 16px !important;
    }
    
    /* ID Bracelet */
    .way-table tbody td:nth-child(2)::before{
        content: "ID du bracelet" !important;
    }
    
    .way-table tbody td:nth-child(2){
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .way-table tbody td:nth-child(2) code{
        font-size: 11px !important;
        margin-top: 4px !important;
        word-break: break-all !important;
        width: 100% !important;
    }
    
    /* Type */
    .way-table tbody td:nth-child(3)::before{
        content: "Type" !important;
    }
    
    /* Encodé */
    .way-table tbody td:nth-child(4)::before{
        content: "Encodé ?" !important;
    }
    
    /* Action */
    .way-table tbody td:nth-child(5)::before{
        content: "Action" !important;
    }
    
    .way-table tbody td:nth-child(5){
        padding-top: 14px !important;
    }
    
    /* Bouton "Voir plus" pleine largeur */
    .way-accordion-toggle{
        padding: 12px 18px !important;
        font-size: 15px !important;
    }
    
    /* Accordion row (contenu déplié) */
    .way-accordion-row.active{
        display: block !important;
        background: #fff !important;
        border-radius: 16px !important;
        padding: 20px 16px !important;
        margin-top: 12px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    }
    
    .way-accordion-row td{
        display: block !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    
    /* Boutons empilés */
    .way-accordion-buttons{
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    
    .way-accordion-buttons .way-btn{
        width: 100% !important;
        padding: 14px 18px !important;
        font-size: 15px !important;
    }
    
    /* Lien de la fiche */
    .way-fiche-link{
        padding: 12px !important;
        background: rgba(240,136,63,0.08) !important;
        border-left: 3px solid var(--way-orange) !important;
    }
    
    .way-fiche-link strong{
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }
    
    .way-fiche-link code{
        font-size: 11px !important;
        line-height: 1.5 !important;
    }
}