/* --- Existing CSS --- */
:root {
    --principale1: #0D5C63;
    --medium-teal: #2C5D63;
    --light-blue-bg: #EBF3F4;
    --card-bg: #FFFFFF;
    --lavender: #A599E9;
    --peach: #F4B886;
    --yellow: #F9D479;
    --light-green: #9FD8A7;
    --text-light: #FFFFFF;
    --text-dark: #000000;
    --text-secondary: #555555;
    --border-color: #dee2e6;
    --font-family: 'Nunto Sans', sans-serif;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --sidebar-width: 200px;
    --principale1: #184968;
    --principale2: #888DDB;
    --principale3: #5AA6CD;
    --principale4: #A4CD95;
    --secondaire1: #F6B484;
    --secondaire2: #F6C86E;
    --danger-back: #E4002A;
    --utilitaire2: #24875B;
    --utilitaire3: #FBCA29;
    --utilitaire4: #A51890;
}

/* --- Journal Page --- */

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--light-blue-bg);
  color: var(--text-dark);
}

.journal-page {
    background: var(--light-blue-bg);
    padding-bottom: 20px;
}

.journal-page .page-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--principale1);
  margin-bottom: 1.25rem;
}

.journal-section {
  background-color: var(--card-bg);
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.journal-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--principale1);
  margin-bottom: 1rem;
}

.segmented-control {
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d7dde1;
  background: #f8f9fa;
}

/* --- les boutons du formulaire -- */
.choice-btn {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  background-color: #f8f9fa;
  color: #4b5563;
  border: none;
  border-right: 1px solid #d7dde1;
}

.choice-btn:last-child {
  border-right: none;
}

.choice-btn:hover {
  background-color: #eef2f3;
}

.choice-btn--selected {
  background-color: var(--principale3);
  color: var(--text-light);
}

.choice-btn--selected:hover {
  background-color: var(--principale3);
}

/* Section notes du Journal */
.journal-notes {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: #f8f9fa;
  padding: 16px 18px;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-dark);
  box-sizing: border-box;
}

.journal-notes::placeholder {
  color: #6b7280;
}

.journal-notes:focus {
  outline: none;
  border-color: var(--medium-teal);
  box-shadow: 0 0 0 3px rgba(44, 93, 99, 0.15);
}

/* --- les boutons pour enregistrer, quitter, editer le formulaire --- */

.journal-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
  box-sizing: border-box;
}

.journal-btn:active {
  transform: translateY(1px);
}

.journal-btn:focus {
  outline: none;
}

.journal-btn:focus-visible {
  outline: 3px solid rgba(44, 93, 99, 0.25);
  outline-offset: 2px;
}

/* Bouton principal (teal foncé) */
.journal-btn-primary {
  background-color: var(--principale1);
  color: var(--text-light);
}

.journal-btn-primary:hover {
  background-color: #0b5057;
}

/* Bouton secondaire (contour teal) */
.secondary-btn {
  background-color: var(--secondaire1);
  color: var(--text-dark);
}

.secondary-btn:hover{
  background-color: var(--secondaire2);
}

.journal-btn-secondary:hover {
  background-color: rgba(13, 92, 99, 0.06);
}

/* Espace entre boutons d'action */
.journal-actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

/* Bouton supprimer (style outline rouge) */
.danger-btn {
  width: 100%;
  border-radius: 18px;
  background-color: var(--danger-back); 
  color: var(--text-light);          
  font-weight: 800;
  font-size: 1rem;
  padding: 18px 18px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* espace entre icône et texte */
}

.journal-btn-danger:hover {
  background-color: rgba(239, 51, 78, 0.06);
}

.journal-btn-danger:active {
  transform: translateY(1px);
}

.journal-btn-danger:focus-visible {
  outline: 3px solid rgba(239, 51, 78, 0.22);
  outline-offset: 2px;
}

/* Carte de synthèse */
.journal-summary-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

.journal-summary-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--principale1);
}

.journal-summary-content {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: #374151;
  font-size: 0.98rem;
}

/* Bouton "Éditer" dans la carte synthèse */
.journal-btn-edit {
  width: 100%;
  border-radius: 16px;
  border: 2px solid var(--principale1);
  background-color: #ffffff;
  color: var(--principale1);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 18px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

.journal-btn-edit:hover {
  background: rgba(13, 92, 99, 0.06);
}

.journal-btn-edit:active {
  transform: translateY(1px);
}

.journal-btn-edit:focus-visible {
  outline: 3px solid rgba(44, 93, 99, 0.25);
  outline-offset: 2px;
}

/* Variante quand il n'y a pas encore de synthèse */
.journal-empty-state {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
}

/* --- Page Fichiers --- */
.files-page {
  background: var(--light-blue-bg);
}

.files-page .page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--principale1);
  margin-bottom: 1rem;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    margin-bottom: 1.5rem;
}
.drop-zone:hover, .drop-zone.dragover {
    background-color: #e9ecef;
    border-color: var(--medium-teal);
}

.drop-zone-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.drop-zone-subtext {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Champ texte temporaire (remplace upload) */
.upload-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 1rem 0;
}

/* input non utilisé
.upload-input {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 0 16px;
  font-size: 1rem;
  font-family: var(--font-family);
  background-color: #ffffff;
  color: var(--text-dark);
}
  */

.primary-btn {
  height: 50px;
  border-radius: 12px;
  border: none;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  background-color: var(--principale1);
  color: var(--text-light);
}

.primary-btn:hover {
  background-color: var(--principale2);
}

.drop-zone-formats {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  min-height: 60px;
}

/* Filtres */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background-color: #e9ecef;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 160px;
}

.filter-tab.active {
  background-color: var(--principale3);
  color: var(--text-light);
}

/* --- Practitioners Page --- */
.praticiens-page {
    background: var(--light-blue-bg);
    padding: 20px;
    min-height: 100vh;
}

.praticiens-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--principale1);
    margin: 0 0 1rem 0;
}

.praticiens-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.praticiens-add-btn {
    background-color: var(--principale1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: opacity 0.2s ease;
}

.praticiens-add-btn:hover {
    opacity: 0.92;
}


/* --- Formulaire --- */
.formulaire {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.praticiens-input {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0 18px;
    font-size: 1rem;
    font-family: var(--font-family);
    background-color: #F8F9FA;
    color: var(--text-dark);
}

.formulaire-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.praticiens-save-btn,
.praticiens-cancel-btn,
.practitioner-edit-btn,
.practitioner-delete-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.praticiens-save-btn {
    background-color: var(--principale1);
    color: white;
}

.praticiens-cancel-btn {
    background-color: #e9ecef;
    color: var(--text-dark);
}

.practitioner-edit-btn {
    background-color: #eef6f7;
    color: var(--principale1);
}

.practitioner-delete-btn {
    background-color: #fbeaea;
    color: #b42318;
}

.praticiens-save-btn:hover,
.praticiens-cancel-btn:hover,
.practitioner-edit-btn:hover,
.practitioner-delete-btn:hover {
    opacity: 0.9;
}


/* --- Practitioners List --- */
.practitioner-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

.practitioner-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.practitioner-header {
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.practitioner-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.practitioner-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--principale1);
}

.practitioner-specialty {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.practitioner-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.practitioner-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.practitioner-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.practitioner-detail .icon {
    min-width: 90px;
    color: var(--medium-teal);
    flex-shrink: 0;
    display: inline-block;
    font-weight: 700;
}

.practitioner-detail span {
    color: var(--text-dark);
}

/* --- Profile Page --- */
.profile-page {
    background: var(--light-blue-bg);
    padding: 0 20px 20px;
}

.profile-page .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--principale1);
    margin-bottom: 1rem;
}

.profile-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.profile-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--principale1);
    margin: -20px -20px 1rem;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.profile-section-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.profile-field {
    margin-bottom: 1rem;
}
.profile-field:last-child {
    margin-bottom: 0;
}
.profile-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.profile-value {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.4;
}
.profile-value.textarea {
    white-space: pre-wrap;
}
.profile-input {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0 20px;
    font-size: 1rem;
    font-family: var(--font-family);
    background-color: #F8F9FA;
    color: var(--text-dark);
    box-sizing: border-box;
}
.profile-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    font-size: 1rem;
    font-family: var(--font-family);
    background-color: #F8F9FA;
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
    color: var(--text-dark);
    box-sizing: border-box;
}
.save-profile-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    background-color: var(--principale1);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 800;
    border-radius: 16px;
    transition: background-color 0.2s, transform 0.1s;
}

.save-profile-btn:hover {
    background-color: #0b5057;
}

/* --- Sidebar & Desktop Layout --- */
@media (min-width: 1024px) {
    .app-footer {
        display: none;
    }
    .fab {
        bottom: 40px;
        right: 40px;
        left: auto;
        transform: none;
    }
    .app-sidebar {
        width: var(--sidebar-width);
        flex-shrink: 0;
        background-color: var(--principale1);
        color: var(--text-light);
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
    }
    .sidebar-logo {
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--text-light);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 2.5rem;
    }
    .sidebar-logo .icon {
        color: var(--light-green);
    }

    .sidebar-nav {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .sidebar-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .sidebar-nav-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        color: #a8dadc;
        text-decoration: none;
        font-weight: 700;
        transition: background-color 0.2s, color 0.2s;
        cursor: pointer;
    }
    .sidebar-nav-link .icon {
        width: 24px;
        height: 24px;
    }
    .sidebar-nav-link:hover {
        background-color: var(--principale3);
        opacity: 0.5;
        color: var(--text-light);
    }
    .sidebar-nav-link.active {
        background-color: var(--principale3);
        color: var(--text-light);
    }
    .sidebar-footer-nav {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 1rem;
        margin-top: 1rem;
    }

    .app-content-wrapper {
        flex-grow: 1;
        margin-left: var(--sidebar-width);
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow-y: auto;
        background-color: var(--light-blue-bg); 
        padding: 0 24px 24px 24px;
    }
    .app-header {
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
    }

    .app-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--principale1);
    }
    
    .app-main {
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
        padding: 0 40px 40px 60px;
    }
}
