/* ================================================================
   Journées Techniques ENERGICAL — Formulaire d'inscription
   Cible : #jt-form  (templates/form-inscription.php)
================================================================ */

.jt-form-wrap *,
.jt-form-wrap *::before,
.jt-form-wrap *::after { box-sizing: border-box; }

.jt-form-wrap { width: 100%; }

/* ── Notices ─────────────────────────────────────────────────── */
.jt-notice {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}
.jt-notice--success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.jt-notice--error   { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }

/* ── Grille 3 colonnes : label-fr | champ | label-ar ─────────── */
.jt-field {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 0 16px;
    margin-bottom: 12px;
}
.jt-field--consent { align-items: flex-start; }
.jt-field--consent .jt-label { padding-top: 4px; }
.jt-field--captcha {
    grid-template-columns: 1fr;
    justify-items: center;
    margin-top: 6px;
}
.jt-field--submit  {
    grid-template-columns: 1fr;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ── Labels ──────────────────────────────────────────────────── */
.jt-label { font-size: 14px; color: #222; line-height: 1.4; }
.jt-label--fr { text-align: left; font-weight: 600; color: #18274D; font-family: 'Nunito Sans', sans-serif; }
.jt-label--ar { text-align: right; direction: rtl; font-family: 'Cairo', sans-serif; font-weight: 500; color: #18274D; }
.jt-req { color: #FF4D10; }

/* ── Inputs & selects ────────────────────────────────────────── */
#jt-form input[type="text"],
#jt-form input[type="tel"],
#jt-form select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}
#jt-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FF4D10' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 14px) center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── Consentement ────────────────────────────────────────────── */
.jt-consent-wrap { display: flex; flex-direction: column; gap: 10px; }

.jt-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    line-height: 1.5;
}
.jt-consent-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #FF4D10;
    cursor: pointer;
}
.jt-policy-link {
    color: #FF4D10;
    text-decoration: underline;
    font-weight: 600;
}
.jt-policy-link:hover { color: #e03d00; }

/* ── Loader ──────────────────────────────────────────────────── */
.jt-loading { display: none; align-items: center; gap: 8px; }
.jt-loading.is-visible { display: flex; }
.jt-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 3px solid #ddd;
    border-top-color: #FF4D10;
    border-radius: 50%;
    animation: jt-spin 0.7s linear infinite;
}
@keyframes jt-spin { to { transform: rotate(360deg); } }

/* ── Message de validation ───────────────────────────────────── */
.jt-validation-msg { color: #e74c3c; font-size: 15px; font-weight: 600; text-align: center; }

/* ── Bouton envoyer ──────────────────────────────────────────── */
.jt-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 12px 36px;
    background: #FF4D10;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.jt-submit-btn:hover { background: #e03d00; }
.jt-submit-btn__ar { font-family: 'Cairo', sans-serif; font-size: 15px; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 680px) {
    .jt-field {
        grid-template-columns: 1fr;
        gap: 4px;
        margin-bottom: 14px;
    }
    .jt-label--ar { text-align: left; direction: ltr; }
    .jt-field--submit { align-items: stretch; }
    .jt-submit-btn { justify-content: center; }
}
