/* ============================================================
   WooCommerce Crèche Affiliate – Styles dashboard
   ============================================================ */

.wca-dashboard {
    max-width: 960px;
}

/* ----------------------------------------------------------
   Section 1 : Code de parrainage
   ---------------------------------------------------------- */
.wca-referral-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
}

.wca-referral-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #1a1a2e;
}

.wca-referral-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.wca-code-group {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 360px;
}

.wca-code-input {
    flex: 1;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #1a1a2e;
    background: #fff;
    outline: none;
}

.wca-copy-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.wca-copy-btn:hover,
.wca-copy-btn.copied {
    background: #003d5b;
    color: #fff;
    border-color: #003d5b;
}

.wca-copy-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.wca-code-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #e67e22;
}

/* ----------------------------------------------------------
   Section 2 : Cartes statistiques
   ---------------------------------------------------------- */
.wca-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

@media ( max-width: 600px ) {
    .wca-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.wca-card {
    background: #003d5b;
    color: #fff;
    padding: 28px 24px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wca-card h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wca-card .value {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.wca-card .value .woocommerce-Price-amount {
    color: #fff;
    font-size: 34px;
    font-weight: 700;
}

.wca-card .value .woocommerce-Price-currencySymbol {
    font-size: 20px;
}

.wca-icon-bg {
    position: absolute;
    bottom: -8px;
    left: 12px;
    font-size: 52px;
    opacity: 0.12;
    line-height: 1;
    color: #fff;
    pointer-events: none;
}

.wca-icon-bg .dashicons {
    font-size: 52px;
    width: 52px;
    height: 52px;
    color: #fff;
}

/* ----------------------------------------------------------
   Section 3 : Tableau
   ---------------------------------------------------------- */
.wca-table-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.wca-table-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e0e0;
}

.wca-filter-left,
.wca-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.wca-filter-left select,
.wca-filter-right input[type="text"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 13px;
    color: #333;
}

.wca-filter-left select {
    width: 70px;
}

.wca-filter-right input[type="text"] {
    width: 180px;
}

.wca-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 !important;
}

.wca-table thead tr {
    background: #003d5b;
}

.wca-table thead th {
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border: none !important;
    background: transparent !important;
}

.wca-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.wca-table tbody tr:last-child {
    border-bottom: none;
}

.wca-table tbody tr:hover {
    background: #f7fafc;
}

.wca-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    vertical-align: middle;
}

.wca-no-result {
    text-align: center !important;
    color: #888;
    padding: 24px !important;
    font-style: italic;
}

/* Pied de tableau */
.wca-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
    gap: 8px;
}

.wca-pagination-nav {
    display: flex;
    gap: 8px;
}

.wca-page-btn {
    font-size: 13px;
    color: #003d5b;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #003d5b;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.wca-page-btn:hover {
    background: #003d5b;
    color: #fff;
}

.wca-page-btn.disabled {
    color: #bbb;
    border-color: #ddd;
    pointer-events: none;
    cursor: default;
}

/* ============================================================
   Champ code crèche (formulaire Mes informations)
   ============================================================ */
.wca-parent-field {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 24px;
}

.wca-parent-field legend {
    font-weight: 600;
    padding: 0 8px;
    color: #003d5b;
    font-size: 15px;
}

.wca-linked-notice {
    background: #eaf4fb;
    border-left: 4px solid #003d5b;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    color: #003d5b;
}

/* ============================================================
   Encart "Ma crèche" – dashboard parent
   ============================================================ */
.wca-parent-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
}

.wca-parent-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* État rattaché */
.wca-parent-card__linked {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.wca-parent-card__label {
    font-size: 13px;
    color: #888;
}

.wca-parent-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #003d5b;
}

.wca-parent-card__code {
    display: inline-block;
    background: #003d5b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 20px;
}

.wca-parent-card__edit {
    font-size: 13px;
    color: #003d5b;
    text-decoration: underline;
}

/* État non rattaché */
.wca-parent-card__empty {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-bottom: 14px;
}

.wca-parent-card__cta.button {
    background: #003d5b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.wca-parent-card__cta.button:hover {
    background: #005580;
    color: #fff;
}
