/* Fichier : style.css */
/* 🎨 Variables globales */
:root {
    --color-primary: #2980b9;
    --color-primary-dark: #1f6391;
    --color-success: #27ae60;
    --color-success-dark: #1e8449;
    --color-warning-bg: #f39c12;   /* orange CareNova */
    --color-warning: #fff;         /* texte blanc */
	--color-danger-bg: #e74c3c;   /* rouge CareNova */
	--color-danger: #fff;         /* texte blanc */
    --color-light: #f4f6f8;
    --color-dark: #2c3e50;
    --color-grey: #7f8c8d;
    --color-border: #ccc;
}


/* Reset + Layout global */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI","Roboto","Open Sans",Arial,sans-serif;
    background-color: var(--color-light);
    color: #333;
}
main { flex: 1; }

/* Header */
.header {
    background-color: var(--color-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 15px;
}

.header .logo {
    height: 56px !important;
    max-width: 200px !important;
    object-fit: contain;
    display: inline-block;
}

.logo-title {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    color: white;
    font-weight: bold;
}

/* Liens du header : toujours blancs */
.nav-links a,
.nav-links a:visited,
.nav-links a:active {
    color: white !important;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

/* Effet survol */
.nav-links a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* Titres */
.page-title {
    font-size: 1.6em;
    color: var(--color-dark);
    margin: 12px 0 6px;
    text-align: center;
    line-height: 1.2;
	margin-bottom: 5px
}
.section-header.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0px 0 0px; /* compacté */
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: 12px 0;
    font-size: 0.85em;
    margin-top: auto;
    border-top: 1px solid var(--color-primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer a {
    color: var(--color-light);
    text-decoration: none;
    margin-left: 10px;
}
.footer a:hover { text-decoration: underline; }
.footer .logo {
    max-height: 40px;
    object-fit: contain;
    margin-top: 6px;
}

/* Boutons */

/* Table générique */
.table-standard {
    width: 90%;
    margin: 0 auto 20px;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.table-standard th, .table-standard td {
    border: 1px solid var(--color-border);
    padding: 6px 8px;
    text-align: center;
}
.table-standard th {
    background-color: var(--color-light);
    color: var(--color-dark);
    font-weight: bold;
}
.table-standard td.tarif,
.table-standard td.duree { text-align: right; }
.table-standard td.libelle { text-align: left; }
/* Harmonisation de la colonne Actions */
.table-standard td.actions {
    padding: 6px 0;      /* même padding vertical que les autres cellules */
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    height: auto;        /* laisse la ligne décider */
}

/* Ligne inactivée */
tr.inactif {
    background-color: #fdf2f2;
}

/* Bandeau code acte */
.code-info {
    background-color: #f0f4f8;
    border-left: 4px solid #007bff;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-weight: bold;
    color: #333;
    border-radius: 4px;
}

/* Barre d’actions en haut des pages */
.actions-top {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}


/* === Tableaux génériques === */
.table-responsive { overflow-x: auto; }
.table-responsive table { min-width: 600px; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    border: 1px solid var(--color-border);
    padding: 8px;
    text-align: center;
}
th {
    background: var(--color-light);
    color: var(--color-dark);
}
caption {
    caption-side: top;
    font-weight: bold;
    padding: 8px;
    color: var(--color-dark);
}

/* ✅ Cadre visuel du formulaire d'ajout/modification d'acte */
.form-bandeau {
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 16px 20px;
    margin: 20px auto;
    max-width: 600px;
    font-family: "Segoe UI", "Roboto", sans-serif;
    text-align: left;
}
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}
.form-bandeau input,
.form-bandeau select {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95em;
}
.form-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}
.form-actions .btn,
.form-actions .btn-small {
    min-width: 120px;
    text-align: center;
}

/* 🔔 Messages harmonisés (utilisés par afficherMessage) */
.msg {
    display: block;
    text-align: center;
    font-weight: bold;
    padding: 6px 12px;
    margin: 6px auto;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 0.95em;
}
.msg.success {
    color: var(--color-success);
    background-color: #eaf7ea;
}
.msg.warning {
    color: #f57c00;
    background-color: #fff3e0;
}
.msg.error {
    color: var(--color-warning);
    background-color: var(--color-warning-bg);
}

/* 📎 Messages complémentaires (si utilisés déjà dans la page) */
.message-confirmation {
    text-align: center;
    font-weight: bold;
    color: #2e7d32;
    background-color: #eaf7ea;
    padding: 6px 12px;
    margin: 4px auto;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 0.95em;
}
.section-header + .message-confirmation {
    margin-top: 6px;
    margin-bottom: 6px;
}

/* ✏️ Boutons d’action dans les tableaux */

.actions {
    display: flex;
    justify-content: center;
    align-items: center;   /* centrage vertical parfait */
    gap: 6px;
    padding: 0;
    flex-wrap: nowrap;
    width: 100%;
    height: auto;          /* IMPORTANT : laisse la hauteur naturelle */
}

.actions .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;         /* ✅ réduit pour éviter l’effet “gros bouton” */
    font-size: 0.85em;
    line-height: 1.1;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    background-color: #bdc3c7;
    color: var(--color-dark);
    min-height: 30px;         /* ✅ juste assez pour l’alignement */
}
.actions .btn-small:hover {
    background-color: #95a5a6;
}

/* ✅ Finitions d’espacement pour compacter proprement */
.categorie-info { margin-top: 8px; margin-bottom: 6px; }
.page-title { margin: 12px 0 6px; }
table { margin-top: 10px; }

/* (Optionnel) animation discrète des messages */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}
.msg, .message-confirmation {
    animation: fadeInUp 200ms ease-out;
}
.btn-danger {
  background-color: var(--color-warning);
  color: white !important;
}
.btn-danger:hover {
  background-color: #c0392b;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.form-actions .btn {
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}
.btn-planning {
    background-color: #f39c12;
    color: white !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    margin-left: 10px;
    transition: background-color 0.2s ease;
}
.btn-planning:hover {
    background-color: #e67e22;
}
.spacer-10 { height: 10px; }
.spacer-20 { height: 20px; }
.spacer-30 { height: 30px; }
.spacer-40 { height: 40px; }

/* Bouton désactivé (global) */
.btn-disabled,
.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(40%);
}
/* ============================================================
   🟦 Bandeau de notification harmonisé
   ============================================================ */

.bandeau-success {
    background: #d4f8d4;
    border: 1px solid #8ac78a;
    padding: 12px 18px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-weight: 600;
    position: relative;
    animation: fadeIn 0.4s ease-out;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.6s ease;
    opacity: 1;
    transform: translateY(0);
}

.bandeau-success.hide {
    opacity: 0;
    transform: translateY(-25px);
    margin-bottom: -40px;
}

.bandeau-success .close-btn {
    position: absolute;
    right: 12px;
    top: 8px;
    cursor: pointer;
    font-size: 18px;
}

.bandeau-error {
    background: #f8d7da;
    border: 1px solid #e5b5b8;
    color: #842029;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.table-standard th .actions {
    display: block !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    gap: 0 !important;
}


