/* ================================
   AF2A – STYLES PREMIUM (Clean Corporate)
   Palette :
   Bleu foncé: #003D71
   Bleu variant: #105793
   Bleu très clair: #E6EFFF
   Orange: #E9483F
   Jaune: #FBC018
   Gris clair: #eef2f5
================================ */

/* === Variables === */
:root {
    --af2a-blue: #003D71;
    --af2a-blue-light: #105793;
    --af2a-blue-soft: #E6EFFF;
    --af2a-orange: #E9483F;
    --af2a-yellow: #FBC018;
    --af2a-grey: #eef2f5;
    --af2a-border: #dce3ea;
}

/* =======================================
   CONTAINER PRINCIPAL
======================================= */
#af2a-tpv2-app {
    max-width: 960px;
    margin: 0 auto 60px;
    font-family: inherit;
}

#af2a-tpv2-app h2 {
    font-size: 24px;
	font-weight:bold;
    margin-bottom: 8px;
    color: var(--af2a-orange);
	text-align: center !important;
}
#af2a-tpv2-app h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--af2a-blue);
	text-align: center;
}
#af2a-tpv2-app > p {
    font-size: 14px;
    color: #4b5563;
}

/* =======================================
   LISTE HORIZONTALE (ROWS)
======================================= */

.af2a-tpv2-rows {
    margin-top: 24px;
}
.af2a-row-title {
    text-align: left !important;
	margin-top: Opx;
}
/* Une ligne = une formation */
.af2a-tpv2-row {
    display: flex;
    gap: 18px;
    background: #ffffff;
    border: 1px solid var(--af2a-border);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    align-items: stretch; /* ✅ permet à la colonne image d'avoir 100% */
}


/* IMAGE GAUCHE */
.af2a-row-image {
    width: 200px;
    height: auto;
	display:flex;
	border-radius: 12px 0px 0px 12px !important;
}

.af2a-row-image a {
    display: block;
    height: 100%; /* ← nécessaire */
	 border-radius: 12px 0px 0px 12px !important;
}

.af2a-row-image img {
    width: 100% !important;
    height: 100% !important;
	    border-radius: 12px 0px 0px 12px !important;
    object-fit: cover;
    display: block;
}


/* COLONNE CENTRALE */
.af2a-row-content {
    flex: 1;
	padding: 35px;
}

/* Titre formation */
.af2a-row-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--af2a-blue);
    line-height: 1.3;
}

.af2a-row-title a {
    color: var(--af2a-blue) !important;
    text-decoration: none;
}

.af2a-row-title a:hover {
    text-decoration: underline;
}

/* Infos "Requis / Saisis" */
.af2a-row-infos {
	border-top: 1px solid lightgrey;
	margin-top: 20px;
	padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--af2a-blue-light);
}

.af2a-info strong {
    color: var(--af2a-blue);
    font-weight: 600;
}

/* Mini liste des participants */
.af2a-row-mini-list ul {
    margin: 4px 0 0 16px;
    padding: 0;
    font-size: 15px;
    color: #111827;
}

.af2a-row-mini-list ul li {
    list-style: disc;
}

.af2a-row-mini-empty {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* COLONNE DROITE : STATUT + BOUTON */
.af2a-row-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 120px;
    align-items: flex-end;
	padding: 35px;
}

/* Statut */
.af2a-row-status {
    font-weight: 700;
    font-size: 14px;
}

/* Couleurs statuts (classes déjà exploitées côté PHP) */
.af2a-status-complete {
    color: #2e7d32;
}

.af2a-status-partial {
    color: var(--af2a-yellow);
}

.af2a-status-empty {
    color: var(--af2a-orange);
}

/* Bouton “Gérer” */
.af2a-tpv2-btn-manage {
    background: var(--af2a-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 999px !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s ease, transform .1s ease;
}

.af2a-tpv2-btn-manage:hover {
    background: var(--af2a-blue-light)!important;
    transform: translateY(-1px);
}

/* =======================================
   BOUTON FINAL “VALIDER LA COMMANDE”
======================================= */

.af2a-tpv2-validate-wrap {
    text-align: center;
    margin-top: 28px;
}

#af2a-tpv2-validate {
    background: var(--af2a-blue);
    color: white;
    border: none;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}

#af2a-tpv2-validate:hover {
    background: var(--af2a-blue-light);
    transform: translateY(-1px);
}

#af2a-tpv2-validate[disabled] {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

/* =======================================
   MODALE PREMIUM AF2A
======================================= */

#af2a-tpv2-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* géré par JS */
}

.af2a-tpv2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.af2a-tpv2-modal-dialog {
    position: relative;
    max-width: 650px;
    width: 92%;
    margin: 70px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
    overflow: hidden;
    border-top: 6px solid var(--af2a-blue);
}

/* Header */
.af2a-tpv2-modal-header {
    background: var(--af2a-blue-soft);
    padding: 25Px;
    border-bottom: 1px solid #d6e4f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.af2a-tpv2-modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: var(--af2a-blue) ;
    font-weight: 700;
}

.af2a-tpv2-modal-close {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--af2a-blue-light);
}

/* Body */
.af2a-tpv2-modal-body {
    padding: 35px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Mini cards participants (si JS génère ce format) */
.af2a-tpv2-mini-card {
    border: 1px solid var(--af2a-border);
    background: var(--af2a-blue-soft);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.af2a-tpv2-mini-card button {
    margin-top: 4px;
    margin-right: 8px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

.af2a-tpv2-mini-card .af2a-tpv2-edit {
    background: var(--af2a-yellow);
    color: #111827;
}

.af2a-tpv2-mini-card .af2a-tpv2-delete {
    background: var(--af2a-orange);
    color: white;
}

/* Formulaire participants */
#af2a-tpv2-form {
    margin-top: 20px;
    border-top: 1px solid var(--af2a-border);
    padding-top: 16px;
}

#af2a-tpv2-form h4 {
    margin-bottom: 12px;
    color: var(--af2a-blue);
    font-size: 15px;
}

/* Champs */
.af2a-tpv2-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.af2a-tpv2-field-row input,
.af2a-tpv2-field-row select {
    flex: 1 1 120px;
    padding: 9px 10px;
    border: 1px solid #E6EFFF !important;
    border-radius: 300px !important;
	color:#003D71 !important;
    font-size: 14px;
}

/* Actions bas de modale */
.af2a-tpv2-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

#af2a-tpv2-add,
#af2a-tpv2-close {
    padding: 9px 16px;
    border-radius: 300px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

#af2a-tpv2-add {
    background: var(--af2a-blue);
    color: #fff;
}

#af2a-tpv2-add:hover {
    background: var(--af2a-blue-light);
}

#af2a-tpv2-close {
    background: #dce3ea;
    color: var(--af2a-blue);
}

#af2a-tpv2-close:hover {
    background: #c6d4e0;
}

/* Responsive modale */
@media (max-width: 480px) {
    .af2a-tpv2-modal-dialog {
        margin: 40px auto;
    }
}

/* =======================================
   RESPONSIVE LAYOUT ROWS
======================================= */

@media (max-width: 900px) {
    .af2a-tpv2-row {
        align-items: stretch;
    }

    .af2a-row-image img {
        width: 130px;
        max-height: none;
    }
}

@media (max-width: 700px) {
    .af2a-tpv2-row {
        flex-direction: column;
    }

    .af2a-row-image img {
        width: 100%;
        height: auto;
    }

    .af2a-row-right {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
    }
}

/* Supprime complètement les puces des listes participants */
.af2a-tpv2-mini-list ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Style des lignes */
.af2a-tpv2-mini-list li {
    position: relative;
    padding-left: 28px; /* espace pour l'icône */
    margin-bottom: 6px;
    font-size: 16px;
    color: #003D71; /* bleu AF2A */
}

/* Icône user */
.af2a-tpv2-mini-list li::before {
    content: "\f007"; /* Font Awesome: icône user */
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* version solid */
    position: absolute;
    left: 0;
    top: 0;
    font-size: 18px;
    color: #003D71; /* bleu AF2A */
    line-height: 1;
}

/* af2a order item participants */

.af2a-order-item-participants table {
    margin-top: 6px;
    width: 100%;
    border-collapse: collapse;
}

.af2a-order-item-participants td,
.af2a-order-item-participants th {
    border: 1px solid #ddd;
    padding: 6px;
    font-size: 13px;
}
/* af2a order item  */
.af2a-order-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}

.af2a-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.af2a-meta {
    font-size: 13px;
    display: flex;
    align-items: center;
    opacity: .8;
}

.af2a-meta span {
    margin-right: 4px;
}



