/**
 * APRAPFEA Adhésion en Ligne — Styles Dédiés Pleine Largeur
 * Architecture Impeccable & Intégration Visuelle
 */

/* ==========================================================================
   Bannière supérieure : Actions en blocs & Badges des 5 Collèges agrandis
   ========================================================================== */
.adhesion-banner-card {
    box-shadow: 0 16px 45px rgba(13, 56, 35, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--th-border-color, #e2e8f0) !important;
}

.adhesion-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 360px;
    margin-left: auto;
}

@media (max-width: 991px) {
    .adhesion-banner-actions {
        margin: 15px auto 0 auto;
        max-width: 100%;
    }
}

.banner-action-btn {
    width: 100% !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    padding: 16px 26px !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 14px rgba(13, 56, 35, 0.08) !important;
    transition: all 0.28s ease !important;
    text-decoration: none !important;
}

.banner-action-btn span {
    white-space: nowrap !important;
}

.banner-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.16) !important;
}

/* Grille des 5 collèges agrandie & valorisée */
.banner-colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    width: 100%;
}

.banner-college-pill {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
}

.banner-college-pill:hover {
    background: #ffffff;
    border-color: var(--th-theme-color, #0D3823);
    box-shadow: 0 6px 18px rgba(13, 56, 35, 0.07);
    transform: translateY(-2px);
}

.banner-college-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(201, 151, 56, 0.12);
    color: var(--th-theme-color2, #C99738);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.banner-college-pill:hover .banner-college-icon {
    background: var(--th-theme-color, #0D3823);
    color: var(--th-theme-color2, #C99738);
}

.banner-college-text {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    line-height: 1.3;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .banner-college-text {
        white-space: normal;
    }
}

/* Conteneur et carte principale pleine largeur */
.adhesion-form-section {
    position: relative;
}

.team-join-form-wrap1.adhesion-edition {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: 0 20px 60px rgba(13, 56, 35, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid var(--th-border-color, #e2e8f0) !important;
    overflow: hidden !important;
    margin: 0 auto;
}

.team-join-form-wrap1.adhesion-edition .team-join-form {
    width: 100% !important;
    max-width: 100% !important;
    padding: 60px 70px !important;
    box-sizing: border-box;
}

@media (max-width: 1199px) {
    .team-join-form-wrap1.adhesion-edition .team-join-form {
        padding: 45px 35px !important;
    }
}

@media (max-width: 767px) {
    .team-join-form-wrap1.adhesion-edition .team-join-form {
        padding: 30px 18px !important;
    }
}

/* En-tête officiel du formulaire */
.form-header-official {
    position: relative;
}

/* Blocs de sections avec séparation fluide */
.form-section-block {
    margin-bottom: 45px;
    padding-bottom: 10px;
}

.form-section-block:last-of-type {
    margin-bottom: 30px;
}

/* En-têtes des 4 étapes numérotées */
.adhesion-step-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 26px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.adhesion-step-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 2px;
    background: var(--th-theme-color2, #C99738);
    border-radius: 2px;
}

.adhesion-step-badge {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--th-theme-color, #0D3823), #1a5c3c);
    color: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(13, 56, 35, 0.22);
    flex-shrink: 0;
    border: 1px solid rgba(201, 151, 56, 0.4);
}

.adhesion-step-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    margin: 0;
    line-height: 1.25;
}

.adhesion-step-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* ==========================================================================
   Section 1 : Cartes de sélection des Collèges (Agencement sur 2 lignes : 3 + 2)
   ========================================================================== */
.college-selector-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 10px;
}

/* Ligne 1 : 3 cartes réparties uniformément (chacune 2 cols sur 6) */
.college-selector-grid .college-card-label:nth-child(1),
.college-selector-grid .college-card-label:nth-child(2),
.college-selector-grid .college-card-label:nth-child(3) {
    grid-column: span 2;
}

/* Ligne 2 : 2 cartes réparties uniformément (chacune 3 cols sur 6) */
.college-selector-grid .college-card-label:nth-child(4),
.college-selector-grid .college-card-label:nth-child(5) {
    grid-column: span 3;
}

@media (max-width: 991px) {
    .college-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .college-selector-grid .college-card-label:nth-child(1),
    .college-selector-grid .college-card-label:nth-child(2),
    .college-selector-grid .college-card-label:nth-child(3),
    .college-selector-grid .college-card-label:nth-child(4) {
        grid-column: span 1 !important;
    }
    .college-selector-grid .college-card-label:nth-child(5) {
        grid-column: span 2 !important;
    }
}

@media (max-width: 600px) {
    .college-selector-grid {
        grid-template-columns: 1fr;
    }
    .college-selector-grid .college-card-label {
        grid-column: span 1 !important;
    }
}

.college-card-label {
    position: relative;
    cursor: pointer;
    margin-bottom: 0;
    display: block;
    height: 100%;
}

.college-card-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.college-card-inner {
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fdfdfd;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.college-card-label:hover .college-card-inner {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.college-card-label input[type="radio"]:checked+.college-card-inner {
    border-color: var(--th-theme-color, #0D3823);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.10);
}

.college-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.college-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(13, 56, 35, 0.08);
    color: var(--th-theme-color, #0D3823);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.college-card-label input[type="radio"]:checked+.college-card-inner .college-icon-box {
    background: var(--th-theme-color, #0D3823);
    color: var(--th-theme-color2, #C99738);
}

.college-radio-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.college-card-label input[type="radio"]:checked+.college-card-inner .college-radio-indicator {
    border-color: var(--th-theme-color, #0D3823);
    background: var(--th-theme-color, #0D3823);
}

.college-card-label input[type="radio"]:checked+.college-card-inner .college-radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
}

.college-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    margin-bottom: 4px;
    line-height: 1.3;
}

.college-card-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   Section 2 : Champs d'Identification (Grille stricte 2 par ligne alignée)
   ========================================================================== */
.adhesion-fields-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 28px;
    width: 100%;
}

@media (max-width: 767px) {
    .adhesion-fields-grid-2 {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.form-group.adhesion-field {
    margin-bottom: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group.adhesion-field label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    line-height: 1.3;
}

.form-group.adhesion-field label .required-mark {
    color: #dc2626;
    font-weight: 700;
    margin-left: 2px;
}

.form-group.adhesion-field .form-control {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 14.5px;
    color: #1e293b;
    transition: all 0.25s ease;
    height: 52px;
    width: 100%;
    box-sizing: border-box;
}

.form-group.adhesion-field .form-control:focus {
    background: #ffffff;
    border-color: var(--th-theme-color, #0D3823);
    box-shadow: 0 0 0 4px rgba(13, 56, 35, 0.08);
    outline: none;
}

.form-field-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
}

/* ==========================================================================
   Section 3 : Cartes à cocher Engagements (Grille 2x2 pleine largeur)
   ========================================================================== */
.engagement-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 991px) {
    .engagement-options-grid {
        grid-template-columns: 1fr;
    }
}

.engagement-check-label {
    position: relative;
    cursor: pointer;
    margin-bottom: 0;
    display: block;
}

.engagement-check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.engagement-check-inner {
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 22px;
    background: #fdfdfd;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.25s ease;
    height: 100%;
}

.engagement-check-label:hover .engagement-check-inner {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.engagement-check-label input[type="checkbox"]:checked+.engagement-check-inner {
    border-color: var(--th-theme-color2, #C99738);
    background: #fffcf5;
    box-shadow: 0 6px 18px rgba(201, 151, 56, 0.12);
}

.engagement-checkbox-box {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 7px;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: transparent;
    font-size: 13px;
}

.engagement-check-label input[type="checkbox"]:checked+.engagement-check-inner .engagement-checkbox-box {
    border-color: var(--th-theme-color2, #C99738);
    background: var(--th-theme-color2, #C99738);
    color: #ffffff;
}

.engagement-title-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--th-theme-color, #0D3823);
    margin-bottom: 4px;
}

.engagement-desc-text {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   Section 4 : Déclaration, Ville, Date & Signature
   ========================================================================== */
.declaration-official-box {
    background: linear-gradient(135deg, rgba(13, 56, 35, 0.05), rgba(201, 151, 56, 0.09));
    border-left: 4px solid var(--th-theme-color2, #C99738);
    border-radius: 0 14px 14px 0;
    padding: 18px 24px;
    margin-bottom: 26px;
}

.declaration-official-box p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--th-theme-color, #0D3823);
    font-style: italic;
    line-height: 1.55;
}

.lu-approuve-checkbox-wrap {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 22px;
    margin-bottom: 26px;
    transition: all 0.25s ease;
}

.lu-approuve-checkbox-wrap:hover {
    border-color: var(--th-theme-color, #0D3823);
    background: #ffffff;
}

.signature-pad-container {
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 18px;
    padding: 18px;
    position: relative;
    transition: all 0.25s ease;
}

.signature-pad-container:hover,
.signature-pad-container.active {
    border-color: var(--th-theme-color, #0D3823);
    background: #fafcfb;
}

.signature-canvas-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    touch-action: none;
    cursor: crosshair;
}

.signature-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.signature-guideline {
    position: absolute;
    bottom: 38px;
    left: 24px;
    right: 24px;
    border-bottom: 1px dashed #cbd5e1;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    padding-bottom: 5px;
}

.signature-pad-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.signature-notice-text {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-signature {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-signature:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Alertes & Feedbacks */
.adhesion-alert-box {
    border-radius: 14px;
    padding: 20px 24px;
    font-size: 15px;
    line-height: 1.55;
    animation: fadeInSlide 0.4s ease forwards;
}

.adhesion-alert-box.alert-success {
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    color: #065f46;
}

.adhesion-alert-box.alert-danger {
    background: #fef2f2;
    border: 1.5px solid #ef4444;
    color: #991b1b;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Bannière Donateur VIP (Don >= 20 000 FCFA)
   ========================================================================== */
.adhesion-vip-banner {
    background: linear-gradient(135deg, #fdfaf3 0%, #fffdf8 100%);
    border: 1.5px solid #C99738 !important;
    box-shadow: 0 10px 30px rgba(201, 151, 56, 0.12);
}

.vip-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #C99738 0%, #926618 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(201, 151, 56, 0.3);
}

.vip-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    background: rgba(201, 151, 56, 0.15);
    color: #926618;
    border: 1px solid rgba(201, 151, 56, 0.3);
}

/* ==========================================================================
   Section 4 : Ouvrage Fondateur & Modalités d'Acquisition
   ========================================================================== */
.adhesion-book-card,
.adhesion-book-exempt-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    transition: all 0.25s ease;
}

.adhesion-book-cover-wrap {
    max-width: 140px;
    margin: 0 auto;
}

.adhesion-book-cover {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(13, 56, 35, 0.15);
    transition: transform 0.25s ease;
}

.adhesion-book-card:hover .adhesion-book-cover {
    transform: scale(1.03);
}

.adhesion-book-price-tag {
    background: linear-gradient(135deg, #0D3823 0%, #1B4D3E 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(13, 56, 35, 0.2);
}

.adhesion-book-price-tag span {
    color: #C99738;
}

.adhesion-book-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adhesion-notice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.adhesion-notice-item i {
    font-size: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Grille de sélection du mode de règlement du livre */
.adhesion-book-modes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 767px) {
    .adhesion-book-modes-grid {
        grid-template-columns: 1fr;
    }
}

.adhesion-mode-card {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.adhesion-mode-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.adhesion-mode-inner {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    transition: all 0.25s ease;
}

.adhesion-mode-card:hover .adhesion-mode-inner {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.adhesion-mode-card.active .adhesion-mode-inner,
.adhesion-mode-card:has(input[type="radio"]:checked) .adhesion-mode-inner {
    border-color: var(--th-theme-color, #0D3823);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(13, 56, 35, 0.1);
}

.adhesion-mode-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.adhesion-mode-card.active .adhesion-mode-icon,
.adhesion-mode-card:has(input[type="radio"]:checked) .adhesion-mode-icon {
    transform: scale(1.08);
}

.adhesion-mode-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.adhesion-mode-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.adhesion-book-delivery-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--th-theme-color, #0D3823) !important;
}