/**
 * Styles du formulaire d'inscription VTT Academ
 * Couleurs du club : #4b8499, #6fb7c3, #d4a22c
 */

:root {
    --vtt-primary: #4b8499;
    --vtt-secondary: #6fb7c3;
    --vtt-accent: #d4a22c;
    --vtt-primary-dark: #3a6a7a;
    --vtt-accent-dark: #b8891f;
    --vtt-light: #e8f4f7;
    --vtt-text: #2c3e50;
    --vtt-text-light: #5a6c7d;
    --vtt-border: #cde3e9;
    --vtt-success: #27ae60;
    --vtt-error: #e74c3c;
}

/* Container principal */
#vtt-inscription-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(75, 132, 153, 0.15);
    overflow: hidden;
}

.vtt-inscription-wrapper {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 3rem 2rem;
    margin: 0;
    width: 100%;
    max-width: none;
    box-shadow: none;
}

#vtt-inscription-form {
    margin-top: 0;
}

#vtt-inscription-form *,
#vtt-inscription-form *::before,
#vtt-inscription-form *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================================
   INDICATEUR D'ÉTAPES (Progress Steps)
   ======================================== */
.form-steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--vtt-primary), var(--vtt-primary-dark));
    padding: 3rem 3.25rem;
    min-height: 110px;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.form-steps-indicator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--vtt-accent);
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 55%;
    width: 90%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.step-indicator.completed:not(:last-child)::after {
    background: var(--vtt-accent);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-indicator.active .step-number {
    background: var(--vtt-accent);
    color: #fff;
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 162, 44, 0.4);
}

.step-indicator.completed .step-number {
    background: #fff;
    color: var(--vtt-primary);
}

.step-indicator.completed .step-number::before {
    content: '✓';
}

.step-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    padding: 0.2rem 0.6rem;
    transition: color 0.3s ease;
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: #fff;
}

/* ========================================
   CONTENEUR DES ÉTAPES
   ======================================== */
.form-step {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
    padding: 16px !important;
    padding-top: 0 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   TITRES
   ======================================== */
#vtt-inscription-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vtt-primary);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--vtt-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#vtt-inscription-form h2::before {
    content: '';
    width: 6px;
    height: 1.5rem;
    background: var(--vtt-accent);
    border-radius: 3px;
}

#vtt-inscription-form h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--vtt-text);
    margin: 0 0 1rem;
}

#vtt-inscription-form h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vtt-text-light);
    margin: 1rem 0 0.75rem;
}

/* ========================================
   CHECKBOX "MÊME RESPONSABLE"
   ======================================== */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem!important;
    padding: 1.25rem 1.5rem!important;
    background: var(--vtt-light);
    border-radius: 10px;
    border: 1px solid var(--vtt-border);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem!important;
    accent-color: var(--vtt-primary);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-weight: 500;
    color: var(--vtt-text);
    cursor: pointer;
}

/* ========================================
   GRILLES DE CHAMPS
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* ========================================
   LABELS ET INPUTS
   ======================================== */
#vtt-inscription-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vtt-text-light);
}

#vtt-inscription-form input[type="text"],
#vtt-inscription-form input[type="email"],
#vtt-inscription-form input[type="tel"],
#vtt-inscription-form input[type="date"],
#vtt-inscription-form input[type="number"],
#vtt-inscription-form select,
#vtt-inscription-form textarea {
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--vtt-border);
    border-radius: 8px;
    background: #fff;
    color: var(--vtt-text);
    transition: all 0.25s ease;
}

#vtt-inscription-form input:focus,
#vtt-inscription-form select:focus,
#vtt-inscription-form textarea:focus {
    outline: none;
    border-color: var(--vtt-secondary);
    box-shadow: 0 0 0 4px rgba(111, 183, 195, 0.2);
}

#vtt-inscription-form input[readonly] {
    background: #f5f7f8;
    color: var(--vtt-text-light);
}

#vtt-inscription-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b8499' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
    background-color: #fff;
    border-color: var(--vtt-secondary);
    color: #1a1a1a;
}

#vtt-inscription-form select option {
    background: #fff;
    color: #1a1a1a;
}

#vtt-inscription-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========================================
   CONTENEUR ADHÉRENTS
   ======================================== */
#adherents-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   BLOC ADHÉRENT
   ======================================== */
.adherent-block {
    position: relative;
    padding: 2rem 2.75rem 2rem 1.75rem!important;
    background: linear-gradient(135deg, #fff, var(--vtt-light));
    border: 2px solid var(--vtt-border);
    border-radius: 12px;
    border-left: 5px solid var(--vtt-secondary);
    transition: all 0.3s ease;
}

.adherent-block:hover {
    border-left-color: var(--vtt-primary);
    box-shadow: 0 4px 16px rgba(75, 132, 153, 0.1);
}

.adherent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--vtt-border);
    gap: 1rem;
}

.adherent-block h3 {
    margin: 0;
    color: var(--vtt-primary);
    font-size: 1.25rem;
}

/* Prix adhérent */
.adherent-price {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem!important;
    background: linear-gradient(135deg, var(--vtt-accent), var(--vtt-accent-dark));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(212, 162, 44, 0.35);
    margin-right: 1rem;
    line-height: 1.1;
}

.adherent-price::before {
    content: '💰';
}

.adherent-price.empty {
    background: #ddd;
    color: #888;
    box-shadow: none;
}

.adherent-price.empty::before {
    content: '—';
}

/* Bouton supprimer */
.remove-adherent {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #fff;
    border: 2px solid var(--vtt-error);
    border-radius: 50%;
    color: var(--vtt-error);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-adherent:hover {
    background: var(--vtt-error);
    color: #fff;
    transform: rotate(90deg);
}

/* Responsable individuel */
.responsable-individuel {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px dashed var(--vtt-border);
}

.responsable-individuel[hidden] {
    display: none;
}

/* ========================================
   BOUTONS
   ======================================== */
#add-adherent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--vtt-primary);
    background: #fff;
    border: 2px dashed var(--vtt-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

#add-adherent:hover {
    background: var(--vtt-secondary);
    color: #fff;
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 183, 195, 0.3);
}

/* Boutons navigation */
.form-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--vtt-border);
    gap: 1rem;
}

.form-navigation .btn-prev {
    margin-right: auto;
}

.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    min-width: 200px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    margin: 20px 0px 0px 0px !important;
}

.btn-prev {
    background: #fff;
    color: var(--vtt-text-light);
    border: 2px solid var(--vtt-border);
}

.btn-prev:hover {
    border-color: var(--vtt-primary);
    color: var(--vtt-primary);
}

.btn-next {
    background: linear-gradient(135deg, var(--vtt-primary), var(--vtt-primary-dark));
    color: #fff;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 132, 153, 0.35);
}

.btn-submit {
    background: linear-gradient(135deg, var(--vtt-accent), var(--vtt-accent-dark));
    color: #fff;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 162, 44, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ========================================
   RÉCAPITULATIF
   ======================================== */
.recap-section {
    background: #fff;
    border-radius: 14px;
    padding: 2rem!important;
    margin-bottom: 2rem!important;
    border: 1px solid var(--vtt-border);
    border-left: 6px solid var(--vtt-secondary);
    box-shadow: 0 6px 18px rgba(75, 132, 153, 0.08);
}

.recap-section h3 {
    color: var(--vtt-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recap-responsable {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
    padding-top: 0.5rem;
}

.recap-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 1rem!important;
    background: #fff;
    border: 1px solid var(--vtt-border);
    border-radius: 10px;
}

.recap-label {
    font-size: 0.8rem;
    color: var(--vtt-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recap-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vtt-text);
}

/* Récap adhérents */
.recap-adherents {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recap-adherent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem!important;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--vtt-border);
    border-left: 6px solid var(--vtt-secondary);
    box-shadow: 0 4px 12px rgba(75, 132, 153, 0.08);
}

.recap-adherent-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.recap-adherent-name {
    font-weight: 600;
    color: var(--vtt-text);
}

.recap-adherent-details {
    font-size: 0.875rem;
    color: var(--vtt-text-light);
}

.recap-adherent-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--vtt-accent), var(--vtt-accent-dark));
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    min-width: 88px;
    text-align: center;
}

/* Total */
.recap-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem!important;
    background: linear-gradient(135deg, var(--vtt-primary), var(--vtt-primary-dark));
    border-radius: 14px;
    color: #fff;
    margin-top: 1.5rem;
    box-shadow: 0 8px 22px rgba(75, 132, 153, 0.2);
}

.recap-total-label {
    font-size: 1.25rem;
    font-weight: 600;
}

.recap-total-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--vtt-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Réductions */
.recap-reductions {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem!important;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    color: var(--vtt-success);
    font-size: 0.9rem;
    text-align: center;
}

/* ========================================
   MESSAGES
   ======================================== */
#vtt-form-messages {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
}

#vtt-form-messages:empty {
    display: none;
}

#vtt-form-messages .vtt-message-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--vtt-success);
    border: 1px solid var(--vtt-success);
    border-radius: 8px;
    padding: 1rem;
}

#vtt-form-messages .vtt-message-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--vtt-error);
    border: 1px solid var(--vtt-error);
    border-radius: 8px;
    padding: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .form-steps-indicator {
        padding: 1rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .form-step {
        padding: 1.25rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .recap-responsable {
        grid-template-columns: 1fr;
    }
    
    .recap-adherent {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
}
