/* ============================================================
   PAPAYOUX — Formulaire création cagnotte — CSS modernisé
   Palette conservée : bleu #053668 / rose #e971ab / #FF3161
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --blue-deep:   #053668;
    --blue-mid:    #155588;
    --blue-light:  #6b9ef4;
    --rose:        #e971ab;
    --rose-dark:   #FF3161;
    --rose-soft:   #ffb5c6;
    --gold-bg:     #fbf9f3;
    --gold-border: #f8f2e3;
    --text:        #333;
    --radius:      10px;
    --shadow:      0 4px 24px rgba(5, 54, 104, 0.10);
    --transition:  0.2s ease;
}

/* ── Neutralise box-sizing sur le burger ──────────────────── */
#mobile .navicon {
    box-sizing: content-box;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    color: var(--text);
    margin: 0;
    padding: 0;
    background-image: url('/papayoux/images/fond_ecran_jaune.png');
    background-repeat: no-repeat;
    background-position: top;
    background-size: contain;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--blue-deep); transition: color var(--transition); }
a:hover { color: var(--rose-dark); }

/* ── Formulaire principal ─────────────────────────────────── */
#new_cagnotte {
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    border: 1px solid var(--gold-border);
    font-size: 13px;
    padding: 2.2em 2.5em 2em;
    margin: 30px auto 50px;
    width: 55%;
    max-width: 760px;
    height: auto;
    transition: box-shadow var(--transition);
}

#new_cagnotte:hover {
    box-shadow: 0 8px 36px rgba(5, 54, 104, 0.14);
}

/* ── Titre h1 ─────────────────────────────────────────────── */
h1 {
    border-bottom: 2px solid var(--gold-border);
    letter-spacing: 0.04em;
    margin-bottom: 26px;
    padding-bottom: 16px;
    font-weight: 700;
    font-size: 1.5em;
    color: var(--blue-deep);
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--rose);
    border-radius: 2px;
}

/* ── Paragraphes ──────────────────────────────────────────── */
#new_cagnotte p {
    margin-bottom: 28px;
}

#new_cagnotte p:last-child {
    margin-bottom: 0;
}

/* ── Labels — scopés au formulaire ───────────────────────── */
#new_cagnotte label {
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    width: 30%;
    font-weight: 600;
    font-size: 13px;
    color: var(--blue-deep);
    letter-spacing: 0.01em;
    transition: color var(--transition);
}

label {
    cursor: pointer;
}

#new_cagnotte p:hover label { color: var(--blue-mid); }

#new_cagnotte .label_options        { width: 55%; vertical-align: middle; }
#new_cagnotte .label_options_select { width: 55%; vertical-align: top; }

/* ── Inputs, textarea, select ─────────────────────────────── */
input[type=text],
input[type=password],
input[type=date],
input[type=file],
input[type=email],
input[type=url],
textarea,
select {
    width: 50%;
    padding: 9px 12px;
    font-size: 13px;
    display: inline-block;
    vertical-align: middle;
    border: 1.5px solid #d0dae8;
    border-radius: 7px;
    background: #fafcff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
    font-family: inherit;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=email]:focus,
input[type=url]:focus,
textarea:focus,
select:focus {
    border-color: var(--blue-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(107, 158, 244, 0.18);
}

input::placeholder,
textarea::placeholder {
    color: #aab4c4;
    font-style: italic;
}

#thanks        { width: 30%; }
#input_cible,
#input_suggest { vertical-align: middle; width: 110px; }

/* ── Zone de dépôt photo ──────────────────────────────────── */
.champ-photo {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 28px;
}

/* Label centré verticalement par rapport à la zone de dépôt.
   #new_cagnotte .champ-photo label pour surcharger #new_cagnotte label */
#new_cagnotte .champ-photo label,
.champ-photo label {
    flex: 0 0 30%;
    width: 30%;
    padding-top: 0;
    display: flex;
    align-items: center;
    min-height: 110px;
    margin-bottom: 0;
}

#dropfile {
    flex: 0 0 50%;
    width: 50%;
    height: 110px;
    border: 2px dashed var(--blue-light);
    border-radius: var(--radius);
    font-size: 13px;
    background: #f5f8ff;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color var(--transition), background var(--transition);
    overflow: hidden;
    position: relative;
}

/* Icône SVG upload via pseudo-element */
#dropfile::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background-color: var(--blue-light);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color var(--transition);
}

/* Texte sous l'icône via #depot */
#depot {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-light);
    display: block;
    transition: color var(--transition);
}

#dropfile:hover {
    border-color: var(--rose);
    background: #fff5f9;
}

#dropfile:hover::before {
    background-color: var(--rose);
}

#dropfile:hover #depot {
    color: var(--rose);
}
#preview {
    max-height: 106px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: none; /* caché par défaut, affiché via JS après upload */
}

/* ── Bouton submit ────────────────────────────────────────── */
input[type=submit] {
    padding: 11px 28px;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: var(--rose);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(233, 113, 171, 0.35);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

input[type=submit]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 113, 171, 0.45);
    filter: brightness(1.06);
}

input[type=submit]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(233, 113, 171, 0.3);
}

input[type=button] { padding: 10px 15px; font-size: 1em; }

/* ── Bouton retour ────────────────────────────────────────── */
#back {
    background: transparent;
    color: var(--blue-mid);
    margin-right: 20px;
    font-weight: 600;
    border: 1.5px solid #d0dae8;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.95em;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    display: inline-block;
    vertical-align: middle;
}

#back:hover {
    border-color: var(--rose-dark);
    color: var(--rose-dark);
    background: #fff5f7;
}

/* ── Zone push ────────────────────────────────────────────── */
#push {
    text-align: right;
    margin: 50px 10% 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Erreurs ──────────────────────────────────────────────── */
.error {
    color: var(--rose-dark);
    margin-top: 4px;
    display: block;
    margin-left: 31%;
    font-size: 0.78em;
    font-style: italic;
}

.error_options {
    color: var(--rose-dark);
    margin-top: 4px;
    display: block;
    margin-left: 45%;
    font-size: 0.78em;
    font-style: italic;
}

/* ── Message attente ──────────────────────────────────────── */
#msg {
    color: var(--rose-dark);
    font-size: 1em;
    margin-left: 31%;
    font-weight: 600;
}

/* ── Icône aide ───────────────────────────────────────────── */
.help {
    margin-left: 14px;
    width: 20px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity var(--transition);
}
.help:hover { opacity: 1; }

/* ── Switch déductible ────────────────────────────────────── */
.switch-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    margin-bottom: 4px;
    padding: 14px 16px;
    background: #f8fbff;
    border-radius: 9px;
    border: 1px solid var(--gold-border);
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;  /* largeur du track */
    height: 30px; /* hauteur du track */
    flex-shrink: 0;
}

.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Annule les styles du formulaire sur le switch.
   Nécessaire car #new_cagnotte label a une spécificité élevée */
.switch .switch-label,
#new_cagnotte .switch .switch-label {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;   /* 100% du .switch parent, pas du formulaire */
    font-weight: normal;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
    letter-spacing: normal;
    vertical-align: unset;
    margin-bottom: 0;
    background-color: #d0dae8;
    border-radius: 30px;
    transition: background 0.35s;
}

.switch-label::before {
    content: "";
    position: absolute;
    height: 22px;   /* diamètre de la boule */
    width: 22px;    /* diamètre de la boule */
    left: 4px;      /* marge gauche au repos */
    bottom: 4px;    /* centrage vertical */
    background: #fff;
    border-radius: 50%;
    transition: transform 0.35s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* Quand coché : couleur rose */
.switch-input:checked + .switch-label,
#new_cagnotte .switch-input:checked + .switch-label {
    background-color: var(--rose);
}

/* Translation = largeur track - diamètre boule - 2x marge = 56 - 22 - 8 = 26px */
.switch-input:checked + .switch-label::before,
#new_cagnotte .switch-input:checked + .switch-label::before {
    transform: translateX(26px);
}

/* Texte du switch : flex:1 pour prendre tout l'espace disponible
   et white-space:nowrap pour ne pas passer à la ligne */
.switch-text {
    font-weight: 600;
    color: var(--blue-deep);
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
    display: inline;
}

/* ── Bouton "Plus d'options" ──────────────────────────────── */
.more-options-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 28px 0 18px;
}

.more-options {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font: 600 0.9rem/1.2 inherit;
    color: var(--rose);
    background-color: transparent;
    border: 1.5px solid var(--rose);
    border-radius: 8px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.more-options:hover,
.more-options:focus-visible {
    color: var(--rose-dark);
    border-color: var(--rose-dark);
    background: #fff0f5;
    outline: none;
}

.more-options:active { transform: scale(0.97); }

.more-options__icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    transition: transform 0.3s;
}

.more-options[aria-expanded="true"] .more-options__icon {
    transform: rotate(180deg);
}

/* ── Options avancées ─────────────────────────────────────── */
#more_options {
    background: #f8fbff;
    border: 1px solid #e0eaf7;
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 18px;
}

#more_options p { margin-bottom: 18px; }
#more_options p:last-child { margin-bottom: 0; }

/* ── Options avancées : switchs & contrôle segmenté ───────── */
/* Ligne = libellé + contrôle + icône d'aide.
   Libellé à 55% pour aligner les contrôles sur la colonne
   des champs Objectif / Suggestion (.label_options = 55%) */
.option-row {
    display: flex;
    align-items: center;
    row-gap: 8px;
    margin-bottom: 18px;
}

.option-row .tutotip { flex-shrink: 0; }

/* Libellé — surcharge #new_cagnotte label (width 30%, inline-block).
   Base 55% mais peut rétrécir si le contrôle est large (segmenté),
   plutôt que de renvoyer l'icône d'aide à la ligne */
#new_cagnotte .option-row .option-label {
    flex: 0 1 55%;
    width: auto;
    min-width: 0;
    display: block;
    margin: 0;
    padding-right: 12px;
    font-weight: 600;
    font-size: 13px;
    color: var(--blue-deep);
    vertical-align: middle;
}

/* Le libellé "Visibilité" est un span (pas cliquable) */
span.option-label { cursor: default; }

/* Contrôle segmenté (Publique / Consultable / Privée) */
.segmented {
    position: relative;          /* référence pour les radios masqués */
    display: inline-flex;
    flex-shrink: 0;
    gap: 2px;
    padding: 3px;
    background: #eef3fa;
    border: 1.5px solid #d0dae8;
    border-radius: 9px;
}

/* Radios invisibles mais toujours focusables au clavier (pas de display:none) */
.segmented input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Boutons du segmenté — surcharge #new_cagnotte label */
#new_cagnotte .segmented label {
    display: block;
    width: auto;
    margin: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--blue-mid);
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

#new_cagnotte .segmented label:hover { color: var(--rose-dark); }

/* Option active : rose, comme le switch coché */
#new_cagnotte .segmented input:checked + label {
    background: var(--rose);
    color: #fff;
    box-shadow: 0 2px 8px rgba(233, 113, 171, 0.35);
}

/* Focus clavier visible (segmenté + switchs) */
.segmented input:focus-visible + label,
.switch-input:focus-visible + .switch-label {
    box-shadow: 0 0 0 3px rgba(107, 158, 244, 0.35);
}

/* Mobile : libellé à gauche / switch à droite, segmenté pleine largeur */
@media screen and (max-width: 767px) {

    #new_cagnotte .option-row .option-label {
        flex: 1 1 0;
        width: auto;
        font-size: 0.88em;
    }

    .option-row .tutotip { display: none; }   /* .help déjà masqué en mobile */

    .option-row--segmented { flex-wrap: wrap; }   /* segmenté sous son libellé */
    #new_cagnotte .option-row--segmented .option-label { flex-basis: 100%; }
    .option-row--segmented .segmented { width: 100%; }
    #new_cagnotte .segmented label { flex: 1; padding: 8px 4px; }
}

/* ── Select jQuery UI ─────────────────────────────────────── */
.speed { width: 120px; }
.ui-widget { font-size: 1em; font-family: inherit; }

.ui-selectmenu-button.ui-button {
    border: 1.5px solid #d0dae8;
    border-radius: 7px;
    background: #fafcff;
    font-size: 13px;
    padding: 6px 10px;
    transition: border-color var(--transition);
}
.ui-selectmenu-button.ui-button:hover { border-color: var(--blue-light); }

/* ── Dropdown catégorie ───────────────────────────────────── */
.dropdown-container {
    display: inline-block;
    vertical-align: middle;
    width: 100%;
    margin-bottom: 16px;
}

.modern-label { width: 30%; }

.custom-dropdown {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    width: 50%;
}

.dropdown-selected {
    padding: 9px 36px 9px 12px;
    background-color: #fafcff;
    border: 1.5px solid #d0dae8;
    border-radius: 7px;
    cursor: pointer;
    color: var(--text);
    display: block;
    width: 100%;
    font-size: 13px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.dropdown-selected:hover { border-color: var(--blue-light); }

.dropdown-selected.open {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(107, 158, 244, 0.18);
}

.dropdown-selected::after {
    content: '▾';
    color: #8899bb;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
    transition: transform 0.25s;
}

.dropdown-selected.open::after { transform: translateY(-50%) rotate(180deg); }

.dropdown-options {
    list-style: none;
    padding: 6px 0;
    margin: 4px 0 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1.5px solid #d0dae8;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(5,54,104,0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    z-index: 100;
}

.dropdown-options.show { max-height: 360px; opacity: 1; overflow-y: auto; }

.dropdown-options li {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    border-radius: 5px;
    margin: 2px 4px;
    transition: background var(--transition), color var(--transition);
}

.dropdown-options li:hover {
    background: #fff0f6;
    color: var(--rose-dark);
}

/* ── Datepicker ───────────────────────────────────────────── */
.ui-datepicker-header {
    background: var(--blue-mid);
    border: none;
    border-radius: 7px 7px 0 0;
    color: #fff;
}

.ui-datepicker td span, .ui-datepicker td a { border-radius: 5px; }

.ui-datepicker .ui-state-active {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
}

/* ── Tooltip ──────────────────────────────────────────────── */
.ui-tooltip-content { font-size: 12px; text-align: justify; }
.tutotip { display: inline-block; vertical-align: middle; }

/* ── Statut upload ────────────────────────────────────────── */
#depot { font-size: 12px; font-weight: 600; display: block; }

/* ── Bloc info bas de page ────────────────────────────────── */
#bloc2 {
    text-align: justify;
    letter-spacing: 0.03em;
    background: var(--gold-bg);
    color: var(--blue-deep);
    padding: 30px 50px 50px;
    border-top: 1px solid var(--gold-border);
    line-height: 26px;
}

#bloc2 a:hover { color: var(--rose-dark); }

.titre2 {
    text-align: center;
    margin-bottom: 36px;
    font-size: 1.3em;
    color: var(--blue-deep);
    position: relative;
}

.titre2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--rose);
    margin: 10px auto 0;
    border-radius: 2px;
}

#model { color: var(--blue-light); font-weight: 600; }

/* ── On/off switch (legacy) ───────────────────────────────── */
.container { padding-bottom: 0; margin-left: 0; display: inline-block; vertical-align: middle; }

.onoffswitch {
    position: relative; width: 150px;
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;
}

.onoffswitch-checkbox { display: none; }

.onoffswitch-label {
    display: block; overflow: hidden; cursor: pointer;
    border: 1px solid #bbb; border-radius: 20px;
}

.onoffswitch-inner { width: 200%; margin-left: -100%; transition: margin 0.3s ease-in; }

.onoffswitch-inner::before,
.onoffswitch-inner::after {
    float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
    font-size: 14px; color: #fff; font-family: inherit; font-weight: 700; box-sizing: border-box;
}

.onoffswitch-inner::before { content: "Oui"; padding-left: 11px; background: #00A600; }
.onoffswitch-inner::after  { content: "Non"; padding-right: 11px; background: #eee; color: #999; text-align: right; }

.onoffswitch-switch {
    width: 26px; margin: 2px; background: #fff;
    border: 2px solid #999; border-radius: 20px;
    position: absolute; top: 0; bottom: 0; right: 44px;
    transition: all 0.3s ease-in;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; }
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 0; }

/* ── Divers ───────────────────────────────────────────────── */
#accept, .accept { text-align: right; margin: 1% 20% 0 0; font-size: 0.8em; }
#cadenas { width: 30px; vertical-align: middle; margin-right: 5px; }

#bloc_cadenas {
    width: 12%; font-size: 13px; background: #fff; padding: 12px;
    border-radius: 8px; margin: 40px auto 0;
    box-shadow: 0 2px 10px rgba(5,54,104,0.08);
    border: 1px solid var(--gold-border);
}

#bloc_cadenas a { color: #555; }
#conf { margin: 15px auto; text-align: center; font-size: 13px; }
#conf a { color: var(--rose-dark); font-weight: 700; }
.fb_final { text-align: center; margin-bottom: 20px; font-size: 14px; color: var(--rose-dark); }
#sous_footer1 { margin-top: 0; }
.moqueur { width: 5em; display: inline-block; margin-right: 20px; }
#promo { margin-top: 10px; width: 100px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

/* ── Mobile ─────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    body { background-image: none !important; background-color: #fff; }

    h1 { font-size: 1.25em; }

    #new_cagnotte { width: 90%; padding: 1.4em 1.2em; }

    /* Labels pleine largeur en mobile —
       #new_cagnotte label a plus de spécificité, on doit le surcharger */
    #new_cagnotte label,
    label, .label_options, .label_options_select {
        display: block;
        font-weight: 600;
        font-size: 0.88em;
        width: 100%;
        margin-bottom: 6px;
        vertical-align: top;
    }

    /* Exclut le switch-label de la règle mobile ci-dessus */
    #new_cagnotte .switch .switch-label {
        display: block;
        position: absolute;
        width: 100%;
        font-size: inherit;
        font-weight: normal;
        margin-bottom: 0;
    }

    .modern-label { width: 100%; display: block; margin-bottom: 6px; }
    .dropdown-container { display: block; }
    .custom-dropdown { width: 100%; display: block; }

    /* Labels options pleine largeur sur mobile */
    #new_cagnotte .label_options,
    #new_cagnotte .label_options_select {
        width: 100%;
        display: block;
        margin-bottom: 6px;
    }
    /* Zone photo : supprime l'espace dû au min-height du label desktop */
    .champ-photo { display: block; margin-bottom: 16px; }
    #new_cagnotte .champ-photo label,
    .champ-photo label { width: 100%; padding-top: 0; flex: none; min-height: 0; margin-bottom: 6px; display: block; }
    #dropfile { width: 100%; flex: none; }

    input[type=text], input[type=password], input[type=date],
    input[type=file], input[type=email], input[type=url],
    #combo, #input_cible, #input_suggest, select, textarea {
        width: 100%; height: auto; font-size: 1em; margin-left: 0; padding: 10px 12px;
    }

    #thanks { height: 100px; width: 100%; font-size: 1em; }

    #push { text-align: center; margin: 30px 0 0; justify-content: center; flex-wrap: wrap; gap: 12px; }

    input[type=submit], input[type=button] { font-size: 1em; padding: 12px 20px; }

    .error, .error_options { display: block; margin-left: 0; }

    .help { display: none; }

    select { width: 100%; }

    #bloc2 { padding: 20px 18px 30px; }

    .switch { width: 52px; height: 28px; }
    .switch-label::before { height: 20px; width: 20px; }
    .switch-input:checked + .switch-label::before { transform: translateX(22px); }
}

/* ── Tablette ────────────────────────────────────────────── */
@media screen and (min-width: 768px) and (max-width: 979px) {

    #new_cagnotte { min-width: 200px; width: 80%; font-size: 12px; }

    input[type=text], input[type=password], input[type=date],
    input[type=file], input[type=email], input[type=url],
    textarea, select { width: 55%; font-size: 1em; }

    #dropfile { flex: 0 0 55%; width: 55%; }

    input[type=submit], input[type=button] { font-size: 1em; }

    label { font-size: 1em; width: 30%; }

    h1 { font-size: 1.5em; }

    .ui-datepicker { font-size: 0.9em; }

    .error, .error_options { font-size: 0.85em; }
}

/* ── Format moyen ────────────────────────────────────────── */
@media screen and (min-width: 980px) and (max-width: 1199px) {

    #new_cagnotte { width: 68%; font-size: 13px; }

    input[type=text], input[type=password], input[type=date],
    input[type=file], input[type=email], input[type=url],
    textarea, select { width: 52%; font-size: 1em; }

    #dropfile { flex: 0 0 52%; width: 52%; }

    input[type=submit], input[type=button] { font-size: 1em; }

    label { font-size: 1em; width: 30%; }

    h1 { font-size: 1.6em; }

    .ui-datepicker { font-size: 0.85em; }
}

/* ── Grand écran ─────────────────────────────────────────── */
@media screen and (min-width: 1600px) {

    #new_cagnotte { width: 50%; font-size: 0.65em; }

    input[type=text], input[type=password], input[type=date],
    input[type=file], input[type=email], input[type=url],
    textarea, select { width: 50%; font-size: 1.4em; padding: 10px 14px; }

    #dropfile { flex: 0 0 50%; width: 50%; }

    label { font-size: 1.4em; }

    h1 { font-size: 2em; }

    .ui-datepicker { font-size: 1.1em; }

    input[type=submit], input[type=button] { padding: 14px 32px; font-size: 1.4em; }

    .error, .error_options { font-size: 1em; }
}