/* ============================
   Boutons globaux CareNova (BEM)
   ============================ */

/* Bloc principal */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
    font-size: 1em;
    gap: 6px;
    border: none;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
}

a.btn {
    text-decoration: none !important;
}

/* ============================
   Modifiers structurels (taille, forme)
   ============================ */

/* Petit bouton compact */
.btn--small {
    padding: 6px 10px;
    font-size: 0.85em;
}

/* Bouton d’action (tableaux, listes) */
.btn--action {
    height: 30px;
    padding: 0 12px;
    font-size: 0.9em;
    line-height: 1;
    white-space: nowrap;
    font-weight: 600;      /* 🔥 gras restauré */
    border-radius: 6px;    /* 🔥 arrondi restauré */
}

.btn--top {
    padding: 10px 18px;
    font-size: 1em;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Boutons du dashboard (structure) */
.btn--dash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.95em;
    border-radius: 6px;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
}

/* Bouton d’édition à double état (Modifier / Enregistrer) */
.btn--edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
}


/* ============================
   Skins (couleurs / styles visuels)
   ============================ */

.btn--primary {
    background-color: var(--color-primary);
    color: #fff;
}
.btn--primary:hover {
    background-color: var(--color-primary-dark);
}

/* Bouton compact bleu CareNova (historique) */
.btn--secondary {
    background-color: #2196F3; /* bleu action CareNova */
    color: #fff;
    border-radius: 6px;
    border: none;
}
.btn--secondary:hover {
    background-color: #1e88e5;
}


.btn--success {
    background-color: var(--color-success);
    color: #fff;
}
.btn--success:hover {
    background-color: var(--color-success-dark);
}

.btn--warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.btn--warning:hover {
    background-color: #d68910; /* orange un peu plus foncé */
}

.btn--danger {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}
.btn--danger:hover {
    background-color: #c0392b;
}

.btn--lavande {
    background-color: #9b59b6;
    color: #fff;
}
.btn--lavande:hover {
    background-color: #8e44ad;
}

.btn--archive {
    background-color: #f1c40f; /* jaune doré */
    color: #2c3e50;           /* gris foncé lisible */
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}
.btn--archive:hover {
    background-color: #d4ac0d; /* jaune foncé premium */
}

.btn--delete {
    background-color: #e74c3c; /* rouge vif */
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}
.btn--delete:hover {
    background-color: #c0392b; /* rouge foncé */
}

.btn--restore {
    background-color: #27ae60;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}
.btn--restore:hover {
    background-color: #1e8449;
}

/* Skin spécial footer (mode clair/sombre) */
.btn--footer {
    background-color: #bdc3c7;
    color: var(--color-dark);
    border-radius: 6px;
	margin-bottom: 5px;
}
.btn--footer:hover {
    background-color: #95a5a6;
}

/* Footer en mode sombre */
[data-theme="sombre"] .btn--footer {
    background-color: #444;
    color: #eee;
}

[data-theme="sombre"] .btn--footer:hover {
    background-color: #555;
}

/* Boutons Dashboard — Patients */
.btn--dash-patients {
    background-color: #66BB6A;
    color: #fff;
}
.btn--dash-patients:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — RDV */
.btn--dash-rdv {
    background-color: #42A5F5;
    color: #fff;
}
.btn--dash-rdv:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Créneaux */
.btn--dash-creneaux {
    background-color: #3F51B5;
    color: #fff;
}
.btn--dash-creneaux:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Actes */
.btn--dash-actes {
    background-color: #8D6E63;
    color: #fff;
}
.btn--dash-actes:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Paramètres */
.btn--dash-parametres {
    background-color: #673AB7;
    color: #fff;
}
.btn--dash-parametres:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Utilisateurs */
.btn--dash-users {
    background-color: #2196F3;
    color: #fff;
}
.btn--dash-users:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Onboarding Admin */
.btn--dash-onboarding {
    background-color: #e6005c;
    color: #fff;
}
.btn--dash-onboarding:hover {
    background-color: #a80000;
}

/* Boutons Dashboard — Rapports & Statistiques */
.btn--dash-rapports {
    background-color: #607D8B;
    color: #fff;
}
.btn--dash-rapports:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — URSSAF */
.btn--dash-urssaf {
    background-color: #FB8C00;
    color: #fff;
}
.btn--dash-urssaf:hover {
    filter: brightness(1.1);
}

/* Boutons Dashboard — Questionnaires */
.btn--dash-questionnaires {
    background-color: #9C27B0;
    color: #fff;
}
.btn--dash-questionnaires:hover {
    filter: brightness(1.1);
}


/* ============================
   Boutons spécifiques patient_questionnaires
   ============================ */

.btn--renvoyer {
    background-color: #f39c12;
    color: #fff;
}
.btn--renvoyer:hover {
    background-color: #d68910;
}

.btn--supprimer {
    background-color: #e74c3c;
    color: #fff;
}
.btn--supprimer:hover {
    background-color: #c0392b;
}

/* Actions dans les tableaux PQ */
.pq-actions .btn {
    margin-right: 6px;
}

/* ============================
   Boutons Toggle (composant séparé)
   ============================ */

.btn--toggle {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 140px;
    text-align: center;
    box-sizing: border-box;
}

.btn--toggle.on {
    background-color: #28a745;
    color: #fff;
}

.btn--toggle.off {
    background-color: #ff9800;
    color: #fff;
}

/* Toggle RDV (texte long) */
.btn--toggle-rdv {
    padding: 10px 20px;
    font-size: 1em;
    width: auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
}

.btn--toggle-rdv.on {
    background-color: #28a745;
    color: #fff;
}

.btn--toggle-rdv.off {
    background-color: #dcdcdc;
    color: #333;
}

/* Boutons spécifiques à voir_patient */
.btn--vp {
    display: flex;
    align-items: center;      /* centrage vertical */
    justify-content: flex-start; /* aligné à gauche */
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.90rem;
    gap: 10px;                /* espace icône / texte */
    text-decoration: none;
    white-space: nowrap;
}

/* Zone icône fixe pour alignement parfait */
.btn--vp .icon {
    width: 22px;              /* largeur identique pour les 4 boutons */
    display: inline-flex;
    justify-content: center;
}


/* ============================
   Mode sombre
   ============================ */
:root {
    --bg: #ffffff;
    --text: #222;
    --card: #f5f5f5;
    --border: #ddd;
}

[data-theme="sombre"] {
    --bg: #121212;
    --text: #e5e5e5;
    --card: #1e1e1e;
    --border: #333;
}
