/* Styles spécifiques pour le formulaire d'inscription */

/* CORRECTION POUR LE BODY ET LE FOOTER */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
}

#blocpage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.section-inscription {
    padding: 20px 0 50px 0; /* Espace en bas pour respirer */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    flex: 1; /* Prend tout l'espace disponible */
}

/* Le footer se place automatiquement en bas */
footer {
    margin-top: auto;
    position: relative !important;
    bottom: auto !important;
}

.container-inscription {
    max-width: 800px;
    margin: 0 auto 30px auto; /* Marge en bas pour espacer */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header-inscription {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.logo-inscription img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid white;
}

.header-inscription h1 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.sous-titre {
    opacity: 0.9;
    font-size: 1.1rem;
    margin: 0;
}

/* Formulaire */
#form-inscription {
    padding: 30px;
}

.fieldset-section {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 20px;
    background: #fafbfc;
}

.fieldset-section legend {
    background: white;
    padding: 8px 15px;
    border: 2px solid #667eea;
    border-radius: 20px;
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-col {
    flex: 1;
    min-width: 200px;
}

.input-col-small {
    flex: 0 0 30%;
    min-width: 120px;
}

.input-col-large {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input:required:invalid {
    border-color: #e74c3c;
}

input:required:valid {
    border-color: #27ae60;
}

/* Checkboxes personnalisées */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 8px 0;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Sections de consentement */
.consent-section {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.consent-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.consent-checkbox {
    align-items: flex-start;
}

.consent-text {
    line-height: 1.5;
}

.required-consent .consent-text {
    color: #2c3e50;
}

.consent-text a {
    color: #667eea;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

.consent-text small {
    color: #7f8c8d;
    font-style: italic;
}

/* Boutons d'action */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e8ed;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.form-footer {
    margin-top: 20px;
    margin-bottom: 40px; /* Espace supplémentaire avant le footer de page */
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    text-align: center;
    color: #7f8c8d;
}

.form-footer p {
    margin: 5px 0;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
}

/* Styles pour la sélection de club */
.club-selection {
    background: linear-gradient(135deg, #667eea 5%, #764ba2 95%);
    color: white;
    border-color: #667eea;
}

.club-selection legend {
    background: white;
    color: #667eea;
    border-color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
}

.club-selection label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.club-selection select {
    padding: 15px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #2c3e50;
    font-weight: 500;
}

.club-selection select:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

/* Informations du club sélectionné */
.club-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.club-details h5 {
    margin: 0 0 10px 0;
    color: #f39c12;
    font-size: 1rem;
}

.club-details p {
    margin: 5px 0;
    color: white;
    line-height: 1.4;
}

/* Animation pour l'apparition des infos club */
.club-info.show {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

/* Animation de chargement pour le select des clubs */
#club_id:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Animation de rotation pour indiquer le chargement */
.loading-clubs::after {
    content: "🔄";
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .container-inscription {
        margin: 10px 10px 30px 10px;
        border-radius: 8px;
    }
    
    .header-inscription {
        padding: 20px;
    }
    
    .header-inscription h1 {
        font-size: 1.8rem;
    }
    
    #form-inscription {
        padding: 20px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-col,
    .input-col-small,
    .input-col-large {
        min-width: auto;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Animation de chargement */
.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.loading {
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.date-birth-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-birth-inputs input {
    width: 60px;
    text-align: center;
    padding: 8px 4px;
}

.date-birth-inputs input:last-child {
    width: 80px; /* Plus large pour l'année */
}

.date-separator {
    font-weight: bold;
    color: #666;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .date-birth-inputs {
        justify-content: center;
    }
    
    .date-birth-inputs input {
        width: 50px;
    }
    
    .date-birth-inputs input:last-child {
        width: 70px;
    }
}