/* ==========================================================================
   FORMS.CSS — PANNEAUX ET FORMULAIRES
   ========================================================================== */

   /* ==========================================================
   STYLE INTERNE DES FORMULAIRES
   ========================================================== */

.form-panel h2 {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.form-panel form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

.form-panel p {
    margin: 0;
}




/* ------------------------------------------------------------------
   Compatibilité anciens formulaires.
   À supprimer lorsque tous les formulaires utilisent
   form-input / form-select / form-textarea.
------------------------------------------------------------------ 

.form-panel label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-panel input[type="text"],
.form-panel input[type="number"],
.form-panel input[type="password"],
.form-panel input[type="email"],
.form-panel input[type="url"],
.form-panel select,
.form-panel textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    box-sizing: border-box;

    border: 1px solid #ccd3dd;
    border-radius: 12px;

    background: #fff;
    color: #111827;
    font-size: 15px;
}
*/

.form-panel input[type="file"] {
    width: 100%;
    font-size: 13px;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus {
    outline: none;
    border-color: #93b7ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-panel input[type="checkbox"] {
    margin-right: 6px;
    transform: translateY(1px);
}

/*

.form-panel input[type="submit"],
.form-panel button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    min-height: 38px;
    padding: 0 16px;

    border: none;
    border-radius: 10px;

    background: var(--primary);
    color: #fff;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
    */



.form-panel input[type="submit"]:hover,
.form-panel button[type="submit"]:hover {
    opacity: 0.92;
}

.form-panel a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-panel a:hover {
    text-decoration: underline;
}

/* ==========================================================
   TOP FORM BAR
   ========================================================== */

.formTop-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;

    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 4px auto;
    padding: 7px 12px;
    box-sizing: border-box;
    min-height: 44px;

    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 12px;
}

.formTop-title {
    flex: 0 0 auto;

    font-weight: 700;
    white-space: nowrap;
    color: #1f2a37;
    line-height: 1.2;
}

.formTop-choices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    flex-wrap: wrap;

    flex: 0 1 auto;
    min-width: 0;
}

.formTop-choices label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin: 0;
    white-space: nowrap;

    font-size: 0.93rem;
    color: #243041;
}

.formTop-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;

    margin-left: 0;
}

.formTop-actions button,
.formTop-actions input {
    min-height: 30px;
}

/* ==========================================================
   FORM PANEL
   ========================================================== */

.form-panel {
    width: 100%;
    box-sizing: border-box;

    padding: 16px;

    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 18px;
}

.form-panel--flat {
    padding: 4px 6px;

    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.form-panel__header {
    margin-bottom: 1rem;
}

.form-panel__title {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2a37;
}

.form-panel__subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #5b6675;
}


/* ==========================================================
   GRILLE FORMULAIRE
   ========================================================== */

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid--compact {
    display: grid;
    gap: 0.7rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row--inline {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.form-row--inline .form-label {
    margin: 0;
    text-align: left;
}

.form-row--inline .form-textarea {
    min-height: 90px;
}

/* ==========================================================
   LABELS ET CHAMPS
   ========================================================== */

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #243041;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1f2a37;
    background: #fff;
    border: 1px solid #c8d0db;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #4c7ff0;
    box-shadow: 0 0 0 3px rgba(76, 127, 240, 0.15);
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}


.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0;
    color: #243041;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0;
}

/* ==========================================================
   ACTIONS FORMULAIRE
   ========================================================== */

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    color: #fff;
    background: #2f6fec;
    border-color: #2f6fec;
}

.btn-primary:hover {
    background: #245ed0;
    border-color: #245ed0;
}

.btn-secondary {
    color: #243041;
    background: #f3f5f8;
    border-color: #cfd6e0;
}

.btn-secondary:hover {
    background: #e7ebf1;
}


/* ==========================================================
   INFOS IMAGE
   ========================================================== */

.info-line {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.info-label {
    font-weight: 600;
}

.info-value {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* ==========================================================
   LISTES LONGUES
   ========================================================== */

#select_dossier,
#select_panier {
    height: 320px;
    min-height: 220px;
    overflow-y: auto;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 640px) {
    .form-panel {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn,
    .form-actions button {
        width: 100%;
    }
}



