/* ============================================ */
/* SYSTÈME DE THÈMES AVEC VARIABLES CSS */
/* ============================================ */
:root {
    /* Variables globales */
    --form-spacing: 0.75rem;
    --form-border-radius: 4px;
    --form-border-color: #f59e0b;
    --form-transition: all 0.2s ease;
    --form-font-family: inherit;
    --form-line-height: 1.5;
    --form-field-padding: 0.625rem 0.75rem;
    --form-field-border-width: 1px;
    --form-field-border-style: solid;
    --form-focus-outline: none;
    --form-focus-ring-width: 3px;
    --form-disabled-opacity: 0.6;
    --form-label-font-weight: 500;
    --form-label-margin-bottom: 0.375rem;
    --form-message-font-size: 0.875rem;
    --form-message-margin-top: 0.25rem;
}
/* Styles de base pour tous les champs */
.form-group {
    margin-bottom: 1.25rem;
}
/* Bloc RGPD : respiration avec la page qui précède et le bouton submit
   (spécificité supérieure au reset des fieldsets de thème ci-dessous). */
form[id^='smartform'] fieldset.rgpd {
    margin: 1.5rem 0;
}
.form-label {
    display: block;
    font-weight: var(--form-label-font-weight);
    margin-bottom: var(--form-label-margin-bottom);
    font-family: var(--form-font-family);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
    width: 100%;
    padding: var(--form-field-padding);
    font-family: var(--form-font-family);
    font-size: var(--form-font-size);
    line-height: var(--form-line-height);
    color: var(--form-color);
    background-color: var(--form-bg-color);
    border: var(--form-border-color);
    border-radius: var(--form-border-radius);
    transition: var(--form-transition);
    box-sizing: border-box;
}
/* Focus : spécificité renforcée (id du formulaire) pour que la couleur et
   l'anneau du thème gagnent sur les règles de bordure des styles. */
form[id^='smartform'] input:focus,
form[id^='smartform'] select:focus,
form[id^='smartform'] textarea:focus {
    outline: var(--form-focus-outline);
    border-color: var(--form-focus-border-color);
    box-shadow: 0 0 0 var(--form-focus-ring-width) var(--form-focus-ring-color);
}
input::placeholder,
textarea::placeholder {
    color: var(--form-placeholder-color);
    opacity: 1;
}
.form-help {
    font-size: var(--form-message-font-size);
    color: var(--form-help-color);
    margin-top: var(--form-message-margin-top);
}
/* Checkboxes et radios */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}
/* ============================================ */
/* SLIDER NOUISLIDER (champ « slider ») : piste, connect,
   handle, pip (bulle de valeur) et échelle. Tout l'habillage
   suit les variables du thème (rayons, bordures) et la couleur
   primaire du formulaire (color_base). */
/* ============================================ */
.smartform .slider-wrap {
    /* La barre gauche 3px vient de la règle commune 8 (.slider-wrap dans son
       sélecteur) ; 1rem latéral contient le handle et la bulle aux extrémités.
       Rayon du thème : la barre gauche s'arrondit comme les champs (rounded
       = pilule sur toute la hauteur du bloc). Fond et couleur comme un champ,
       transition du thème (coupée par l'axe animations). Le padding du thème
       est volontairement NON repris : il écraserait les espacements bulle
       (haut) et échelle (bas) — d'où les valeurs fixes ci-dessous. */
    padding: 1.5rem 1rem 1.75rem;
    border-left: 3px solid var(--form-border-color);
    border-radius: var(--form-border-radius);
    background-color: var(--form-bg-color);
    color: var(--form-color);
    transition: var(--form-transition);
    box-sizing: border-box;
}
.smartform .noui-target {
    height: 8px;
    border: none;
    border-radius: var(--form-border-radius);
    /* Fond transparent : la piste est peinte par noUi-base (le wrapper
       .slider-wrap fournit l'espace latéral du handle et de la bulle) */
    cursor: pointer;
}
.smartform .noUi-base {
    height: 100%;
    background-color: var(--form-bg-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    border-radius: inherit;
}
.smartform .noUi-connect {
    background: var(--form-primary);
}
.smartform .noUi-handle {
    width: 16px;
    height: 16px;
    top: -4px;
    right: -8px;
    border: 2px solid var(--form-primary);
    border-radius: var(--form-border-radius);
    background-color: var(--form-bg-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
    transition: box-shadow var(--form-transition), transform var(--form-transition);
}
.smartform .noUi-handle::before,
.smartform .noUi-handle::after {
    display: none;
}
.smartform .noUi-handle:hover {
    transform: scale(1.08);
}
.smartform .noUi-handle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 var(--form-focus-ring-width) var(--form-focus-ring-color);
}
.smartform .slider-dragging .noUi-handle,
.smartform .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.12);
}
.smartform .noUi-tooltip {
    display: block;
    border: none;
    border-radius: var(--form-border-radius);
    padding: 0.125rem 0.5rem;
    background: var(--form-primary);
    color: var(--form-primary-contrast, #fff);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}
.smartform .noUi-pips {
    color: var(--form-help-color);
    font-size: 0.75rem;
}
.smartform .noUi-marker {
    background: var(--form-border-color);
    opacity: 0.55;
}
.smartform .noUi-marker-large {
    height: 9px;
    opacity: 0.8;
}
.smartform .noUi-value {
    margin-top: 0.25rem;
}
/* Animation au survol : barre gauche (et trait bas modern) à la couleur de
   focus du thème, comme la bordure des champs. Pas de hover-color pendant
   le focus clavier du handle (focus-within), comme :not(:focus) sur les champs. */
.smartform .slider-wrap:hover:not(:focus-within) {
    border-left-color: var(--form-focus-border-color);
    transition: border-color 0.3s ease;
}
.form-theme-modern .slider-wrap:hover:not(:focus-within) {
    border-bottom-color: var(--form-focus-border-color);
}
/* ---- variations par style ---- */
/* MINIMAL : piste fine sans relief, bordure pleine 1px comme les champs,
   handle discret, pip épuré — pas de barre sur le wrapper (la piste l'a) */
.form-theme-minimal .slider-wrap {
    border-left: none;
}
.form-theme-minimal .noui-target {
    border: var(--form-field-border-width) solid var(--form-border-color);
    box-shadow: none;
    height: 6px;
}
.form-theme-minimal .noUi-handle {
    width: 16px;
    height: 16px;
    top: -5px;
    right: -8px;
    box-shadow: none;
    border-width: 1px;
}
/* MODERN : ombres douces, handle rond, anneau au drag — et la signature
   du style : trait bas 1px délimitant la zone du champ, comme les inputs */
.form-theme-modern .noui-target {
    height: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
.form-theme-modern .slider-wrap {
    border-bottom: 1px solid var(--form-border-color);
    padding-bottom: 2.25rem;
}
.form-theme-modern .noUi-handle {
    border-radius: 50%;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
}
/* DARK : piste et handle dans les tons sombres du thème (pas de bordure,
   comme les champs du style) */
.form-theme-dark .noui-target {
    background-color: #334155;
    box-shadow: none;
}
.form-theme-dark .noUi-handle {
    background-color: #334155;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.form-theme-dark .noUi-value {
    color: #94a3b8;
}
.form-theme-dark .noUi-marker {
    background: #475569;
}
/* ROUNDED : piste pilule sans bordure (comme les champs), handle rond */
.form-theme-rounded .noui-target {
    height: 10px;
    border-radius: 9999px;
}
.form-theme-rounded .noUi-handle {
    border-radius: 50%;
    width: 16px;
    height: 16px;
    top: -3px;
    right: -8px;
}
.form-theme-rounded .noUi-tooltip {
    border-radius: 9999px;
}
/* CLASSIC : bordures marquées, handle carré */
.form-theme-classic .noui-target {
    height: 9px;
}
.form-theme-classic .noUi-handle {
    width: 16px;
    height: 16px;
    top: -4px;
    right: -8px;
    border-width: 2px;
    border-radius: 3px;
}
/* SMARTOWEB (défaut) : léger, proche du thème courant */
.form-theme-smartoweb .noui-target {
    height: 9px;
}
.form-theme-smartoweb .noUi-handle {
    border-radius: 50%;
}
/* STYLE CLASSIQUE */
.form-theme-classic {
    --form-font-size: 1rem;
}
/* STYLE MODERNE */
.form-theme-modern {
    --form-font-size: 0.9375rem;
    --form-border-radius: 8px;
    --form-field-padding: 0.875rem 1rem;
    --form-focus-ring-width: 4px;
}
.form-theme-modern input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.form-theme-modern select,
.form-theme-modern textarea {
    /* Signature du style Modern : trait bas 1px, même couleur que la
       barre gauche (delimite la zone du champ). Pas d'autres bordures. */
    border-bottom: 1px solid var(--form-border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
/* STYLE SOMBRE - neutres sombres en repli (mode "custom") et icones
   date/time claires ; avec un theme de couleur, les neutres sombres sont
   regeneres par le composant (colorVariants dark). */
.form-theme-dark {
    --form-font-size: 0.9375rem;
    --form-border-radius: 6px;
    --form-color: #e2e8f0;
    --form-bg-color: #1e293b;
    --form-placeholder-color: #94a3b8;
    --form-help-color: #94a3b8;
}
.form-theme-dark input[type="date"],
.form-theme-dark input[type="time"],
.form-theme-dark input[type="datetime-local"] {
    color-scheme: dark;
}
.form-theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="time"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    opacity: 0.8;
}
.form-theme-dark input[type="date"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="time"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]::-moz-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    opacity: 0.8;
}
/* STYLE MINIMALISTE — inspiration Pico CSS : champs pleins discrets,
   rayon réduit, bordure 1px teintée par le thème, focus sans halo lourd. */
.form-theme-minimal {
    --form-font-size: 0.9375rem;
    --form-border-radius: 0.25rem;
    --form-field-border-width: 1px;
    --form-field-padding: 0.75rem 1rem;
    --form-focus-ring-width: 0.125rem;
    --form-focus-ring-color: var(--form-primary-ring, rgba(46, 109, 246, .15));
    --form-label-margin-bottom: 0.5rem;
}
/* Tous les champs texte-like du style : bordure pleine 1px (couleur thème).
   La règle de base reste volontairement sans style de bordure pour les
   autres styles : c'est ICI que le Minimal pose la sienne. */
.form-theme-minimal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.form-theme-minimal select,
.form-theme-minimal textarea {
    border: var(--form-field-border-width) solid var(--form-border-color);
}
.form-theme-minimal input:focus,
.form-theme-minimal select:focus,
.form-theme-minimal textarea:focus {
    border-color: var(--form-focus-border-color);
}
/* STYLE BORDERE */
.form-theme-bordered {
    --form-font-size: 0.9375rem;
    --form-border-radius: 0.375rem;
    --form-field-border-width: 2px;
}
/* STYLE ARRONDI */
.form-theme-rounded {
    --form-font-size: 0.9375rem;
    --form-border-radius: 9999px;
    --form-field-padding: 0.875rem 1.25rem;
}
/* ============================================ */
/* AXE ANIMATIONS (full par defaut, sans classe) */
/* ============================================ */
/* Aucune : transitions et keyframes coupees (aussi l'option accessibilite) */
form[id^='smartform'].form-anim-none * {
    transition: none !important;
    animation: none !important;
}
/* Discretes : transitions conservees, keyframes (shake, pulse...) coupees */
form[id^='smartform'].form-anim-soft * {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
}
/* ============================================ */
/* AXE DENSITE (normal par defaut, sans classe)  */
/* Couvre les 4 elements : champ (padding), label
   (marge), description et message d'erreur.     */
/* ============================================ */
form[id^='smartform'].form-density-compact {
    --form-field-padding: 0.5rem 0.75rem;
    --form-label-margin-bottom: 0.25rem;
    --form-message-font-size: 0.78rem;
    --form-message-margin-top: 0.2rem;
}
form[id^='smartform'].form-density-compact .form-group {
    margin-bottom: 0.7rem;
}
form[id^='smartform'].form-density-spacious {
    --form-field-padding: 1.05rem 1.15rem;
    --form-label-margin-bottom: 0.55rem;
    --form-message-font-size: 0.92rem;
    --form-message-margin-top: 0.45rem;
}
form[id^='smartform'].form-density-spacious .form-group {
    margin-bottom: 1.7rem;
}
/* ANIMATIONS DISCÈTES POUR TOUS LES CONTROLES */
/* ============================================ */
/* 1. ANIMATIONS DE BASE ET TRANSITIONS */
.form-group {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Animation au focus */
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}
/* Animation au survol */
/* Les 2e/3e sélecteurs ajoutent l'état :valid + contenu : sans eux, la règle
   « champ valide rempli » (plus bas, même spécificité, placée après) repeint
   border-color en couleur de base et le hover n'apparaîtrait jamais sur les
   champs sans placeholder (prénom…) — obligatoire ou non. */
input:not([type="checkbox"]):not([type="radio"]):hover:not(:focus):not(:disabled),
input:valid:not(:placeholder-shown):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):hover:not(:focus):not(:disabled),
textarea:valid:not(:placeholder-shown):hover:not(:focus):not(:disabled),
select:hover:not(:focus):not(:disabled),
textarea:hover:not(:focus):not(:disabled) {
    border-color: var(--form-focus-border-color);
    transition: border-color 0.3s ease;
}
/* 2. ANIMATIONS POUR LES LABELS */
.form-label {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}
.form-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--form-focus-border-color);
    transition: width 0.3s ease;
}
.form-group:focus-within .form-label {
    color: var(--form-focus-border-color);
    transform: translateX(2px);
}
.form-group:focus-within .form-label::after {
    width: 100%;
}
/* 3. ANIMATIONS POUR LES ÉTATS DE VALIDATION */
/* Icône de validation : --form-valid-icon est injectée par le composant,
   teintée avec la couleur de base du formulaire (data-URI, pas de var CSS
   possible dedans) ; repli = vert générique pour les formulaires sans
   couleur de base. Le bouton submit est exclu (pas d'icône ni de padding
   droit sur le bouton, quel que soit le thème). */
input:valid.has-value:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
textarea:valid.has-value {
    border-color:  var(--form-border-color);
    background-image: var(--form-valid-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981' width='16' height='16'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"));
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}
input.error:not([type="checkbox"]):not([type="radio"]),
select.error,
textarea.error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--form-error-border-color);
}
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-2px); }
    40%, 60% { transform: translateX(2px); }
}
/* 5. ANIMATIONS POUR LES MENUS DÉROULANTS */
select {
    background-image: var(--form-select-bg-image);
    background-position: right 12px center;
    background-size: 12px;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}
select:hover {
    background-image: var(--form-select-bg-image);
}
/* 6. ANIMATIONS POUR LES CHAMPS DATE/TIME */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    transition: all 0.3s ease;
}
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
    background-position: right 12px center !important;
}
/* 7. ANIMATIONS POUR LES MESSAGES */
.form-help,
.form-error {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-group:focus-within .form-help,
input:not(:placeholder-shown) ~ .form-help,
textarea:not(:placeholder-shown) ~ .form-help,
/* FilePond remplace l'input par un div.filepond--root : les sélecteurs
   input/textarea ne matchent plus — déplier l'aide du champ file (les
   contraintes de taille doivent être visibles avant l'upload) */
.filepond--root ~ .form-help {
    max-height: 100px;
    opacity: 1;
    margin-top: var(--form-message-margin-top);
}
/* FilePond : la liste « formats attendus » du plugin validate-type peut être
   très longue (MIME complets, nowrap) — sans contrainte, la colonne de statut
   dépasse le chip et le message principal (texte blanc) sort du fond rouge et
   devient invisible, le nom de fichier étant écrasé à 0. Caper la colonne à
   l'item et tronquer les lignes par ellipsis. */
.filepond--file-status {
    /* 50% : le sous-libellé « formats attendus » (longue liste nowrap) ne doit
       pas affamer le bloc info — le nom de fichier reste visible à gauche */
    max-width: 50%;
    min-width: 0;
    overflow: hidden;
}
.filepond--file-status .filepond--file-status-main,
.filepond--file-status .filepond--file-status-sub {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.form-error {
    max-height: 100px;
    opacity: 1;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 8. ANIMATION POUR LES CHAMPS OBLIGATOIRES */
/* Le bouton submit est exclu : ni barre gauche ni coloration de bordure.
   Le slider a la même barre gauche que les champs (via son wrapper). */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea,
.slider-wrap {
    border-left: 3px solid var(--form-border-color);
    padding-left: calc(0.75rem - 3px);
}
input:valid:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select:valid,
textarea:valid {
    border-left-color: var(--form-border-color);
}
/* 9. ANIMATION POUR LES PLACEHOLDERS */
input::placeholder,
textarea::placeholder {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.7;
}
input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.4;
    transform: translateX(4px);
}
label.required::before{
    color: var(--form-required, red);
    content: '* ';
}
/* 10. ANIMATION POUR LE BOUTON DE SOUMISSION */
.submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(106, 17, 203, 0.3);
}
.submit-btn:active {
    transform: scale(0.98);
}
.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}
/* ============================================ */
/* STYLES NOUISLIDER (RANGE) */
/* ============================================ */
.noUi-target {
    margin: 15px 0;
    background: var(--form-border-color);
    border-radius: 3px;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}
.noUi-connect {
    background: var(--form-focus-border-color);
}
.noUi-handle {
    border: 2px solid white;
    border-radius: 50%;
    background: var(--form-focus-border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}
.noUi-handle:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
}
.noUi-handle:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--form-focus-ring-color);
}
.noUi-tooltip {
    background: var(--form-bg-color);
    color: var(--form-color);
    border: 1px solid var(--form-border-color);
    border-radius: var(--form-border-radius);
    padding: 4px 8px;
    font-size: 0.875rem;
}
/* ============================================ */
/* OVERLAY DE CHARGEMENT */
/* ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}
/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */
@media (max-width: 768px) {
    
    h1 {
        font-size: 2rem;
    }
}
/* Support pour les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* ============================================ */
/* UTILITAIRES */
/* ============================================ */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}
/* ============================================ */
/* THÈME SOMBRE - Icônes date/time claires spécifiques */
/* ============================================ */
.form-theme-dark {
    --form-font-size: 0.9375rem;
    --form-color: #e2e8f0;
    --form-bg-color: #1e293b;
    --form-placeholder-color: #94a3b8;
    --form-border-radius: 6px;
    --form-focus-ring-color: rgba(96, 165, 250, 0.2);
    --form-help-color: #94a3b8;
    --form-error-color: #f87171;
    --form-error-border-color: #f87171;
    --form-select-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3e%3cpath fill-rule='evenodd' d='M4.293 5.293a1 1 0 0 1 1.414 0L8 7.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}
/* Correction spécifique pour les icônes date/time dans le thème sombre */
.form-theme-dark input[type="date"],
.form-theme-dark input[type="time"],
.form-theme-dark input[type="datetime-local"],
.form-theme-dark input[type="month"],
.form-theme-dark input[type="week"] {
    /* Force le mode sombre pour l'interface du calendrier */
    color-scheme: dark;
}
/* Chrome/Safari/Edge - Icônes calendrier claires */
.form-theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="time"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="month"]::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="week"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.form-theme-dark input[type="date"]:hover::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="time"]:hover::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="month"]:hover::-webkit-calendar-picker-indicator,
.form-theme-dark input[type="week"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}
/* Firefox - Icônes calendrier claires */
.form-theme-dark input[type="date"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="time"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="month"]::-moz-calendar-picker-indicator,
.form-theme-dark input[type="week"]::-moz-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    opacity: 0.8;
    cursor: pointer;
}
.form-theme-dark input[type="date"]:hover::-moz-calendar-picker-indicator,
.form-theme-dark input[type="time"]:hover::-moz-calendar-picker-indicator,
.form-theme-dark input[type="datetime-local"]:hover::-moz-calendar-picker-indicator,
.form-theme-dark input[type="month"]:hover::-moz-calendar-picker-indicator,
.form-theme-dark input[type="week"]:hover::-moz-calendar-picker-indicator {
    opacity: 1;
}
/* Pour les champs date avec valeur */
.form-theme-dark input[type="date"]:not(:placeholder-shown),
.form-theme-dark input[type="time"]:not(:placeholder-shown),
.form-theme-dark input[type="datetime-local"]:not(:placeholder-shown),
.form-theme-dark input[type="month"]:not(:placeholder-shown),
.form-theme-dark input[type="week"]:not(:placeholder-shown) {
    background-color: rgba(255, 255, 255, 0.05);
}
/* Animation spécifique pour les champs date dans le thème sombre */
.form-theme-dark input[type="date"]:focus,
.form-theme-dark input[type="time"]:focus,
.form-theme-dark input[type="datetime-local"]:focus,
.form-theme-dark input[type="month"]:focus,
.form-theme-dark input[type="week"]:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--form-focus-border-color);
}
/* ============================================ */
/* STYLES SUPPLÉMENTAIRES POUR LES DESCRIPTIONS */
/* ============================================ */
/* Style des descriptions (form-help) */
.form-help {
    font-size: var(--form-message-font-size);
    color: var(--form-help-color);
    margin-top: var(--form-message-margin-top);
    line-height: 1.4;
    opacity: 0.9;
    transition: all 0.3s ease;
}
.form-group:focus-within .form-help {
    opacity: 1;
    transform: translateY(2px);
}
/* Contraintes du champ file (tailles, nombre, formats) mises en avant
   dans la description par SmartformHelper */
.constraints {
    font-size:80%;
    font-weight:700;
}
/* Style pour les compteurs de caractères */
.char-count {
    font-weight: 600;
    color: var(--form-focus-border-color);
    transition: color 0.3s ease;
}
textarea:focus ~ .form-help .char-count {
    animation: countPulse 0.5s ease;
}
@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Style pour les champs multiples (select multiple) */
select[multiple] {
    min-height: 120px;
    padding: 8px;
}
select[multiple] option {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}
select[multiple] option:hover {
    background-color: var(--form-focus-border-color);
    color: white;
}
select[multiple] option:checked {
    background-color: var(--form-focus-border-color);
    color: white;
}
/* Style pour les champs couleur */
input[type="color"] {
    height: 40px;
    padding: 3px;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
}
input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--form-border-color);
    border-radius: 4px;
}
input[type="color"]::-moz-color-swatch {
    border: 2px solid var(--form-border-color);
    border-radius: 4px;
}
input[type="color"]:hover::-webkit-color-swatch {
    border-color: var(--form-focus-border-color);
}
input[type="color"]:hover::-moz-color-swatch {
    border-color: var(--form-focus-border-color);
}
/* Style pour les champs fichier */
input[type="file"] {
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--form-border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
input[type="file"]:hover {
    border-color: var(--form-focus-border-color);
    background-color: rgba(var(--form-focus-border-color-rgb), 0.05);
}
input[type="file"]::file-selector-button {
    padding: 6px 12px;
    background-color: var(--form-focus-border-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}
input[type="file"]:hover::file-selector-button {
    background-color: var(--form-focus-border-color);
    opacity: 0.9;
}
/* Style pour les champs désactivés */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: rgba(0, 0, 0, 0.05);
    cursor: not-allowed;
    opacity: 0.7;
}
/* Animation spécifique pour les champs désactivés */
.form-group:has(input:disabled) .form-label {
    opacity: 0.7;
}
/* Responsive pour les champs date/time */
@media (max-width: 768px) {
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="week"] {
        font-size: 16px; /* Empêche le zoom automatique sur iOS */
    }
}
/* Amélioration de l'accessibilité pour les descriptions */
.form-help[role="tooltip"] {
    position: relative;
}
.form-help[role="tooltip"]::before {
    content: "ℹ️";
    margin-right: 6px;
    opacity: 0.7;
}
/* Style pour les messages d'erreur */
.form-error {
    font-size: var(--form-message-font-size);
    color: var(--form-error-color);
    margin-top: var(--form-message-margin-top);
    padding: 8px 12px;
    background-color: rgba(var(--form-error-color-rgb), 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--form-error-color);
    animation: slideIn 0.3s ease-out;
}
/* Variables RGB pour les couleurs d'erreur */
.form-theme-classic {
    --form-error-color-rgb: 220, 53, 69;
}
.form-theme-modern {
    --form-error-color-rgb: 239, 68, 68;
}
.form-theme-dark {
    --form-error-color-rgb: 248, 113, 113;
}
.form-theme-minimal {
    --form-error-color-rgb: 221, 0, 0;
}
.form-theme-bordered {
    --form-error-color-rgb: 220, 38, 38;
}
.form-theme-rounded {
    --form-error-color-rgb: 220, 38, 38;
}
/* Honeypots SmartForm : ne créent pas de scroll horizontal */
form[id^='smartform'] { overflow-x: clip; }
/* Les fieldsets de groupe ne sont pas des cadres : bordure/padding du
   navigateur neutralises (le fieldset reste le conteneur semantique). */
.form-theme-smartoweb fieldset,
.form-theme-classic fieldset,
.form-theme-modern fieldset,
.form-theme-dark fieldset,
.form-theme-minimal fieldset,
.form-theme-bordered fieldset,
.form-theme-rounded fieldset {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}
/* ============================================ */
/* DESCRIPTIONS DE PAGE ET DE GROUPE            */
/* Hiérarchie douce : la page un cran au-dessus */
/* du groupe ; couleurs du thème de couleur.    */
/* ============================================ */
/* Sélecteur enfant + [data-type] : cible uniquement les descriptions des
/* conteneurs (le bloc RGPD et les aides de champ portent aussi .desc). */
form[id^='smartform'] div[data-type='page'] > .desc {
    font-size: 1.25rem;
    line-height: var(--form-line-height, 1.5);
    color: var(--form-color, #334155);
    margin-bottom: var(--form-spacing, 0.75rem);
}
form[id^='smartform'] div[data-type='group'] > .desc {
    font-size: 1.1rem;
    line-height: var(--form-line-height, 1.5);
    color: var(--form-help-color, #64748b);
    margin-bottom: var(--form-spacing, 0.75rem);
}
/* Les marges suivent l'axe densité du formulaire */
form[id^='smartform'].form-density-compact div[data-type='page'] > .desc,
form[id^='smartform'].form-density-compact div[data-type='group'] > .desc {
    margin-bottom: 0.5rem;
}
form[id^='smartform'].form-density-spacious div[data-type='page'] > .desc,
form[id^='smartform'].form-density-spacious div[data-type='group'] > .desc {
    margin-bottom: 1.25rem;
}
/* ============================================ */
/* CONTRÔLES COMMUNS À TOUS LES STYLES          */
/* (cases, radios, submit, fichiers, curseurs   */
/*  habillés aux couleurs du thème de couleur)  */
/* ============================================ */
/* Cases à cocher et radios : taille stable + couleur du thème */
form[id^='smartform'] input[type="checkbox"],
form[id^='smartform'] input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 0 .55rem 0 0 !important;
    accent-color: var(--form-primary, #2e6df6);
    cursor: pointer;
    flex: none;
}
/* Bloc RGPD : ligne case + texte */
form[id^='smartform'] fieldset.rgpd {
    display: flex;
    align-items: flex-start;
    gap: .3rem;
}
form[id^='smartform'] fieldset.rgpd input[type="checkbox"] {
    margin-top: .25rem !important;
}
/* Bouton submit : bouton plein aux couleurs du thème (le style Défaut
   le surcharge avec son dégradé pilule) */
form[id^='smartform'] .submit {
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 0;
}
form[id^='smartform'] .submit input[type="submit"] {
    width: 100%;
    padding: var(--form-field-padding);
    background-color: var(--form-primary, #2e6df6);
    color: var(--form-primary-contrast, #fff);
    border: none;
    border-radius: var(--form-border-radius);
    font-family: var(--form-font-family);
    font-size: var(--form-font-size);
    font-weight: 600;
    line-height: var(--form-line-height);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
form[id^='smartform'] .submit input[type="submit"]:hover {
    background-color: var(--form-primary-hover, #1a5bd6);
}
/* Curseur (range) aux couleurs du thème, jamais encadré */
form[id^='smartform'] input[type="range"] {
    accent-color: var(--form-primary, #2e6df6);
    width: 100%;
    border: 0;
    padding: 0;
    cursor: grab;
}