/* ==========================================================================
   CAPEB Extranet — Styles
   ========================================================================== */

/* Layout */
.capeb-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.capeb-wrap h2 {
    text-align: center;
    font-weight: bold;
    color: #54595F;
}

.capeb-wrap h2 .capeb-accent {
    color: #ef402f;
}

/* Breadcrumbs */
.capeb-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #7A7A7A;
}

.capeb-breadcrumbs a {
    text-decoration: none;
    color: #ef402f;
}

.capeb-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Alerts */
.capeb-alert {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.capeb-alert-error {
    background-color: #ef402f;
    color: #fff;
}

.capeb-alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.capeb-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Buttons */
.capeb-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.capeb-btn-primary {
    background-color: #ef402f;
    color: #fff;
}

.capeb-btn-primary:hover {
    background-color: #d63520;
    color: #fff;
}

.capeb-btn-secondary {
    background-color: #555;
    color: #fff;
}

.capeb-btn-secondary:hover {
    background-color: #333;
    color: #fff;
}

.capeb-btn-success {
    background-color: #61CE70;
    color: #fff;
}

.capeb-btn-danger {
    background-color: #ef402f;
    color: #fff;
}

/* Tables */
.capeb-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.capeb-table th,
.capeb-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.capeb-table thead th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #54595F;
}

.capeb-table tbody tr:hover {
    background-color: #fafafa;
}

/* Cards */
.capeb-card {
    background: #f9fafa;
    padding: 30px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}

/* Forms */
.capeb-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.capeb-form input[type="text"],
.capeb-form input[type="email"],
.capeb-form input[type="number"],
.capeb-form input[type="date"],
.capeb-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Override padding 16px 55px applique par Calculated Fields Form (fbuilder)
   sur ses champs (cession-reprise, passif-social). !important necessaire
   pour battre la chaine #fbuilder #fieldlist_X .fields .dfield .field.
   Couvre tous les types CFF : number/decimal/text/select/textarea. */
#fbuilder input.field,
#fbuilder select.field,
#fbuilder textarea.field {
    padding: 8px 12px !important;
}

.capeb-form .capeb-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.capeb-form .capeb-form-col {
    flex: 1;
    min-width: 120px;
}

.capeb-form .capeb-form-actions {
    margin-top: 20px;
    text-align: center;
}

/* Dashboard */
.capeb-dashboard-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

.capeb-dashboard-section {
    flex: 1;
    min-width: 250px;
}

.capeb-dashboard-section h3 {
    font-size: 16px;
    color: #54595F;
}

.capeb-dashboard-section h3 .capeb-accent {
    color: #ef402f;
}

.capeb-dashboard-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.capeb-dashboard-section ul li {
    padding: 6px 0;
}

.capeb-dashboard-section ul li a {
    text-decoration: none;
    color: #333;
}

.capeb-dashboard-section ul li a:hover {
    color: #ef402f;
    text-decoration: underline;
}

.capeb-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 5px;
    font-size: 9px;
    font-weight: bold;
    color: #fff;
    background-color: #555;
    vertical-align: top;
    border-radius: 2px;
}

.capeb-badge-new {
    color: #FFD700;
    background-color: #212121;
}

.capeb-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* ==========================================================================
   Sidebar Mon Compte (override WooCommerce navigation)
   ========================================================================== */

.capeb-sidebar {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 24px;
}

.capeb-sidebar-section + .capeb-sidebar-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #f0f0f0;
}

.capeb-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #54595F;
    margin: 0 0 10px;
    padding: 0 12px;
    text-transform: uppercase;
}

.capeb-sidebar-title .capeb-accent {
    color: #ef402f;
}

.capeb-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.capeb-sidebar-item {
    margin: 1px 0;
}

.capeb-sidebar-link,
.capeb-sidebar-link:hover,
.capeb-sidebar-link:focus,
.capeb-sidebar-link:visited,
.capeb-sidebar-link:active {
    text-decoration: none !important;
}

.capeb-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    line-height: 1.3;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.capeb-sidebar-link:hover,
.capeb-sidebar-link:focus {
    background: #fff5f3;
    color: #ef402f;
    outline: none;
}

.capeb-sidebar-item.is-active > .capeb-sidebar-link {
    background: #fff5f3;
    color: #ef402f;
    border-left-color: #ef402f;
    font-weight: 600;
}

.capeb-sidebar-label {
    flex: 1;
}

.capeb-sidebar .capeb-badge {
    flex-shrink: 0;
    margin-left: 0;
}

/* Wrapper centre pour pages-enfants /mon-compte/* (auto-injecte par CAPEB_MyAccount) */
.capeb-myaccount-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Aligne le titre rendu par le theme (.page-header > .entry-title) sur le
   meme axe vertical que la sidebar/contenu (.capeb-myaccount-page).
   Le theme Hello Elementor centre .entry-title en max-width 1140px / 10px
   de padding ; on force ici 1100px / 20px pour matcher .capeb-myaccount-page. */
.capeb-myaccount-context .page-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.capeb-myaccount-context .page-header .entry-title {
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
    text-align: left;
}

/* Tableau de bord /mon-compte/ racine — hero + status + cards */
.capeb-account-hero {
    margin-bottom: 28px;
}

.capeb-account-greeting {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 600;
    color: #2c2c2c;
    line-height: 1.2;
    text-align: left;
}

.capeb-account-greeting .capeb-accent {
    color: #ef402f;
}

.capeb-account-lead {
    margin: 0;
    font-size: 15px;
    color: #7a7a7a;
}

.capeb-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: 10px;
    border: 1px solid;
    margin-bottom: 28px;
}

.capeb-status-ok {
    background: #f1fbf3;
    border-color: #cfe9d4;
    color: #1d5e2a;
}

.capeb-status-warning {
    background: #fff7eb;
    border-color: #ffd591;
    color: #8a4a00;
}

.capeb-status-text {
    flex: 1;
    min-width: 0;
}

.capeb-status-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
    font-weight: 600;
}

.capeb-status-text span {
    font-size: 13px;
    opacity: 0.85;
}

.capeb-status-card .capeb-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    font-size: 13px;
}

.capeb-account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.capeb-account-card,
.capeb-account-card:hover,
.capeb-account-card:focus,
.capeb-account-card:focus-visible,
.capeb-account-card:visited,
.capeb-account-card:active {
    text-decoration: none !important;
}

.capeb-account-card {
    display: block;
    padding: 18px 20px;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.capeb-account-card:hover,
.capeb-account-card:focus-visible {
    border-color: #ef402f;
    box-shadow: 0 4px 12px rgba(239, 64, 47, 0.08);
    transform: translateY(-2px);
    outline: none;
}

.capeb-card-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 4px;
}

.capeb-card-desc {
    display: block;
    font-size: 13px;
    color: #7a7a7a;
}

.capeb-account-card:hover .capeb-card-title,
.capeb-account-card:focus-visible .capeb-card-title {
    color: #ef402f;
}

/* WooCommerce My Account layout — wrapper grid isole (override my-account.php) */
.capeb-myaccount-layout {
    display: block;
    position: relative;
}


.capeb-myaccount-layout .woocommerce-MyAccount-navigation {
    padding: 0;
    margin: 0;
    float: none;
    width: auto;
}

.capeb-myaccount-layout .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.capeb-myaccount-layout .woocommerce-MyAccount-content {
    float: none;
    width: auto;
    min-width: 0;
}

@media (min-width: 769px) {
    .capeb-myaccount-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 28px;
        align-items: start;
    }
}

@media (max-width: 768px) {
    .capeb-sidebar {
        position: static;
        margin-bottom: 24px;
    }
}
