/* =============================================================
   THEOLOGIA REFORMATA — FORMULAIRE D'INSCRIPTION
   ============================================================= */

.bloc-intro,
.bloc-formulaire,
.bloc-profil-existant,
.bloc-confirmation {
    background: linear-gradient(135deg, #ffffff 0%, #faf6ec 100%);
    border: 1px solid #e8dcc8;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 14px rgba(180, 100, 60, 0.08);
}

.bloc-intro h2,
.bloc-formulaire h2,
.bloc-profil-existant h2,
.bloc-confirmation h2 {
    color: #9b1c1c;
    margin-top: 0;
    border-bottom: 2px solid #e8a532;
    padding-bottom: 0.6rem;
}

.bloc-avantages {
    list-style: none;
    padding: 0;
}
.bloc-avantages li {
    padding: 0.7rem 0 0.7rem 2rem;
    position: relative;
    border-bottom: 1px dashed rgba(155, 28, 28, 0.15);
}
.bloc-avantages li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0.7rem;
    color: #e8a532;
    font-size: 1.1em;
    transition: transform 0.3s;
}
.bloc-avantages li:hover::before {
    transform: scale(1.4) rotate(72deg);
    color: #d4471f;
}
.bloc-avantages li:last-child {
    border-bottom: none;
}

/* =============================================
   FORMULAIRE
   ============================================= */
.form-introduction {
    color: #6b5544;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.form-group {
    border: 1px solid #d4c8a8;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.4);
}
.form-group legend {
    padding: 0.3rem 1rem;
    background: linear-gradient(135deg, #9b1c1c 0%, #c44b1a 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.form-rang {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}
.form-rang:last-child {
    margin-bottom: 0;
}

.form-champ {
    display: flex;
    flex-direction: column;
}
.form-champ label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #3a2820;
    font-size: 0.95rem;
}

.required {
    color: #d4471f;
    font-weight: 700;
}

.form-champ input,
.form-champ select,
.form-champ textarea {
    border: 2px solid #d4c8a8;
    border-radius: 6px;
    padding: 0.55rem 0.8rem;
    font-size: 0.98rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    color: #3a2820;
}

.form-champ input:focus,
.form-champ select:focus,
.form-champ textarea:focus {
    outline: none;
    border-color: #9b1c1c;
    box-shadow: 0 0 0 3px rgba(155, 28, 28, 0.15);
    transform: translateY(-1px);
}

.form-champ input:invalid:not(:placeholder-shown),
.form-champ select:invalid:not(:focus) {
    border-color: #c44b1a;
}

.form-aide {
    font-size: 0.82rem;
    color: #6b5544;
    margin: 0.35rem 0 0;
    font-style: italic;
}

/* Cases à cocher */
.grille-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.6rem;
}

.case-coche {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    background: rgba(255, 248, 232, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal;
    font-size: 0.92rem;
    border: 1px solid transparent;
}
.case-coche:hover {
    background: rgba(232, 165, 50, 0.15);
    border-color: rgba(232, 165, 50, 0.4);
    transform: translateX(2px);
}
.case-coche input[type="checkbox"] {
    width: auto;
    margin: 0.15rem 0 0 0;
    accent-color: #9b1c1c;
    transform: scale(1.1);
    cursor: pointer;
}
.case-coche input[type="checkbox"]:checked + ::after,
.case-coche:has(input:checked) {
    background: rgba(212, 71, 31, 0.1);
    border-color: #d4471f;
    font-weight: 500;
}

.case-rgpd {
    background: rgba(232, 165, 50, 0.08);
    padding: 0.8rem 1rem;
    border-left: 3px solid #d4471f;
    border-radius: 6px;
    margin-bottom: 0.7rem;
}

.form-consentement {
    background: rgba(232, 220, 200, 0.4);
}

/* =============================================
   BOUTONS
   ============================================= */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
    justify-content: flex-start;
}

.btn-principal,
.btn-secondaire,
.btn-tertiaire {
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.btn-principal {
    background: linear-gradient(135deg, #9b1c1c 0%, #c44b1a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(155, 28, 28, 0.25);
}
.btn-principal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(155, 28, 28, 0.4);
    filter: brightness(1.08);
}

.btn-secondaire {
    background: linear-gradient(135deg, #c8c1a8 0%, #d4c8a8 100%);
    color: #3a2820;
    box-shadow: 0 3px 8px rgba(58, 40, 32, 0.15);
}
.btn-secondaire:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(58, 40, 32, 0.25);
    background: linear-gradient(135deg, #e8a532 0%, #d4471f 100%);
    color: #fff;
}

.btn-tertiaire {
    background: transparent;
    color: #6b5544;
    border: 2px solid #d4c8a8;
}
.btn-tertiaire:hover {
    border-color: #9b1c1c;
    color: #9b1c1c;
    background: rgba(155, 28, 28, 0.05);
}

.btn-icone {
    color: #e8a532;
    font-size: 1.2em;
    animation: scintille-doux 2s ease-in-out infinite;
}

.form-mentions {
    font-size: 0.85rem;
    color: #6b5544;
    margin-top: 1.5rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: rgba(232, 220, 200, 0.4);
    border-radius: 6px;
}
.form-mentions code {
    background: #fff8e8;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* =============================================
   APERÇU DE PROFIL EXISTANT
   ============================================= */
.apercu-profil {
    background: #fff;
    border-left: 4px solid #e8a532;
    padding: 1.2rem 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
}
.apercu-profil h3 {
    margin: 0 0 0.4rem 0;
    color: #9b1c1c;
}
.apercu-profil dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0.8rem 0 0 0;
}
.apercu-profil dt {
    font-weight: 600;
    color: #6b5544;
}
.apercu-profil dd {
    margin: 0;
    color: #3a2820;
}

/* =============================================
   CONFIRMATION
   ============================================= */
.bloc-confirmation {
    background: linear-gradient(135deg, #fff8e8 0%, #f9e5c8 100%);
    border: 2px solid #e8a532;
    text-align: center;
    animation: apparait-doux 0.8s ease-out;
}
.bloc-confirmation h2 {
    color: #9b1c1c;
    font-size: 1.8rem;
    border-bottom: none;
    letter-spacing: 0.1em;
}
.confirmation-message {
    font-size: 1.1rem;
    margin: 1rem 0;
    color: #3a2820;
}
.bloc-confirmation .form-actions {
    justify-content: center;
}

/* =============================================
   MESSAGES ET TOAST
   ============================================= */
.message-erreur,
.message-succes {
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    animation: apparait-doux 0.4s;
}
.message-erreur {
    background: #fde8e8;
    color: #9b1c1c;
    border-left: 4px solid #d4471f;
}
.message-succes {
    background: #e8f5e8;
    color: #2d8a4a;
    border-left: 4px solid #2d8a4a;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 700px) {
    .form-group {
        padding: 1rem;
    }
    .form-rang {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn-principal,
    .form-actions .btn-secondaire,
    .form-actions .btn-tertiaire {
        width: 100%;
        justify-content: center;
    }
    .grille-cases {
        grid-template-columns: 1fr;
    }
}
