/* ===========================   STYLES ADMIN (cartes clients)   =========================== */

.forezdiag-admin-wrap {
    max-width: 1100px;
}

/* Liste en mode cartes - auto-adaptation à la largeur de l'écran */
.forezdiag-admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Carte client */
.fz-admin-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

/* En-tête carte */
.fz-admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
}

.fz-admin-client-name {
    font-weight: 600;
    font-size: 14px;
}

.fz-admin-client-email {
    font-size: 12px;
    color: #6b7280;
}

.fz-admin-client-date {
    font-size: 12px;
    color: #9ca3af;
}

/* Sections de la carte */
.fz-admin-card-section {
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
    margin-top: 4px;
}

/* Champs */
.fz-field-group {
    margin-bottom: 8px;
}

.fz-field-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 3px;
}

.fz-field-group input[type="text"],
.fz-field-group input[type="email"],
.fz-field-group input[type="url"],
.fz-field-group input[type="date"],
.fz-field-group select {
    width: 100%;
    max-width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
}

/* Inline */
.fz-inline {
    display: flex;
    gap: 6px;
    align-items: center;
}

.fz-inline--full {
    flex-wrap: wrap;
}

.fz-inline--full > * {
    flex: 1 1 100%;
}

/* Nom de fichier sous l’input file */
.fz-inline--full input[type="file"] {
    white-space: normal;
    max-width: 100%;
}

.fz-file-name {
    font-size: 12px;
    color: #4b5563;
    margin-top: 4px;
}

/* Actions */
.fz-admin-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.fz-admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.fz-admin-actions-grid .button {
    width: 100%;
    text-align: center;
    padding: 6px 4px;
}

/* Colonnes d’actions (PDF / Statut-Supprimer-Lead-Mail) */
.fz-actions-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Icônes docs */
.fz-doc-icons a {
    font-size: 18px;
    margin-right: 4px;
}

/* Badges statut */
.forezdiag-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.forezdiag-status-ok {
    background: #dcfce7;
    color: #166534;
}

.forezdiag-status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Modals admin (overlay + centrage) */
#forezdiag-mail-modal,
#forezdiag-lead-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Contenu des modals */
#forezdiag-mail-modal .forezdiag-mail-modal-inner,
#forezdiag-lead-modal .forezdiag-lead-modal-inner {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .3);
}

/* Popup lead : un peu plus haut et scroll interne */
#forezdiag-lead-modal .forezdiag-lead-modal-inner {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Version mobile admin */
@media (max-width: 782px) {
    .fz-admin-card {
        padding: 10px 10px;
        border-radius: 10px;
    }

    .fz-admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 4px;
    }

    .fz-field-group input,
    .fz-field-group select {
        font-size: 14px;
    }

    .fz-admin-client-name {
        font-size: 15px;
    }
}

/* ===========================   STYLES FRONT (version app, plein écran)   =========================== */

.fz-app {
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Barre du haut */
.fz-app-header {
    padding: 16px 20px;
    background: #071B38;
    color: #fff;
}

.fz-app-header h1 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #f69a4c;
}

.fz-app-header p {
    margin: 0;
    font-size: 14px;
    color: #e5e7eb;
}

.fz-app-main {
    flex: 1;
    padding: 16px 16px 96px;
}

/* Carte front */
.fz-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

/* Formulaire de login */
.fz-login-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.fz-login-form input {
    display: block;
    width: 100%;
    max-width: 360px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    box-sizing: border-box;
}

/* Boutons front */
.fz-btn-primary,
.fz-btn-secondary {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.fz-btn-primary {
    background: #f69a4c;
    color: #fff;
}

.fz-btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

/* Petits boutons dans la liste des docs */
.fz-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* Liste de docs */
.fz-doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fz-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
}

.fz-doc-title {
    font-size: 14px;
    color: #111827;
}

.fz-doc-lock,
.fz-doc-empty {
    font-size: 13px;
    color: #9ca3af;
}

.fz-doc-actions {
    display: flex;
    gap: 8px;
}

/* Petits écrans */
@media (max-width: 600px) {
    .fz-app-main {
        padding: 12px 12px 80px;
    }

    .fz-card {
        padding: 12px;
    }

    .fz-login-form input {
        max-width: 100%;
    }

    .fz-doc-item {
        flex-direction: column;
        align-items: flex-start;
    }
}