/* ================================
   Transmissions Cordia - CSS Pro 2025
   Version CLEAN & OPTIMISÃ‰E (Option C)
   ================================= */

/* ---- RESET ---- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #eef3f9;
    color: #1b2838;
}

/* ========================================
   HEADER
======================================== */

.header {
    background: #005b96;
    color: #fff;
    padding: 12px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content .logo {
    height: 52px;
}

.header-content h1 {
    font-size: 1.9rem;
    font-weight: 600;
}

.navbar {
    display: flex;
    gap: 10px;
}

.navbar button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.navbar button:hover {
    background: #0069d9;
}

/* ========================================
   MAIN CARD
======================================== */

.main-content {
    width: 92%;
    max-width: 1300px;
    margin: 30px auto;
    padding: 25px 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* ========================================
   TITRES
======================================== */

h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #005b96;
}

/* ========================================
   FORMULAIRES PROFESSIONNELS MODERNES
======================================== */

.form-pro {
    max-width: 650px;
    margin: 20px auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.row {
    display: flex;
    gap: 20px;
}

.field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input,
.field select {
    height: 36px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #bbb;
    border-radius: 5px;
}

/* Checkbox */
.checkbox-line {
    margin-top: 5px;
}

.checkbox-line label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-line input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0066cc;
}

/* Boutons */
.btn-line {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 10px;
}

.btn-save,
.btn-cancel {
    padding: 8px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    border: none;
}

.btn-save {
    background: #0066cc;
    color: white;
}

.btn-save:hover {
    background: #0052a1;
}

.btn-cancel {
    background: #ddd;
    color: #333;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #ccc;
}

/* ========================================
   TABLEAUX
======================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #007bff;
    color: white;
    padding: 10px;
    font-size: 0.95rem;
}

table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
}

table tr:nth-child(even) {
    background: #f7f9fc;
}

table tr:hover {
    background: #eaf3ff;
}

table a {
    color: #007bff;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

/* ========================================
   LOGIN (isolÃ© et protÃ©gÃ©)
======================================== */

body.login-body {
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 360px;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-align: center;
}

.login-logo {
    width: 90px;
    margin-bottom: 8px;
}

.login-title {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 15px;
}

.login-card label {
    font-size: 14px;
    font-weight: 600;
}

.login-card input,
.login-card select {
    width: 100%;
    height: 34px !important;
    padding: 6px 10px !important;
    border: 1px solid #bbb !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.login-btn {
    width: 100%;
    padding: 9px 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 5px;
    background: #0066cc;
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.login-btn:hover {
    background: #0052a1;
}

.alert-danger {
    background: #ffd6d6;
    padding: 8px 10px;
    border-radius: 5px;
    margin-top: 12px;
    font-size: 14px;
    color: #a50000;
}


/* ========================================
   FLASH MESSAGES & FOOTER
======================================== */

.flash-container {
    margin-bottom: 15px;
}

.flash {
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.flash.success { background: #e3f6e8; color: #22693a; }
.flash.warning { background: #fff4d6; color: #8a6d1b; }
.flash.danger  { background: #ffe3e3; color: #a12222; }

.footer {
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    margin: 10px 0 5px;
}

/* ========================================
   GENERIC CARD
======================================== */

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* ========================================
   BUTTONS (GENERIC)
======================================== */

.btn,
.btn-small {
    display: inline-block;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    border: none;
    font-size: 0.9rem;
    padding: 7px 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover,
.btn-small:hover {
    background: #0069d9;
}

/* Version plus petite pour les liens Modifier */
.btn-small {
    padding: 4px 10px;
    font-size: 0.85rem;
}

/* ========================================
   TABLEAUX SPÃ‰CIFIQUES (search.html)
======================================== */

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.styled-table thead tr {
    background-color: #e6e6e6;
    border-bottom: 2px solid #000;
}

.styled-table th,
.styled-table td {
    border: 1px solid #000;
    padding: 6px 8px;
    vertical-align: top;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

.styled-table td.col-texte {
    white-space: pre-wrap;
}

/* ========================================
   PAGE ACCUEIL - TABLEAU DE BORD
======================================== */

.page-title,
.results-title {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* ========================================
   FORMULAIRE DE RECHERCHE (search.html)
======================================== */

.search-container {
    max-width: 1100px;
    margin: 0 auto 20px auto;
}

#search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 20px;
}

.search-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    font-weight: 600;
}

.search-grid label span {
    margin-bottom: 4px;
}

.search-grid select,
.search-grid input[type="text"],
.search-grid input[type="date"] {
    padding: 7px 10px;
    border-radius: 5px;
    border: 1px solid #cfd8dc;
    font-size: 0.9rem;
}

/* Champ Mots-clÃ©s sur toute la largeur */
.search-grid .full {
    grid-column: 1 / -1;
}

/* Case Ã  cocher "Important" alignÃ©e proprement */
.important-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* Boutons Rechercher / PDF */
.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* ========================================
   FORMULAIRE DE SAISIE (saisie.html)
======================================== */

.form-transmission {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Ligne de 2 colonnes */
.form-transmission > label {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    font-weight: 600;
}

.form-transmission > label input,
.form-transmission > label select {
    margin-top: 4px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #cfd8dc;
    font-size: 0.9rem;
}

/* Groupe DurÃ©e + Important */
.form-transmission .line-inline {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 4px;
}

.form-transmission .line-inline .field-inline {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-transmission .line-inline .field-inline input[type="number"] {
    margin-top: 4px;
    width: 90px;
    height: 32px;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #cfd8dc;
    font-size: 0.9rem;
}

/* Case Ã  cocher Important dans la ligne */
.form-transmission .line-inline .check-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
}

.form-transmission .line-inline .check-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #d9534f;
}

/* Zone de texte */
.form-transmission textarea[name="texte"] {
    margin-top: 4px;
    min-height: 220px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 0.95rem;
    resize: vertical;
}

/* Bouton d'enregistrement */
.form-transmission button[type="submit"] {
    align-self: flex-end;
    margin-top: 10px;
    padding: 9px 20px;
    background: #007bff;
    color: #fff;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Petit texte en bas de page */
.footer-page {
    margin-top: 16px;
    font-size: 0.8rem;
    color: #777;
    text-align: right;
}
/* --- Bouton Déconnexion (couleur différente) --- */
.btn-logout {
    background-color: #003f6b !important;  /* rouge doux professionnel */
    color: white !important;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: #c9302c !important;  /* rouge + foncé au hover */
}
.badge-confidentiel {
    display: inline-block;
    background-color: #005b96; /* bleu Cordia */
    color: white;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}
/* ---- BADGE CONFIDENTIEL ---- */

.badge-confidentiel {
    display: inline-block;
    background-color: #005B96;   /* Bleu Cordia */
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.80rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.header h1 {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.subtitle {
    font-size: 0.6em;
    font-weight: normal;
   
}
.transmission-social {
    background-color: #fde8ec;
}
/* Social : rosé léger */
.t-fonction-social td { background-color: #fde8ec; }

/* Médical : saumon clair */
.t-fonction-medical td { background-color: #ffe2d6; }

/* Vie quotidienne : bleu gris clair */
.t-fonction-vie td { background-color: #e6edf2; }

/* Psychologue : vert de gris clair */
.t-fonction-psy td { background-color: #e4f0ec; }
.phrase-du-jour {
    margin: 15px 0 20px 0;
    padding: 10px 14px;
    background-color: #f5f7fa;
    border-left: 4px solid #6c8ebf;
    font-style: italic;
    color: #333;
}
