/*
 * JouteTrack — theme-forms.css
 * Groupes de champs, contrôles, règles .school-section sur inputs / fichier.
 */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group textarea,
.form-group select,
.form-control,
.jt-static-card input:not([type="checkbox"]):not([type="radio"]),
.jt-static-card textarea,
.jt-static-card select,
.school-section input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="range"]),
.school-section textarea,
.school-section select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--jt-field-border-color);
    background-color: var(--jt-field-bg);
    color: var(--jt-field-color);
    font-size: 1rem;
}

.form-group textarea,
.school-section textarea {
    resize: vertical;
    min-height: 2.75rem;
    font-family: inherit;
    line-height: 1.5;
}

.form-group select,
.school-section select,
select.form-control {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color-scheme: dark;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%23b0b3b8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 2.25 7 7.25 12 2.25'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.75rem 0.5rem;
}

.form-group select:disabled,
.school-section select:disabled,
select.form-control:disabled {
    opacity: 0.55;
}

select option {
    background-color: var(--jt-field-bg);
    color: var(--jt-field-color);
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus,
.school-section input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):focus,
.school-section textarea:focus,
.school-section select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.school-section input[type="file"] {
    width: 100%;
    padding: 0.65rem 0.5rem;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    background: rgba(15, 20, 25, 0.6);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.school-section input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

/* Champs date/heure natifs (thème sombre) — même approche que ChampionTrack CT-95 */
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"],
.form-group input[type="month"],
.form-group input[type="week"],
.jt-static-card input[type="date"],
.jt-static-card input[type="datetime-local"],
.jt-static-card input[type="time"],
.jt-static-card input[type="month"],
.jt-static-card input[type="week"],
.school-section input[type="date"],
.school-section input[type="datetime-local"],
.school-section input[type="time"],
.school-section input[type="month"],
.school-section input[type="week"] {
    color-scheme: dark;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator,
.form-group input[type="month"]::-webkit-calendar-picker-indicator,
.form-group input[type="week"]::-webkit-calendar-picker-indicator,
.jt-static-card input[type="date"]::-webkit-calendar-picker-indicator,
.jt-static-card input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.jt-static-card input[type="time"]::-webkit-calendar-picker-indicator,
.jt-static-card input[type="month"]::-webkit-calendar-picker-indicator,
.jt-static-card input[type="week"]::-webkit-calendar-picker-indicator,
.school-section input[type="date"]::-webkit-calendar-picker-indicator,
.school-section input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.school-section input[type="time"]::-webkit-calendar-picker-indicator,
.school-section input[type="month"]::-webkit-calendar-picker-indicator,
.school-section input[type="week"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
    filter: brightness(0) invert(1);
}
