/*
 * ============================================================
 * AyetamA Pay — Thème unifié v2.0
 * Harmonie complète avec ayetama.com
 *
 * Variables source du design system AyetamA global :
 *   --aya-primary   : #09284e  (bleu marine profond)
 *   --aya-secondary : #F9922C  (orange chaud)
 *   Raleway   → titres / labels
 *   DM Sans   → corps / données
 *
 * Ce fichier REMPLACE et CONSOLIDE :
 *   form.css | rating-modal.css | dashboard.css
 *   dispute.css | admin.css
 *
 * Chargement unique via wp_enqueue_style('ayetama-pay-theme')
 * enregistré dans ayetama-pay.php.
 *
 * Préfixe .ayp- strict — zéro collision Astra/Elementor/GeoDirectory.
 * ============================================================
 */


/* ============================================================
   1. VARIABLES — PALETTE COMPLÈTE
   ============================================================ */
:root {
    /* Couleurs primaires héritées du design system AyetamA */
    --ayp-navy         : var(--aya-primary,   #09284e);
    --ayp-orange       : var(--aya-secondary, #F9922C);

    /* Déclinaisons bleu marine */
    --ayp-navy-dark    : #061b35;          /* hover navy, headers sombres */
    --ayp-navy-mid     : #0d3a6e;          /* gradients, cards profondes  */
    --ayp-navy-light   : #e8f0fe;          /* fonds subtils bleutés       */
    --ayp-navy-ghost   : rgba(9,40,78,.06);/* striped rows, hover léger   */

    /* Déclinaisons orange */
    --ayp-orange-dark  : #d97820;          /* hover bouton, pressed state */
    --ayp-orange-light : #fff3e0;          /* fonds badges, alertes douces*/
    --ayp-orange-glow  : rgba(249,146,44,.28); /* ombres / lueur bouton   */

    /* Sémantique */
    --ayp-success      : #27ae60;
    --ayp-success-bg   : #e8f8f0;
    --ayp-success-border: #a8e6c4;
    --ayp-error        : #c0392b;
    --ayp-error-bg     : #fdf3f2;
    --ayp-error-border : #f5c6c2;
    --ayp-warn         : #e67e22;
    --ayp-warn-bg      : #fff3e0;
    --ayp-warn-border  : #ffd59e;
    --ayp-info-bg      : var(--ayp-navy-light);
    --ayp-info-border  : #b8cfff;

    /* Neutres */
    --ayp-white        : #ffffff;
    --ayp-bg           : #f4f6f9;
    --ayp-bg-card      : #ffffff;
    --ayp-bg-field     : #f8f9fa;
    --ayp-border       : #d1d9e0;
    --ayp-border-light : #e8edf2;
    --ayp-text         : #2c3e50;
    --ayp-text-mid     : #4a5568;
    --ayp-text-soft    : #6c7a89;
    --ayp-text-faint   : #aab4be;

    /* Typographie héritée */
    --ayp-font-h       : var(--aya-font-heading, 'Raleway', sans-serif);
    --ayp-font-b       : var(--aya-font-body,    'DM Sans',  sans-serif);

    /* Rayons */
    --ayp-r-sm         : 6px;
    --ayp-r-md         : 10px;
    --ayp-r-lg         : 14px;
    --ayp-r-xl         : 20px;
    --ayp-r-pill       : 50px;

    /* Ombres */
    --ayp-shadow-xs    : 0 1px 4px rgba(9,40,78,.06);
    --ayp-shadow-sm    : 0 2px 8px rgba(9,40,78,.08);
    --ayp-shadow-md    : 0 4px 16px rgba(9,40,78,.10);
    --ayp-shadow-lg    : 0 8px 28px rgba(9,40,78,.14);
    --ayp-shadow-btn   : 0 4px 14px var(--ayp-orange-glow);
}


/* ============================================================
   2. RESET CIBLÉ (dans l'espace .ayp-)
   ============================================================ */
.ayp-form-wrapper *,
.ayp-dashboard *,
.ayp-modal *,
.ayp-admin-wrap * {
    box-sizing: border-box;
}


/* ============================================================
   3. COMPOSANTS ATOMIQUES PARTAGÉS
   ============================================================ */

/* ----- 3.1 BADGES ----- */
.ayp-badge {
    display         : inline-flex;
    align-items     : center;
    gap             : 4px;
    padding         : 3px 11px;
    border-radius   : var(--ayp-r-pill);
    font-family     : var(--ayp-font-h);
    font-size       : .7rem;
    font-weight     : 700;
    text-transform  : uppercase;
    letter-spacing  : .05em;
    line-height     : 1.4;
    white-space     : nowrap;
}
.ayp-badge--green  { background: var(--ayp-success-bg);  color: var(--ayp-success); border: 1px solid var(--ayp-success-border); }
.ayp-badge--orange { background: var(--ayp-orange-light); color: var(--ayp-warn);   border: 1px solid var(--ayp-warn-border);    }
.ayp-badge--red    { background: var(--ayp-error-bg);    color: var(--ayp-error);   border: 1px solid var(--ayp-error-border);   }
.ayp-badge--blue   { background: var(--ayp-navy-light);  color: var(--ayp-navy);    border: 1px solid var(--ayp-info-border);    }
.ayp-badge--grey   { background: var(--ayp-bg);          color: var(--ayp-text-soft); border: 1px solid var(--ayp-border);      }
.ayp-badge--purple { background: #f3e5f5;                color: #7b1fa2;            border: 1px solid #ce93d8;                  }
.ayp-badge--navy   { background: var(--ayp-navy);        color: var(--ayp-white);   border: 1px solid var(--ayp-navy-dark);     }

/* ----- 3.2 BOUTONS ----- */
.ayp-btn {
    display         : inline-flex;
    align-items     : center;
    justify-content : center;
    gap             : 8px;
    padding         : 11px 24px;
    font-family     : var(--ayp-font-h);
    font-size       : .9rem;
    font-weight     : 700;
    border-radius   : var(--ayp-r-pill);
    border          : 2px solid transparent;
    cursor          : pointer;
    text-decoration : none;
    white-space     : nowrap;
    transition      : background .18s ease, border-color .18s ease,
                      color .18s ease, box-shadow .18s ease, transform .12s ease;
    outline         : none;
    line-height     : 1;
}
.ayp-btn:focus-visible {
    outline        : 3px solid var(--ayp-orange);
    outline-offset : 3px;
}

/* Primaire — orange AyetamA */
.ayp-btn--primary {
    background : var(--ayp-orange);
    color      : var(--ayp-white);
    box-shadow : var(--ayp-shadow-btn);
}
.ayp-btn--primary:hover:not(:disabled) {
    background : var(--ayp-orange-dark);
    box-shadow : 0 6px 20px var(--ayp-orange-glow);
    transform  : translateY(-2px);
}
.ayp-btn--primary:active:not(:disabled) { transform: translateY(0); }

/* Secondaire — marine AyetamA */
.ayp-btn--secondary {
    background : var(--ayp-navy);
    color      : var(--ayp-white);
    box-shadow : var(--ayp-shadow-sm);
}
.ayp-btn--secondary:hover:not(:disabled) {
    background : var(--ayp-navy-dark);
    transform  : translateY(-2px);
}

/* Ghost — contour marine */
.ayp-btn--ghost {
    background    : transparent;
    color         : var(--ayp-navy);
    border-color  : var(--ayp-border);
}
.ayp-btn--ghost:hover:not(:disabled) {
    background   : var(--ayp-navy-ghost);
    border-color : var(--ayp-navy);
}

/* Danger — rouge */
.ayp-btn--danger {
    background : var(--ayp-error);
    color      : var(--ayp-white);
}
.ayp-btn--danger:hover:not(:disabled) { background: #a93226; transform: translateY(-1px); }

/* Confirm — vert */
.ayp-btn--confirm {
    background : var(--ayp-success);
    color      : var(--ayp-white);
}
.ayp-btn--confirm:hover:not(:disabled) { background: #1e9450; transform: translateY(-1px); }

/* État désactivé commun */
.ayp-btn:disabled {
    opacity : .42;
    cursor  : not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner inline */
.ayp-btn__spinner {
    display   : inline-block;
    animation : ayp-spin .7s linear infinite;
}
@keyframes ayp-spin { to { transform: rotate(360deg); } }

/* ----- 3.3 CHAMPS DE FORMULAIRE ----- */
.ayp-input,
.ayp-textarea,
.ayp-form__input,
.ayp-proof-form__textarea,
.ayp-withdrawal-form__input,
.ayp-modal__textarea {
    display       : block;
    width         : 100%;
    padding       : 11px 14px;
    font-family   : var(--ayp-font-b);
    font-size     : .93rem;
    color         : var(--ayp-text);
    background    : var(--ayp-bg-field);
    border        : 1.5px solid var(--ayp-border);
    border-radius : var(--ayp-r-md);
    transition    : border-color .2s, box-shadow .2s, background .2s;
    outline       : none;
    box-sizing    : border-box;
}
.ayp-input:focus,
.ayp-textarea:focus,
.ayp-form__input:focus,
.ayp-proof-form__textarea:focus,
.ayp-modal__textarea:focus {
    border-color : var(--ayp-navy);
    box-shadow   : 0 0 0 3px rgba(9,40,78,.11);
    background   : var(--ayp-white);
}
.ayp-input::placeholder,
.ayp-textarea::placeholder,
.ayp-form__input::placeholder,
.ayp-modal__textarea::placeholder { color: var(--ayp-text-faint); font-size: .875rem; }

/* Labels */
.ayp-label,
.ayp-form__label,
.ayp-proof-form__label,
.ayp-modal__comment-label,
.ayp-withdrawal-form__label {
    display      : block;
    font-family  : var(--ayp-font-h);
    font-size    : .82rem;
    font-weight  : 700;
    color        : var(--ayp-navy);
    margin-bottom: 6px;
    letter-spacing: .02em;
}
.ayp-required { color: var(--ayp-orange); margin-left: 2px; }
.ayp-optional { font-weight: 400; color: var(--ayp-text-faint); font-size: .78rem; }

/* Hint */
.ayp-form__hint,
.ayp-proof-form__label small,
.ayp-withdrawal-form__hint {
    display    : block;
    font-size  : .78rem;
    color      : var(--ayp-text-soft);
    margin-top : 5px;
    line-height: 1.4;
}

/* Compteur caractères */
.ayp-char-counter { text-align: right; font-size: .73rem; color: var(--ayp-text-faint); margin-top: 3px; }

/* ----- 3.4 ALERTES & FEEDBACK ----- */
.ayp-alert,
.ayp-feedback,
.ayp-modal__feedback {
    display      : flex;
    align-items  : flex-start;
    gap          : 9px;
    padding      : 12px 16px;
    border-radius: var(--ayp-r-md);
    font-size    : .87rem;
    line-height  : 1.5;
    margin-top   : 8px;
}
.ayp-alert--error,
.ayp-feedback--error  { background: var(--ayp-error-bg);   border: 1px solid var(--ayp-error-border);   color: var(--ayp-error);   }
.ayp-alert--success,
.ayp-feedback--success{ background: var(--ayp-success-bg); border: 1px solid var(--ayp-success-border); color: var(--ayp-success); }
.ayp-alert__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* Notices */
.ayp-notice {
    border-radius: var(--ayp-r-md);
    padding      : 12px 16px;
    font-size    : .87rem;
    line-height  : 1.5;
    margin-top   : 10px;
}
.ayp-notice--info  { background: var(--ayp-info-bg);    border: 1px solid var(--ayp-info-border);   color: var(--ayp-navy);    }
.ayp-notice--red   { background: var(--ayp-error-bg);   border: 1px solid var(--ayp-error-border);  color: var(--ayp-error);   }
.ayp-notice--grey  { background: var(--ayp-bg);         border: 1px solid var(--ayp-border);        color: var(--ayp-text-soft); }
.ayp-notice--warn  { background: var(--ayp-orange-light);border: 1px solid var(--ayp-warn-border);  color: var(--ayp-warn);    }

/* ----- 3.5 SECTION TITRES ----- */
.ayp-section-title {
    font-family   : var(--ayp-font-h);
    font-size     : .97rem;
    font-weight   : 700;
    color         : var(--ayp-navy);
    margin-bottom : 14px;
    padding-bottom: 8px;
    border-bottom : 2px solid var(--ayp-orange);
    display       : inline-flex;
    align-items   : center;
    gap           : 7px;
}

/* ----- 3.6 EMPTY STATE ----- */
.ayp-empty-state { text-align: center; padding: 56px 20px; background: var(--ayp-white); border-radius: var(--ayp-r-lg); border: 1px dashed var(--ayp-border); }
.ayp-empty-state__icon { font-size: 3rem; display: block; margin-bottom: 14px; }
.ayp-empty-state p { color: var(--ayp-text-soft); font-size: .9rem; }

/* ----- 3.7 NO CONTENT ----- */
.ayp-no-content { color: var(--ayp-text-faint); font-style: italic; font-size: .87rem; }

/* ----- 3.8 LIEN TÉLÉCHARGEMENT ----- */
.ayp-btn-download {
    display      : inline-flex;
    align-items  : center;
    gap          : 6px;
    padding      : 10px 18px;
    background   : var(--ayp-navy);
    color        : var(--ayp-white);
    border-radius: var(--ayp-r-md);
    font-family  : var(--ayp-font-h);
    font-size    : .83rem;
    font-weight  : 700;
    text-decoration: none;
    transition   : background .18s, transform .12s;
}
.ayp-btn-download:hover { background: var(--ayp-navy-dark); transform: translateY(-1px); color: var(--ayp-white); }


/* ============================================================
   4. FORMULAIRE DE DÉPÔT (form.css remplacé)
   ============================================================ */
.ayp-form-wrapper { max-width: 720px; margin: 0 auto 48px; font-family: var(--ayp-font-b); color: var(--ayp-text); }
.ayp-form__title {
    font-family  : var(--ayp-font-h);
    font-size    : clamp(1.4rem,3vw,1.9rem);
    font-weight  : 700;
    color        : var(--ayp-navy);
    margin-bottom: 6px;
}
.ayp-form__subtitle { color: var(--ayp-text-soft); font-size: .93rem; margin-bottom: 32px; line-height: 1.6; }

.ayp-fieldset {
    border       : 1px solid var(--ayp-border-light);
    border-radius: var(--ayp-r-lg);
    padding      : 24px 28px;
    margin-bottom: 22px;
    background   : var(--ayp-white);
    box-shadow   : var(--ayp-shadow-sm);
    transition   : box-shadow .2s;
}
.ayp-fieldset:focus-within { box-shadow: var(--ayp-shadow-md); border-color: rgba(9,40,78,.2); }

.ayp-fieldset__legend {
    font-family   : var(--ayp-font-h);
    font-size     : .78rem;
    font-weight   : 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color         : var(--ayp-orange);
    padding       : 0 8px;
    background    : var(--ayp-white);
}

.ayp-form__row--two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media(max-width:560px){ .ayp-form__row--two-cols { grid-template-columns: 1fr; } }

.ayp-form__group { margin-bottom: 18px; }
.ayp-form__group:last-child { margin-bottom: 0; }

/* Préfixe XOF */
.ayp-input-prefix-wrapper { display: flex; align-items: stretch; }
.ayp-input-prefix {
    display      : flex;
    align-items  : center;
    padding      : 0 14px;
    background   : var(--ayp-navy);
    color        : var(--ayp-white);
    font-family  : var(--ayp-font-h);
    font-size    : .78rem;
    font-weight  : 700;
    letter-spacing:.04em;
    border       : 1.5px solid var(--ayp-navy);
    border-right : none;
    border-radius: var(--ayp-r-md) 0 0 var(--ayp-r-md);
    white-space  : nowrap;
}
.ayp-form__input--with-prefix { border-radius: 0 var(--ayp-r-md) var(--ayp-r-md) 0; flex: 1; }

/* Zone drag-and-drop fichier */
.ayp-file-drop-area {
    position     : relative;
    border       : 2px dashed var(--ayp-border);
    border-radius: var(--ayp-r-md);
    background   : var(--ayp-bg-field);
    padding      : 28px 20px;
    text-align   : center;
    cursor       : pointer;
    transition   : border-color .2s, background .2s;
}
.ayp-file-drop-area:hover,
.ayp-file-drop-area:focus-within {
    border-color : var(--ayp-orange);
    background   : var(--ayp-orange-light);
}
.ayp-form__input--file {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity : 0; cursor: pointer; z-index: 2;
}
.ayp-file-drop-area__label {
    display       : flex;
    flex-direction: column;
    align-items   : center;
    gap           : 6px;
    pointer-events: none;
    font-size     : .88rem;
    color         : var(--ayp-text-soft);
    line-height   : 1.5;
}
.ayp-file-icon { font-size: 2rem; display: block; margin-bottom: 4px; }
.ayp-file-drop-area__label small { font-size: .76rem; color: var(--ayp-text-faint); }

/* Actions formulaire */
.ayp-form__actions { margin: 24px 0 14px; }
.ayp-form__actions .ayp-btn { width: 100%; padding: 14px 28px; font-size: .97rem; }
.ayp-form__legal { font-size: .77rem; color: var(--ayp-text-faint); text-align: center; line-height: 1.5; }
.ayp-form__legal a { color: var(--ayp-navy); text-decoration: underline; }

/* Succès formulaire */
.ayp-success-wrapper {
    max-width    : 540px;
    margin       : 48px auto;
    text-align   : center;
    padding      : 40px 32px;
    background   : var(--ayp-white);
    border       : 1px solid var(--ayp-success-border);
    border-radius: var(--ayp-r-xl);
    box-shadow   : var(--ayp-shadow-md);
}
.ayp-success-icon   { font-size: 3.5rem; margin-bottom: 16px; }
.ayp-success__title { font-family: var(--ayp-font-h); font-size: 1.5rem; font-weight: 700; color: var(--ayp-success); margin-bottom: 12px; }
.ayp-success__message { font-size: .93rem; color: var(--ayp-text-soft); line-height: 1.6; margin-bottom: 10px; }


/* ============================================================
   5. MODALE DE NOTATION (rating-modal.css remplacé)
   ============================================================ */
body.ayp-modal-open { overflow: hidden; }

.ayp-modal {
    position  : fixed;
    inset     : 0;
    z-index   : 999999;
    display   : flex;
    align-items: center;
    justify-content: center;
    padding   : 16px;
    opacity   : 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.ayp-modal.ayp-modal--visible { opacity: 1; pointer-events: all; }

.ayp-modal__backdrop {
    position: fixed; inset: 0;
    background: rgba(9,40,78,.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}
.ayp-modal__dialog {
    position     : relative;
    z-index      : 1;
    background   : var(--ayp-white);
    border-radius: var(--ayp-r-xl);
    width        : 100%;
    max-width    : 520px;
    max-height   : 90vh;
    overflow-y   : auto;
    box-shadow   : var(--ayp-shadow-lg);
    transform    : translateY(24px) scale(.97);
    transition   : transform .28s cubic-bezier(.34,1.56,.64,1);
    font-family  : var(--ayp-font-b);
}
.ayp-modal.ayp-modal--visible .ayp-modal__dialog { transform: translateY(0) scale(1); }

.ayp-modal__header {
    position     : relative;
    background   : linear-gradient(135deg, var(--ayp-navy) 0%, var(--ayp-navy-mid) 100%);
    padding      : 28px 28px 24px;
    text-align   : center;
    border-radius: var(--ayp-r-xl) var(--ayp-r-xl) 0 0;
    /* Liseré orange en bas du header — signature AyetamA */
    border-bottom: 3px solid var(--ayp-orange);
}
.ayp-modal__icon { font-size: 2.4rem; display: block; margin-bottom: 10px; animation: ayp-bounce .6s ease .3s both; }
@keyframes ayp-bounce { 0%{transform:scale(.5);opacity:0} 70%{transform:scale(1.15)} 100%{transform:scale(1);opacity:1} }

.ayp-modal__title {
    font-family  : var(--ayp-font-h);
    font-size    : 1.25rem;
    font-weight  : 700;
    color        : var(--ayp-white);
    margin       : 0 0 8px;
}
.ayp-modal__subtitle { font-size: .83rem; color: rgba(255,255,255,.72); line-height: 1.5; margin: 0; }

.ayp-modal__close {
    position  : absolute;
    top: 14px; right: 16px;
    background: rgba(255,255,255,.14);
    border    : none;
    color     : rgba(255,255,255,.8);
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size : .9rem;
    cursor    : pointer;
    display   : flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s;
    line-height: 1;
}
.ayp-modal__close:hover { background: rgba(255,255,255,.28); color: var(--ayp-white); }

.ayp-modal__body { padding: 24px 28px 8px; }

.ayp-modal__tx-recap {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    background     : var(--ayp-bg);
    border-radius  : var(--ayp-r-md);
    padding        : 10px 14px;
    font-size      : .84rem;
    color          : var(--ayp-navy);
    margin-bottom  : 22px;
    border-left    : 3px solid var(--ayp-orange);
}
.ayp-modal__tx-label { color: var(--ayp-text-soft); }
.ayp-modal__tx-label strong { color: var(--ayp-navy); }
.ayp-modal__tx-amount { font-weight: 700; color: var(--ayp-orange); font-size: .95rem; }

/* Étoiles */
.ayp-stars-wrapper { text-align: center; margin-bottom: 8px; }
.ayp-stars { display: inline-flex; gap: 6px; margin-bottom: 10px; }
.ayp-star {
    background : none;
    border     : none;
    font-size  : 2.6rem;
    color      : var(--ayp-border);
    cursor     : pointer;
    padding    : 2px;
    transition : color .12s, transform .12s;
    line-height: 1;
    outline    : none;
}
.ayp-star:hover  { transform: scale(1.18); }
.ayp-star--active { color: var(--ayp-orange); text-shadow: 0 0 10px var(--ayp-orange-glow); }
.ayp-stars__label { font-size: .8rem; color: var(--ayp-text-soft); min-height: 20px; font-style: italic; }

.ayp-quality-labels { display: flex; justify-content: space-between; font-size: .68rem; color: var(--ayp-text-faint); margin-bottom: 18px; padding: 0 2px; }
@media(max-width:460px){ .ayp-quality-labels { display: none; } }

.ayp-modal__comment-group { margin-bottom: 14px; }

.ayp-modal__footer {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    gap            : 12px;
    padding        : 16px 28px 24px;
    border-top     : 1px solid var(--ayp-border-light);
    flex-wrap      : wrap;
}
.ayp-modal__footer .ayp-btn--primary { flex: 1; }

/* Succès modale */
.ayp-modal__success { padding: 40px 28px; text-align: center; }
.ayp-success-anim   { font-size: 4rem; display: block; margin-bottom: 16px; animation: ayp-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes ayp-pop { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.ayp-success-title { font-family: var(--ayp-font-h); font-size: 1.2rem; font-weight: 700; color: var(--ayp-success); margin-bottom: 10px; }
.ayp-success-text  { font-size: .88rem; color: var(--ayp-text-soft); line-height: 1.6; }

@media(max-width:480px){
    .ayp-modal { align-items: flex-end; padding: 0; }
    .ayp-modal__dialog { border-radius: var(--ayp-r-xl) var(--ayp-r-xl) 0 0; max-height: 95vh; transform: translateY(100%); }
    .ayp-modal.ayp-modal--visible .ayp-modal__dialog { transform: translateY(0); }
    .ayp-star { font-size: 2.1rem; }
    .ayp-modal__footer { flex-direction: column-reverse; }
    .ayp-modal__footer .ayp-btn { width: 100%; }
}


/* ============================================================
   6. DASHBOARDS FRONT-END (dashboard.css remplacé)
   ============================================================ */
.ayp-dashboard { max-width: 720px; margin: 0 auto 48px; font-family: var(--ayp-font-b); color: var(--ayp-text); }
.ayp-dashboard-notice { padding: 16px; background: var(--ayp-bg); border-radius: var(--ayp-r-md); font-size: .9rem; }

/* En-tête dashboard */
.ayp-dashboard__header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.ayp-avatar { border-radius: 50%; border: 3px solid var(--ayp-orange); }
.ayp-dashboard__name { font-family: var(--ayp-font-h); font-size: 1.25rem; font-weight: 700; color: var(--ayp-navy); margin: 0 0 4px; }
.ayp-dashboard__subtitle { font-size: .8rem; color: var(--ayp-text-soft); margin: 0; }

/* Carte solde — signature dégradé marine + liseré orange */
.ayp-balance-card {
    background   : linear-gradient(135deg, var(--ayp-navy) 0%, var(--ayp-navy-mid) 55%, #0f4a8e 100%);
    border-radius: var(--ayp-r-xl);
    padding      : 28px 28px 24px;
    color        : var(--ayp-white);
    margin-bottom: 28px;
    box-shadow   : var(--ayp-shadow-lg);
    border-top   : 4px solid var(--ayp-orange);
    position     : relative;
    overflow     : hidden;
}
/* Motif décoratif — cercles subtils AyetamA */
.ayp-balance-card::after {
    content       : '';
    position      : absolute;
    right         : -40px; top: -40px;
    width         : 180px; height: 180px;
    border-radius : 50%;
    background    : rgba(249,146,44,.1);
    pointer-events: none;
}
.ayp-balance-card__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 8px; font-family: var(--ayp-font-h); }
.ayp-balance-card__amount { font-size: 2.6rem; font-weight: 700; font-family: var(--ayp-font-h); line-height: 1; }
.ayp-balance-card__currency { font-size: .95rem; font-weight: 400; margin-left: 6px; opacity: .8; }
.ayp-balance-card__note { font-size: .76rem; opacity: .62; margin-top: 8px; margin-bottom: 20px; line-height: 1.5; }
.ayp-balance-card__actions { margin-top: 4px; }

/* Formulaire retrait (dans la carte marine) */
.ayp-withdrawal-form { margin-top: 16px; background: rgba(255,255,255,.1); border-radius: var(--ayp-r-md); padding: 16px; border: 1px solid rgba(255,255,255,.15); }
.ayp-withdrawal-form__label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 8px; color: rgba(255,255,255,.9); font-family: var(--ayp-font-h); }
.ayp-withdrawal-input-wrapper { display: flex; gap: 10px; flex-wrap: wrap; }
.ayp-withdrawal-form__input {
    flex: 1; min-width: 160px;
    padding: 10px 14px;
    border-radius: var(--ayp-r-md);
    border: 1.5px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.12);
    color: var(--ayp-white);
    font-size: .93rem;
    font-family: var(--ayp-font-b);
    outline: none;
    transition: border-color .2s, background .2s;
}
.ayp-withdrawal-form__input:focus { border-color: var(--ayp-orange); background: rgba(255,255,255,.22); }
.ayp-withdrawal-form__input::placeholder { color: rgba(255,255,255,.45); }
.ayp-withdrawal-form__hint { font-size: .74rem; opacity: .65; margin-top: 8px; }

/* Section dashboard */
.ayp-dashboard-section { margin-bottom: 28px; }

/* Cartes transaction */
.ayp-transactions-list { display: flex; flex-direction: column; gap: 14px; }
.ayp-tx-card {
    background   : var(--ayp-white);
    border-radius: var(--ayp-r-lg);
    overflow     : hidden;
    box-shadow   : var(--ayp-shadow-xs);
    border       : 1px solid var(--ayp-border-light);
    transition   : box-shadow .2s, transform .15s;
}
.ayp-tx-card:hover { box-shadow: var(--ayp-shadow-md); transform: translateY(-2px); }
.ayp-tx-card__header {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    padding        : 12px 16px;
    background     : var(--ayp-bg);
    border-bottom  : 2px solid var(--ayp-orange);
}
.ayp-tx-card__ref { font-family: var(--ayp-font-h); font-weight: 700; color: var(--ayp-navy); font-size: .9rem; }
.ayp-tx-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.ayp-tx-card__row  { display: flex; justify-content: space-between; align-items: center; font-size: .87rem; }
.ayp-tx-card__row span { color: var(--ayp-text-soft); }
.ayp-tx-card__row strong { color: var(--ayp-navy); }
.ayp-tx-card__actions { padding: 12px 16px; border-top: 1px solid var(--ayp-border-light); }

/* Zone preuves */
.ayp-proof-upload-zone {
    padding     : 16px;
    background  : var(--ayp-orange-light);
    border-top  : 2px dashed var(--ayp-orange);
    border-radius: 0 0 var(--ayp-r-lg) var(--ayp-r-lg);
}
.ayp-proof-deadline { font-size: .81rem; color: var(--ayp-text-soft); margin-bottom: 12px; }
.ayp-proof-form__title { font-family: var(--ayp-font-h); font-size: .9rem; font-weight: 700; color: var(--ayp-navy); margin-bottom: 12px; }
.ayp-proof-form__group { margin-bottom: 12px; }
.ayp-proof-form__file { font-size: .85rem; color: var(--ayp-text); }

/* Historique */
.ayp-history-list { display: flex; flex-direction: column; gap: 8px; }
.ayp-history-item {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    padding        : 10px 14px;
    border-radius  : var(--ayp-r-md);
    background     : var(--ayp-white);
    border         : 1px solid var(--ayp-border-light);
    font-size      : .87rem;
    transition     : background .15s;
}
.ayp-history-item:hover { background: var(--ayp-bg); }
.ayp-history-item__info { display: flex; flex-direction: column; gap: 2px; }
.ayp-history-item__info small { color: var(--ayp-text-faint); font-size: .74rem; }
.ayp-history-item__amount { font-family: var(--ayp-font-h); font-weight: 700; font-size: .95rem; }
.ayp-history-item__amount--positive { color: var(--ayp-success); }
.ayp-history-item__amount--negative { color: var(--ayp-error); }


/* ============================================================
   7. ZONE DE PREUVES LITIGE (dispute.css remplacé)
   ============================================================ */
.ayp-proof-feedback { padding: 10px 14px; border-radius: var(--ayp-r-md); font-size: .85rem; margin-top: 8px; }


/* ============================================================
   8. PANNEAU ADMIN wp-admin (admin.css remplacé)
   ============================================================ */
.ayp-admin-wrap { max-width: 1200px; font-family: var(--ayp-font-b); }

.ayp-admin-title {
    display     : flex;
    align-items : center;
    gap         : 10px;
    font-family : var(--ayp-font-h);
    font-size   : 1.5rem;
    font-weight : 700;
    color       : var(--ayp-navy);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--ayp-orange);
}
.ayp-admin-title__icon { font-size: 1.6rem; }
.ayp-admin-subtitle    { color: var(--ayp-text-soft); margin-bottom: 20px; }
.ayp-breadcrumb        { margin-bottom: 16px; font-size: .87rem; }
.ayp-breadcrumb a      { color: var(--ayp-navy); font-weight: 600; text-decoration: underline; }

/* KPI Grid admin */
.ayp-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 16px; margin-bottom: 32px; }
.ayp-kpi-grid--compact .ayp-kpi { min-width: 200px; }
.ayp-kpi {
    background   : var(--ayp-white);
    border-radius: var(--ayp-r-lg);
    padding      : 20px 16px;
    text-align   : center;
    box-shadow   : var(--ayp-shadow-sm);
    border-top   : 4px solid var(--ayp-border);
    transition   : box-shadow .2s, transform .15s;
}
.ayp-kpi:hover { box-shadow: var(--ayp-shadow-md); transform: translateY(-2px); }
.ayp-kpi--blue  { border-color: var(--ayp-navy);    }
.ayp-kpi--orange{ border-color: var(--ayp-orange);  }
.ayp-kpi--red   { border-color: var(--ayp-error);   }
.ayp-kpi--green { border-color: var(--ayp-success);  }
.ayp-kpi--gold  { border-color: #e6a817;             }
.ayp-kpi--teal  { border-color: #1abc9c;             }
.ayp-kpi__value { font-family: var(--ayp-font-h); font-size: 1.55rem; font-weight: 700; color: var(--ayp-navy); line-height: 1.2; }
.ayp-kpi__label { font-size: .76rem; color: var(--ayp-text-soft); margin-top: 6px; line-height: 1.4; }

/* Section admin */
.ayp-admin-section { background: var(--ayp-white); border-radius: var(--ayp-r-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--ayp-shadow-sm); border-left: 4px solid var(--ayp-orange); }
.ayp-info-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ayp-info-table th { text-align: left; padding: 10px 12px; background: var(--ayp-bg); color: var(--ayp-navy); font-family: var(--ayp-font-h); font-weight: 700; width: 35%; border-bottom: 1px solid var(--ayp-border-light); }
.ayp-info-table td { padding: 10px 12px; border-bottom: 1px solid var(--ayp-border-light); color: var(--ayp-text); }

/* ----- 8.1 Onglets Paiements manuels (Transactions / Historique / Configuration) ----- */
.ayp-nav-tabs { margin-bottom: 20px; }
.ayp-nav-tabs .nav-tab {
    font-family : var(--ayp-font-h);
    font-weight : 700;
    color       : var(--ayp-text-soft);
}
.ayp-nav-tabs .nav-tab-active,
.ayp-nav-tabs .nav-tab-active:focus,
.ayp-nav-tabs .nav-tab-active:focus:active {
    color      : var(--ayp-navy);
    background : var(--ayp-white);
    border-bottom-color: var(--ayp-white);
}
.ayp-tab-count {
    display       : inline-block;
    background    : var(--ayp-orange);
    color         : var(--ayp-white);
    border-radius : var(--ayp-r-pill);
    font-size     : .72rem;
    font-weight   : 700;
    padding       : 1px 8px;
    margin-left   : 4px;
    vertical-align: middle;
}

/* ----- 8.2 Filtres de statut (pills) ----- */
.ayp-status-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ayp-filter-pill {
    display       : inline-flex;
    align-items   : center;
    gap           : 6px;
    padding       : 6px 14px;
    border-radius : var(--ayp-r-pill);
    background    : var(--ayp-bg);
    color         : var(--ayp-text-mid);
    border        : 1px solid var(--ayp-border);
    font-family   : var(--ayp-font-h);
    font-size     : .82rem;
    font-weight   : 600;
    text-decoration: none;
    transition    : all .15s;
}
.ayp-filter-pill:hover { box-shadow: var(--ayp-shadow-xs); }
.ayp-filter-pill span { background: rgba(0,0,0,.08); border-radius: var(--ayp-r-pill); padding: 0 7px; font-size: .75rem; }
.ayp-filter-pill.active { color: var(--ayp-white); border-color: transparent; }
.ayp-filter-pill.active { background: var(--ayp-navy); }
.ayp-filter-pill.active span { background: rgba(255,255,255,.22); }
.ayp-filter-pill--green.active  { background: var(--ayp-success); }
.ayp-filter-pill--orange.active { background: var(--ayp-warn); }
.ayp-filter-pill--red.active    { background: var(--ayp-error); }

/* ----- 8.3 Barre d'actions groupées (suppression multiple) ----- */
.ayp-bulk-bar { margin-bottom: 12px; }
.ayp-bulk-bar .button { color: var(--ayp-error); border-color: var(--ayp-error-border); }
.ayp-bulk-bar .button:hover { background: var(--ayp-error-bg); }

/* ----- 8.4 Pagination ----- */
.ayp-pagination {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    flex-wrap      : wrap;
    gap            : 10px;
    margin-top     : 16px;
    padding-top    : 14px;
    border-top     : 1px solid var(--ayp-border-light);
}
.ayp-pagination__info { font-size: .82rem; color: var(--ayp-text-soft); }
.ayp-pagination__links { display: flex; gap: 4px; flex-wrap: wrap; }
.ayp-page-btn {
    display       : inline-flex;
    align-items   : center;
    justify-content: center;
    min-width     : 32px;
    height        : 32px;
    padding       : 0 9px;
    border-radius : var(--ayp-r-sm);
    border        : 1px solid var(--ayp-border);
    background    : var(--ayp-white);
    color         : var(--ayp-navy);
    font-size     : .82rem;
    font-weight   : 600;
    text-decoration: none;
}
.ayp-page-btn:hover  { background: var(--ayp-bg); }
.ayp-page-btn.active { background: var(--ayp-orange); color: var(--ayp-white); border-color: var(--ayp-orange); }

/* Table litiges */
.ayp-litiges-table .ayp-row--ready { background: #fffbf5 !important; }
.ayp-row--done { opacity: .55; }

/* Récapitulatif arbitrage */
.ayp-arbitrage-summary {
    background  : var(--ayp-white);
    border-radius: var(--ayp-r-lg);
    padding     : 20px 24px;
    margin-bottom: 24px;
    box-shadow  : var(--ayp-shadow-sm);
    display     : flex;
    flex-wrap   : wrap;
    gap         : 16px 40px;
    border-left : 4px solid var(--ayp-navy);
}
.ayp-summary-row { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.ayp-summary-row span { color: var(--ayp-text-soft); font-size: .78rem; font-family: var(--ayp-font-h); text-transform: uppercase; letter-spacing: .04em; }

/* Grille comparaison côte-à-côte */
.ayp-comparison-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }
@media(max-width:900px){ .ayp-comparison-grid { grid-template-columns: 1fr; } }

.ayp-comparison-col {
    background   : var(--ayp-white);
    border-radius: var(--ayp-r-lg);
    padding      : 20px;
    box-shadow   : var(--ayp-shadow-sm);
    border-top   : 4px solid var(--ayp-border);
}
.ayp-comparison-col--contract { border-color: var(--ayp-navy);   }
.ayp-comparison-col--client   { border-color: var(--ayp-orange); }
.ayp-comparison-col--artisan  { border-color: var(--ayp-success);}

.ayp-col-title { font-family: var(--ayp-font-h); font-size: .93rem; font-weight: 700; color: var(--ayp-navy); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--ayp-border-light); }
.ayp-proof-image { max-width: 100%; border-radius: var(--ayp-r-md); border: 1px solid var(--ayp-border-light); }
.ayp-proof-item  { padding: 12px; background: var(--ayp-bg); border-radius: var(--ayp-r-md); margin-bottom: 10px; border-left: 3px solid var(--ayp-border); }
.ayp-proof-item--file { border-left-color: var(--ayp-orange); }
.ayp-proof-item--text { border-left-color: var(--ayp-navy);   }
.ayp-proof-item__meta { font-size: .74rem; color: var(--ayp-text-soft); margin-bottom: 6px; font-family: var(--ayp-font-h); }
.ayp-proof-item__text { font-size: .87rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* Panneau décision */
.ayp-decision-panel {
    background   : var(--ayp-white);
    border-radius: var(--ayp-r-xl);
    padding      : 28px;
    box-shadow   : var(--ayp-shadow-md);
    border       : 2px solid var(--ayp-orange);
}
.ayp-decision-title    { font-family: var(--ayp-font-h); font-size: 1.1rem; font-weight: 700; color: var(--ayp-navy); margin-bottom: 6px; }
.ayp-decision-subtitle { color: var(--ayp-text-soft); font-size: .87rem; margin-bottom: 24px; }
.ayp-decision-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media(max-width:640px){ .ayp-decision-grid { grid-template-columns: 1fr; } }

.ayp-decision-card {
    border-radius: var(--ayp-r-lg);
    padding      : 20px;
    border       : 2px solid var(--ayp-border-light);
    text-align   : center;
    transition   : border-color .2s, box-shadow .2s;
}
.ayp-decision-card:hover { box-shadow: var(--ayp-shadow-md); }
.ayp-decision-card--artisan { border-color: var(--ayp-success); background: var(--ayp-success-bg); }
.ayp-decision-card--client  { border-color: var(--ayp-orange);  background: var(--ayp-orange-light); }
.ayp-decision-card__icon  { font-size: 2rem; margin-bottom: 8px; }
.ayp-decision-card__title { font-family: var(--ayp-font-h); font-size: .97rem; font-weight: 700; color: var(--ayp-navy); margin-bottom: 14px; }

.ayp-decision-card__breakdown { text-align: left; margin-bottom: 18px; }
.ayp-breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--ayp-border-light); font-size: .87rem; }
.ayp-breakdown-row span { color: var(--ayp-text-soft); }
.ayp-breakdown-row--deduct strong { color: var(--ayp-error); }
.ayp-breakdown-row--result { font-weight: 700; border-bottom: none; font-size: .95rem; }
.ayp-breakdown-row--result span { color: var(--ayp-text); font-weight: 700; }
.ayp-breakdown-row--result strong { color: var(--ayp-success); font-size: 1.05rem; }

.ayp-decision-btn {
    display      : block;
    width        : 100%;
    padding      : 12px;
    border       : none;
    border-radius: var(--ayp-r-md);
    font-family  : var(--ayp-font-h);
    font-size    : .9rem;
    font-weight  : 700;
    cursor       : pointer;
    transition   : opacity .18s, transform .12s;
    letter-spacing:.02em;
}
.ayp-decision-btn--artisan { background: var(--ayp-success); color: var(--ayp-white); }
.ayp-decision-btn--client  { background: var(--ayp-orange);  color: var(--ayp-white); }
.ayp-decision-btn:disabled { opacity: .45; cursor: not-allowed; }
.ayp-decision-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }

.ayp-arbitrage-result {
    margin-top   : 16px;
    padding      : 14px 18px;
    border-radius: var(--ayp-r-md);
    font-family  : var(--ayp-font-h);
    font-weight  : 700;
    background   : var(--ayp-success-bg);
    border       : 1px solid var(--ayp-success-border);
    color        : var(--ayp-success);
    font-size    : .9rem;
}

/* ============================================================
   9. RESPONSIVE GLOBAL
   ============================================================ */
@media(max-width:480px){
    .ayp-balance-card__amount { font-size: 1.9rem; }
    .ayp-withdrawal-input-wrapper { flex-direction: column; }
    .ayp-kpi-grid { grid-template-columns: 1fr 1fr; }
    .ayp-comparison-grid { grid-template-columns: 1fr; }
    .ayp-decision-grid { grid-template-columns: 1fr; }
}
@media(max-width:360px){
    .ayp-kpi-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   10. ANIMATIONS GLOBALES
   ============================================================ */
@keyframes ayp-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ayp-dashboard,
.ayp-form-wrapper { animation: ayp-fade-in .4s ease both; }


/* ============================================================
   Formulaire escrow — Sélecteur d'avance & récapitulatif tranches
   Externalisé depuis class-ayetama-pay-shortcode.php (v1.1.1)
   ============================================================ */

/* Sélecteur d'avance */
.ayp-avance-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ayp-avance-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 18px;
    border: 2px solid var(--ayp-border, #d1d9e0);
    border-radius: 10px;
    cursor: pointer;
    transition: all .18s ease;
    background: var(--ayp-bg-field, #f8f9fa);
    min-width: 72px;
    text-align: center;
}
.ayp-avance-option input[type=radio] { display: none; }
.ayp-avance-option:hover { border-color: var(--ayp-orange, #F9922C); background: #fff; }
.ayp-avance-option.selected,
.ayp-avance-option input:checked + .ayp-avance-pct ~ * ,
.ayp-avance-option:has(input:checked) {
    border-color: var(--ayp-orange, #F9922C);
    background: var(--ayp-orange-light, #fff3e0);
}
.ayp-avance-pct {
    font-family: var(--ayp-font-h, 'Raleway', sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ayp-navy, #09284e);
}
.ayp-avance-label { font-size: .7rem; color: var(--ayp-text-soft, #6c7a89); }

/* Récapitulatif des tranches */
.ayp-tranches-recap {
    margin-top: 20px;
    border: 1.5px solid var(--ayp-border, #d1d9e0);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ayp-white, #fff);
}
.ayp-tranche-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ayp-border-light, #e8edf2);
    gap: 12px;
}
.ayp-tranche-row:last-child { border-bottom: none; }
.ayp-tranche-row--total  { background: var(--ayp-navy-light, #e8f0fe); }
.ayp-tranche-row--avance { background: var(--ayp-orange-light, #fff3e0); }
.ayp-tranche-row--solde  { background: rgba(39,174,96,.06); }
.ayp-tranche-row--note   { background: var(--ayp-bg-field, #f8f9fa); }
.ayp-tranche-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}
.ayp-tranche-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.ayp-tranche-info strong {
    display: block;
    font-size: .87rem;
    font-weight: 700;
    color: var(--ayp-navy, #09284e);
    margin-bottom: 2px;
}
.ayp-tranche-info span {
    font-size: .77rem;
    color: var(--ayp-text-soft, #6c7a89);
    line-height: 1.4;
}
.ayp-tranche-amount {
    font-family: var(--ayp-font-h, 'Raleway', sans-serif);
    font-size: 1rem;
    font-weight: 800;
    color: var(--ayp-navy, #09284e);
    white-space: nowrap;
    flex-shrink: 0;
}
.ayp-tranche-amount--orange { color: var(--ayp-orange, #F9922C); }
.ayp-tranche-amount--green  { color: #27ae60; }
.ayp-badge-secure {
    display: inline-block;
    background: rgba(39,174,96,.12);
    border: 1px solid rgba(39,174,96,.25);
    color: #27ae60;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.ayp-form__textarea { resize: vertical; min-height: 100px; }
.ayp-fieldset--finance { background: var(--ayp-bg-field, #f8f9fa); }
@media(max-width:480px){
    .ayp-avance-selector { gap: 7px; }
    .ayp-avance-option { min-width: 60px; padding: 10px 12px; }
    .ayp-tranche-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
