/* ═══════════════════════════════════════════════════════════════════
   AFDIAG Ateliers EduSanglu — Frontend CSS (calendrier adhérents)
   Charte : Rouge #E30613 | Bleu canard #274C5B | Noir #1d2130 | Rose #fce6e7
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --ac-red:        #E30613;
    --ac-red-dark:   #c0000f;
    --ac-red-bg:     #fce6e7;
    --ac-blue:       #274C5B;
    --ac-blue-dark:  #1d3b47;
    --ac-blue-light: #e8f4f8;
    --ac-dark:       #1d2130;
    --ac-pink:       #fce6e7;
    --ac-grey:       #6b7280;
    --ac-grey-light: #f8f9fa;
    --ac-orange:     #e65100;
    --ac-orange-bg:  #fff3e0;
    --ac-border:     #fce6e7;
    --ac-radius:     8px;
    --ac-shadow:     0 2px 10px rgba(39,76,91,.08);
    --ac-font:       'Work Sans', system-ui, sans-serif;
}

.afdiag-es-calendrier-wrap,
.afdiag-es-mes-ateliers,
.afdiag-es-calendrier-wrap *,
.afdiag-es-mes-ateliers * { font-family: var(--ac-font) !important; }

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION MOIS
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-calendrier-wrap { max-width: 1000px; margin: 0 auto; }

.afdiag-es-nav-mois {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
    background: linear-gradient(135deg, var(--ac-blue), var(--ac-dark));
    padding: 16px 22px;
    border-radius: var(--ac-radius);
}

.afdiag-es-mois-titre {
    margin: 0;
    font-size: 1.3em;
    font-weight: 800;
    color: #fff;
    text-transform: capitalize;
    flex: 1;
    text-align: center;
    letter-spacing: .3px;
}

.afdiag-es-nav-btn {
    background: rgba(255,255,255,.15);
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--ac-radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s;
    border: 1px solid rgba(255,255,255,.3);
}
.afdiag-es-nav-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   GRILLE CALENDRIER
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-calendrier {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.afdiag-es-cal-header {
    background: var(--ac-blue);
    color: #fff;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.afdiag-es-cal-case {
    min-height: 100px;
    border: 1px solid var(--ac-pink);
    background: #fff;
    padding: 6px;
    border-radius: 4px;
    font-size: 13px;
    position: relative;
    transition: border-color .2s;
}

.afdiag-es-cal-case.afdiag-es-vide {
    background: var(--ac-grey-light);
    border-color: transparent;
}

.afdiag-es-cal-case.afdiag-es-aujourd-hui {
    border-color: var(--ac-blue);
    background: var(--ac-blue-light);
}

.afdiag-es-cal-case.afdiag-es-a-atelier {
    background: #fffafc;
    border-color: var(--ac-pink);
}

.afdiag-es-num-jour {
    font-weight: 700;
    font-size: 13px;
    color: var(--ac-grey);
    display: block;
    margin-bottom: 4px;
}

.afdiag-es-aujourd-hui .afdiag-es-num-jour { color: var(--ac-blue); }

/* Carte atelier dans la case calendrier */
.afdiag-es-cal-atelier {
    background: var(--ac-pink);
    border-left: 3px solid var(--ac-red);
    padding: 6px 8px;
    border-radius: 0 4px 4px 0;
    margin-top: 4px;
    font-size: 11px;
}

.afdiag-es-at-heure {
    font-weight: 800;
    color: var(--ac-red);
    display: block;
    font-size: 11px;
}

.afdiag-es-at-titre {
    display: block;
    font-weight: 600;
    color: var(--ac-dark);
    margin: 2px 0 4px;
    line-height: 1.3;
}

.afdiag-es-places {
    display: block;
    font-size: 10px;
    color: var(--ac-grey);
    margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.afdiag-es-badge-inscrit { background: var(--ac-blue);  color: #fff; }
.afdiag-es-badge-attente { background: var(--ac-orange-bg); color: var(--ac-orange); }
.afdiag-es-badge-complet { background: var(--ac-red-bg); color: var(--ac-red); }

/* ═══════════════════════════════════════════════════════════════════
   BOUTONS CALENDRIER
   ═══════════════════════════════════════════════════════════════════ */

button.afdiag-es-btn-participer,
button.afdiag-es-btn-attente,
button.afdiag-es-btn-annuler {
    display: block;
    width: 100%;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity .2s;
    font-family: var(--ac-font) !important;
}

button.afdiag-es-btn-participer {
    background: var(--ac-red);
    color: #fff;
}
button.afdiag-es-btn-participer:hover { background: var(--ac-red-dark); }

button.afdiag-es-btn-attente {
    background: var(--ac-orange);
    color: #fff;
}

button.afdiag-es-btn-annuler {
    background: transparent;
    color: var(--ac-red);
    border: 2px solid var(--ac-red);
    padding: 8px 12px;
    font-size: 12px;
}
button.afdiag-es-btn-annuler:hover {
    background: var(--ac-red);
    color: #fff;
}

button:disabled { opacity: .5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════
   MESSAGES
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-message,
.afdiag-es-notice {
    padding: 14px 18px;
    border-radius: var(--ac-radius);
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

.afdiag-es-msg-ok  { background: var(--ac-blue-light); border-left: 4px solid var(--ac-blue);  color: var(--ac-blue); }
.afdiag-es-msg-err { background: var(--ac-red-bg);     border-left: 4px solid var(--ac-red);    color: var(--ac-red); }

/* ═══════════════════════════════════════════════════════════════════
   MES ATELIERS (historique adhérent — shortcode autonome)
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-mes-ateliers h2 {
    font-size: 12px;
    font-weight: 700;
    color: var(--ac-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid var(--ac-red);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.afdiag-es-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 16px 0 32px;
}

.afdiag-es-card {
    border: 1.5px solid var(--ac-pink);
    border-radius: var(--ac-radius);
    overflow: hidden;
    box-shadow: var(--ac-shadow);
    background: #fff;
    transition: box-shadow .2s, border-color .2s;
}
.afdiag-es-card:hover { box-shadow: 0 6px 20px rgba(39,76,91,.12); border-color: var(--ac-blue); }

.afdiag-es-card-photo { width: 100%; height: 160px; object-fit: cover; }

.afdiag-es-card-body { padding: 18px; }

.afdiag-es-card-body h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ac-blue);
}

.afdiag-es-card-body p {
    margin: 6px 0;
    font-size: 13px;
    color: var(--ac-dark);
}

.afdiag-es-muted { color: var(--ac-grey) !important; font-style: italic; }

.afdiag-es-btn-small {
    background: transparent;
    color: var(--ac-red);
    border: 2px solid var(--ac-red);
    border-radius: var(--ac-radius);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: all .2s;
    font-family: var(--ac-font) !important;
}
.afdiag-es-btn-small:hover { background: var(--ac-red); color: #fff; }

.afdiag-es-empty { color: var(--ac-grey); font-style: italic; padding: 30px 0; text-align: center; }

/* ═══════════════════════════════════════════════════════════════════
   ONGLETS (afdiag_mes_ateliers_es)
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--ac-pink);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.afdiag-es-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: var(--ac-font) !important;
    font-size: 13px;
    font-weight: 700;
    color: var(--ac-grey);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color .2s, background .2s, border-color .2s;
    white-space: nowrap;
}

.afdiag-es-tab:hover {
    color: var(--ac-blue);
    background: var(--ac-blue-light);
}

.afdiag-es-tab.afdiag-es-tab-active {
    color: var(--ac-blue);
    border-bottom-color: var(--ac-red);
    background: var(--ac-blue-light);
}

.afdiag-es-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--ac-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.afdiag-es-tab-badge-inscrit { background: var(--ac-blue); }

/* Panneau visible / caché */
.afdiag-es-tab-panel { display: block; }

/* Carte atelier disponible (non inscrit) */
.afdiag-es-card-disponible { border-color: #e0edf2; }
.afdiag-es-card-disponible:hover { border-color: var(--ac-blue); }

.afdiag-es-places-dispo {
    font-size: 12px !important;
    color: #2e7d32 !important;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .afdiag-es-calendrier { grid-template-columns: 1fr; }
    .afdiag-es-cal-header { display: none; }
    .afdiag-es-cal-case.afdiag-es-vide { display: none; }
    .afdiag-es-nav-mois { flex-direction: column; text-align: center; padding: 14px 16px; }
    .afdiag-es-nav-btn { width: 100%; text-align: center; }
    .afdiag-es-mois-titre { font-size: 1.1em; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESSOURCES POST-ATELIER (onglet adhérent)
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-tab-badge-ressource { background: #274C5B; }

.afdiag-es-card-passe { border-color: #e0edf2; opacity: .95; }
.afdiag-es-card-passe:hover { border-color: var(--ac-blue); opacity: 1; }

.afdiag-es-ressources-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.afdiag-es-ressource-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--ac-radius);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
}
.afdiag-es-ressource-btn:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; }

.afdiag-es-ressource-pdf {
    background: var(--ac-red-bg);
    color: var(--ac-red);
    border: 1.5px solid var(--ac-red);
}
.afdiag-es-ressource-pdf:hover { background: var(--ac-red); color: #fff; }

.afdiag-es-ressource-replay {
    background: var(--ac-blue-light);
    color: var(--ac-blue);
    border: 1.5px solid var(--ac-blue);
}
.afdiag-es-ressource-replay:hover { background: var(--ac-blue); color: #fff; }

.afdiag-es-ressource-pending {
    display: inline-block;
    font-size: 12px;
    color: var(--ac-grey);
    font-style: italic;
    padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════
   PASTILLE ATELIER PASSÉ
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-atelier-passe {
    opacity: .72;
    background: #f0f0f0 !important;
    border-left-color: #9e9e9e !important;
}

.afdiag-es-badge-passe {
    display: inline-block;
    background: #757575;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   POPUP DÉTAIL ATELIER
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.afdiag-es-popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    position: relative;
    font-family: var(--ac-font) !important;
}

.afdiag-es-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,.5);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s;
}
.afdiag-es-popup-close:hover { background: var(--ac-red); }

.afdiag-es-popup-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

.afdiag-es-popup-body {
    padding: 20px 22px 22px;
}

.afdiag-es-popup-badge-passe {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eeeeee;
    color: #616161;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.afdiag-es-popup-titre {
    font-size: 18px;
    font-weight: 800;
    color: var(--ac-dark);
    margin: 0 0 14px;
    line-height: 1.3;
    font-family: var(--ac-font) !important;
}

.afdiag-es-popup-infos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    background: var(--ac-grey-light);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.afdiag-es-popup-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ac-dark);
}
.afdiag-es-popup-info span:first-child { font-size: 15px; flex-shrink: 0; }

.afdiag-es-popup-desc {
    font-size: 13px;
    color: var(--ac-grey);
    line-height: 1.7;
    margin: 0 0 14px;
    white-space: pre-line;
}

.afdiag-es-popup-actions {
    margin-top: 16px;
    border-top: 1px solid var(--ac-border);
    padding-top: 14px;
}

.afdiag-es-popup-action {
    width: 100%;
    padding: 10px 16px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
}

/* ══════════════════════════════════════════════════════════════
   MODALE RÉCAPITULATIF AVANT PAIEMENT
   ══════════════════════════════════════════════════════════════ */

.afdiag-es-recap-modal {
    max-width: 480px;
}

.afdiag-es-recap-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

.afdiag-es-recap-body {
    padding: 24px 24px 20px;
}

.afdiag-es-recap-header {
    margin-bottom: 16px;
}

.afdiag-es-recap-badge {
    display: inline-block;
    background: var(--ac-red, #c0392b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.afdiag-es-recap-titre {
    font-size: 20px;
    font-weight: 800;
    color: var(--ac-dark, #1a1a2e);
    margin: 0;
    line-height: 1.3;
}

.afdiag-es-recap-infos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--ac-grey-light, #f7f7f7);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.afdiag-es-recap-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ac-dark, #1a1a2e);
}

.afdiag-es-recap-info span:first-child {
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.afdiag-es-recap-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px;
}

.afdiag-es-recap-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff8f0;
    border: 2px solid var(--ac-red, #c0392b);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.afdiag-es-recap-total-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ac-dark, #1a1a2e);
}

.afdiag-es-recap-total-prix {
    font-size: 28px;
    font-weight: 900;
    color: var(--ac-red, #c0392b);
    letter-spacing: -0.5px;
}

.afdiag-es-recap-securite {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.5;
}

.afdiag-es-recap-actions {
    display: flex;
    gap: 10px;
}

.afdiag-es-recap-annuler {
    flex: 0 0 auto;
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: var(--ac-font, inherit);
}
.afdiag-es-recap-annuler:hover { background: #e0e0e0; }

.afdiag-es-recap-payer {
    flex: 1;
    background: var(--ac-red, #c0392b);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: var(--ac-font, inherit);
    letter-spacing: .01em;
}
.afdiag-es-recap-payer:hover  { background: #a93226; }
.afdiag-es-recap-payer:active { transform: scale(.98); }
.afdiag-es-recap-payer:disabled { opacity: .7; cursor: wait; }

.afdiag-es-recap-loading {
    text-align: center;
    padding: 12px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 480px) {
    .afdiag-es-recap-actions {
        flex-direction: column-reverse;
    }
    .afdiag-es-recap-total-prix {
        font-size: 22px;
    }
}

/* ── Ateliers EduSanglu dans le calendrier unifié ─────────────────── */
.afdiag-es-atelier-es {
    border-left: 3px solid #27ae60 !important;
    background: linear-gradient(135deg, #f0faf4, #e8f5e9) !important;
}
.afdiag-es-atelier-es .afdiag-es-at-heure {
    color: #27ae60 !important;
}

/* ── Badges statut temporel calendrier ─────────────────────── */
.afdiag-es-badge-statut {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-bottom: 2px;
    white-space: nowrap;
    line-height: 1.4;
}
.afdiag-es-badge-a-venir  { background: #e6f9ee; color: #1a7a3e; border: 1px solid #a8e6bf; }
.afdiag-es-badge-bientot  { background: #fff8e1; color: #856404; border: 1px solid #ffe08a; }
.afdiag-es-badge-en-cours { background: #e8f0fe; color: #1a56c4; border: 1px solid #a8c4f7; }
.afdiag-es-badge-passe    { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }

/* Atelier en cours : légère surbrillance */
.afdiag-es-atelier-en-cours {
    border-left: 3px solid #1a56c4 !important;
}
/* Atelier passé : atténué */
.afdiag-es-atelier-passe {
    opacity: .72;
}

/* ──────────────────────────────────────────────────────────────────
   PAGES DE RETOUR PAIEMENT (succès & échec)
   ────────────────────────────────────────────────────────────────── */
/* ── Page succès paiement ────────────────────────────────────── */
.afdiag-es-succes-wrap {
    max-width: 600px;
    margin: 48px auto 64px;
    font-family: inherit;
}

/* Header */
.afdiag-es-succes-header {
    text-align: center;
    padding: 48px 32px 36px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border: 2px solid #e5e7eb;
    border-bottom: none;
}

/* Checkmark animé */
.afdiag-es-succes-check {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}
.afdiag-es-checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
}
.afdiag-es-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke: #C0392B;
    fill: #C0392B;
    animation: afdiag-stroke 0.6s cubic-bezier(0.65,0,0.45,1) forwards;
}
.afdiag-es-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: afdiag-stroke 0.3s cubic-bezier(0.65,0,0.45,1) 0.6s forwards;
}
@keyframes afdiag-stroke {
    100% { stroke-dashoffset: 0; }
}

.afdiag-es-succes-titre {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1d2130;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.afdiag-es-succes-sous-titre {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}
.afdiag-es-succes-sous-titre strong {
    color: #1d2130;
}

/* Card récapitulatif atelier */
.afdiag-es-succes-card {
    background: #1d2130;
    color: #fff;
    padding: 24px 32px;
    border-left: 2px solid #1d2130;
    border-right: 2px solid #1d2130;
}
.afdiag-es-succes-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C0392B;
    margin-bottom: 14px;
}
.afdiag-es-succes-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.afdiag-es-succes-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.afdiag-es-succes-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.afdiag-es-succes-info-text {
    font-size: 0.97rem;
    color: #e5e7eb;
    line-height: 1.4;
}
.afdiag-es-succes-info-text strong {
    color: #fff;
    font-size: 1.05rem;
}

/* Étapes suivantes */
.afdiag-es-succes-etapes {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-top: none;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.afdiag-es-succes-etapes-titre {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}
.afdiag-es-succes-etape {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.afdiag-es-succes-etape-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #C0392B;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.afdiag-es-succes-etape-texte {
    font-size: 0.93rem;
    color: #4b5563;
    line-height: 1.6;
}
.afdiag-es-succes-etape-texte strong {
    color: #1d2130;
    display: block;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

/* Boutons */
.afdiag-es-succes-actions {
    display: flex;
    gap: 12px;
    padding: 24px 32px 32px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
}
.afdiag-es-succes-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: 8px;
    font-size: 0.93rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
    cursor: pointer;
    flex: 1;
    min-width: 140px;
    text-align: center;
}
.afdiag-es-succes-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.afdiag-es-succes-btn-primaire {
    background: #C0392B;
    color: #fff;
}
.afdiag-es-succes-btn-secondaire {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

/* ── Anciens styles retour (page erreur — conservés) ─────────── */
.afdiag-es-retour {
    max-width: 560px;
    margin: 48px auto;
    padding: 40px 36px;
    border-radius: 16px;
    text-align: center;
    font-family: inherit;
}
.afdiag-es-retour-succes {
    background: #f0fdf4;
    border: 2px solid #86efac;
}
.afdiag-es-retour-echec {
    background: #fff7ed;
    border: 2px solid #fdba74;
}
.afdiag-es-retour-icone {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
}
.afdiag-es-retour-titre {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111827;
}
.afdiag-es-retour-echec  .afdiag-es-retour-titre { color: #c2410c; }
.afdiag-es-retour-intro { font-size: 1.05rem; color: #374151; margin: 0 0 24px; }
.afdiag-es-retour-recap {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 0 0 20px;
    text-align: left;
    border: 1px solid #fed7aa;
}
.afdiag-es-retour-recap-ligne {
    display: flex; gap: 10px; align-items: baseline;
    padding: 5px 0; font-size: .97rem; color: #374151;
}
.afdiag-es-retour-recap-ligne span:first-child { flex-shrink: 0; font-size: 1.1rem; }
.afdiag-es-retour-recap-ligne a { color: #1d4ed8; text-decoration: underline; }
.afdiag-es-retour-email,
.afdiag-es-retour-conseil,
.afdiag-es-retour-contact { font-size: .93rem; color: #6b7280; margin: 0 0 24px; }
.afdiag-es-retour-contact a { color: #1d4ed8; }
.afdiag-es-retour-actions {
    display: flex; flex-wrap: wrap; gap: 12px;
    justify-content: center; margin-bottom: 20px;
}
.afdiag-es-retour-btn {
    display: inline-block; padding: 12px 24px; border-radius: 8px;
    font-size: .97rem; font-weight: 600; text-decoration: none;
    cursor: pointer; transition: opacity .15s;
}
.afdiag-es-retour-btn:hover { opacity: .88; }
.afdiag-es-retour-btn-primaire { background: #16a34a; color: #fff; }
.afdiag-es-retour-echec .afdiag-es-retour-btn-primaire { background: #ea580c; }
.afdiag-es-retour-btn-secondaire { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }

@media (max-width: 600px) {
    .afdiag-es-succes-wrap { margin: 16px 12px 40px; }
    .afdiag-es-succes-header { padding: 36px 20px 28px; }
    .afdiag-es-succes-card,
    .afdiag-es-succes-etapes,
    .afdiag-es-succes-actions { padding-left: 20px; padding-right: 20px; }
    .afdiag-es-succes-titre { font-size: 1.4rem; }
    .afdiag-es-succes-actions { flex-direction: column; }
    .afdiag-es-succes-btn { flex: unset; width: 100%; }
    .afdiag-es-retour { margin: 24px 12px; padding: 28px 20px; }
    .afdiag-es-retour-titre { font-size: 1.35rem; }
    .afdiag-es-retour-actions { flex-direction: column; }
    .afdiag-es-retour-btn { width: 100%; text-align: center; }
}


/* ═══════════════════════════════════════════════════════
   FORMAT LISTE ÉVÉNEMENT — Mes ateliers (espace adhérent)
   ═══════════════════════════════════════════════════════ */

.afdiag-es-event-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.afdiag-es-event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    transition: background .15s;
}

/* Vignette photo */
.afdiag-es-event-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.afdiag-es-event-thumb-placeholder {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.afdiag-es-event-item:first-child {
    border-top: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
}
.afdiag-es-event-item:last-child {
    border-radius: 0 0 10px 10px;
    border-bottom: 1px solid #e5e7eb;
}
.afdiag-es-event-item:only-child {
    border-radius: 10px;
}
.afdiag-es-event-item:hover {
    background: #f9fafb;
}

/* Bloc date carré */
.afdiag-es-event-date-bloc {
    flex-shrink: 0;
    width: 48px;
    height: 52px;
    background: #274C5B;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 1;
}
.afdiag-es-event-inscrit .afdiag-es-event-date-bloc {
    background: #16a34a;
}
.afdiag-es-event-attente .afdiag-es-event-date-bloc {
    background: #d97706;
}
.afdiag-es-event-passe .afdiag-es-event-date-bloc {
    background: #6b7280;
}
.afdiag-es-event-jour {
    font-size: 1.3rem;
    font-weight: 800;
}
.afdiag-es-event-mois {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .85;
}

/* Info centrale */
.afdiag-es-event-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.afdiag-es-event-titre {
    font-weight: 700;
    font-size: .97rem;
    color: #1d2130;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    white-space: normal;
}
.afdiag-es-event-meta {
    font-size: .83rem;
    color: #6b7280;
}

/* Actions */
.afdiag-es-event-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Bouton S'inscrire dans la liste événement — plus grand */
.afdiag-es-event-actions .afdiag-es-btn-participer,
.afdiag-es-event-actions .afdiag-es-btn-attente {
    padding: 10px 22px !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap;
}

/* Bouton annuler outline */
.afdiag-es-btn-danger-outline {
    background: transparent !important;
    color: #dc2626 !important;
    border: 2px solid #dc2626 !important;
    font-weight: 700;
    padding: 10px 24px !important;
    font-size: 14px !important;
}
.afdiag-es-btn-danger-outline:hover {
    background: #dc2626 !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════════
   CARTES ATELIERS — ESPACE ANIMATEUR
   ═══════════════════════════════════════════════════════════════════ */

.afdiag-es-at-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 8px 0 24px;
}

.afdiag-es-at-card {
    border: 1.5px solid var(--ac-pink);
    border-radius: var(--ac-radius);
    overflow: hidden;
    box-shadow: var(--ac-shadow);
    background: #fff;
    transition: box-shadow .2s, border-color .2s;
    position: relative;
}
.afdiag-es-at-card:hover {
    box-shadow: 0 6px 20px rgba(39,76,91,.12);
    border-color: var(--ac-blue);
}

/* Statut en attente : légère bordure orange */
.afdiag-es-at-card.afdiag-es-at-en-attente {
    border-color: var(--ac-orange);
}

/* Atelier passé : légèrement atténué */
.afdiag-es-at-passe {
    opacity: .85;
}
.afdiag-es-at-passe:hover { opacity: 1; }

/* Photo */
.afdiag-es-at-photo {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--ac-grey-light);
}

/* Placeholder quand pas de photo */
.afdiag-es-at-photo-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--ac-blue-light), #e0edf2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--ac-blue);
    opacity: .5;
}

/* Corps de la carte */
.afdiag-es-at-body {
    padding: 16px 18px 14px;
}

.afdiag-es-at-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.afdiag-es-at-top h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ac-blue);
    flex: 1;
    line-height: 1.3;
}

/* Badges statut animateur */
.afdiag-es-badge-attente {
    background: var(--ac-orange-bg);
    color: var(--ac-orange);
    border: 1px solid #ffcc80;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.afdiag-es-badge-valide {
    background: #e6f9ee;
    color: #1a7a3e;
    border: 1px solid #a8e6bf;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.afdiag-es-badge-refuse {
    background: var(--ac-red-bg);
    color: var(--ac-red);
    border: 1px solid #f5a3a7;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.afdiag-es-badge-annule {
    background: #f3f4f6;
    color: var(--ac-grey);
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Motif de refus */
.afdiag-es-at-note-refus {
    background: var(--ac-red-bg);
    border-left: 3px solid var(--ac-red);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #721c24;
    margin-bottom: 10px;
}

/* Méta (date, inscrits, zoom) */
.afdiag-es-at-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ac-grey);
    margin-bottom: 14px;
}

/* Actions */
.afdiag-es-at-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .afdiag-es-at-grid { grid-template-columns: 1fr; }
}

/* Ressource pending inline */
.afdiag-es-ressource-pending {
    font-size: .82rem;
    color: #9ca3af;
    font-style: italic;
}

@media (max-width: 600px) {
    .afdiag-es-event-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }
    .afdiag-es-event-actions {
        width: 100%;
        justify-content: flex-start;
        padding-left: 64px;
    }
}

