/* Identité visuelle reprise du site public du cabinet (~/Sites/cabinet-dentaire/style.css)
   pour que l'intranet et le site vitrine se ressemblent. */

:root {
  --cream: #faf3ea;
  --cream-alt: #f2e8d9;
  --card-bg: #fffdf9;
  --text-dark: #4a3826;
  --text-muted: #7a6a58;
  --bronze: #a8804f;
  --bronze-dark: #8a6539;
  --gold-light: #c9a876;
  --border-soft: #e8dcc8;
  --shadow-soft: 0 4px 20px rgba(74, 56, 38, 0.08);
  --shadow-lift: 0 14px 34px rgba(74, 56, 38, 0.14);
  --sidebar-width: 260px;
}

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

body {
  font-family: "Poppins", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", "Georgia", serif;
  font-weight: 600;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: var(--bronze);
}

a:hover {
  color: var(--bronze-dark);
}

/* ---------- Connexion (pas de sidebar) ---------- */
.page-connexion {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-alt) 0%, var(--cream) 100%);
}

.carte-connexion {
  background: var(--card-bg);
  padding: 2.8rem 2.6rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.carte-connexion img {
  height: 56px;
  margin-bottom: 1.2rem;
}

/* ---------- Layout général (sidebar + contenu) ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--text-dark);
  color: var(--cream-alt);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 1.8rem 1.6rem 1.4rem;
  border-bottom: 1px solid rgba(250, 243, 234, 0.12);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sidebar-brand img {
  height: 40px;
  filter: brightness(0) invert(1) opacity(0.9);
}

.sidebar-brand-text {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  line-height: 1.3;
}

.sidebar-brand-text span {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 0.2rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 0.9rem;
  gap: 0.2rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(250, 243, 234, 0.8);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: rgba(250, 243, 234, 0.08);
  color: var(--cream);
}

.sidebar-nav a.actif {
  background: var(--bronze);
  color: var(--cream);
  font-weight: 500;
}

.lien-gauche {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icone-nav {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.badge-notif {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  padding: 0 4px;
}

.sidebar-user {
  padding: 1.2rem 1.6rem 1.6rem;
  border-top: 1px solid rgba(250, 243, 234, 0.12);
}

.sidebar-user-name {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--cream);
}

.sidebar-user-role {
  font-size: 0.78rem;
  color: var(--gold-light);
  margin-bottom: 0.9rem;
}

.sidebar-user form button {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(250, 243, 234, 0.25);
  color: rgba(250, 243, 234, 0.85);
  padding: 0.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-user form button:hover {
  background: rgba(250, 243, 234, 0.1);
  border-color: var(--gold-light);
}

.content {
  flex: 1;
  padding: 2.4rem 3rem;
  max-width: 1100px;
}

/* ---------- Composants ---------- */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.6rem;
}

.carte {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
  border-top: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grille-tableau-bord .carte:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

/* Un accent de couleur différent par type de contenu, pour casser la monotonie d'une
   grille de cartes toutes identiques. */
.carte-agenda { border-top-color: #2f6fed; }
.carte-annonces { border-top-color: var(--gold-light); }
.carte-messagerie { border-top-color: var(--bronze); }
.carte-conges { border-top-color: #e0a800; }

.grille-tableau-bord {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.en-tete-accueil {
  background: linear-gradient(135deg, var(--cream-alt) 0%, var(--cream) 100%);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-soft);
}

.en-tete-accueil h1 {
  font-size: 1.8rem;
  margin: 0.2rem 0 0;
}

.message {
  border-bottom: 1px solid var(--border-soft);
  padding: 0.8rem 0;
}

.message:last-child {
  border-bottom: none;
}

.message-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.liste-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 0.6rem 0;
}

.liste-item:last-child {
  border-bottom: none;
}

.erreur {
  color: #a3372f;
  background: rgba(163, 55, 47, 0.08);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.ok {
  color: #3d7a3d;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 30px;
  background: rgba(201, 168, 118, 0.2);
  color: var(--bronze-dark);
}

/* Variantes de couleur, appliquées en plus de .badge — doivent rester APRÈS .badge
   dans ce fichier pour que le fond/couleur spécifique l'emporte sur les valeurs par défaut. */
.badge-attente {
  background: rgba(224, 168, 0, 0.16);
  color: #8a6d00;
}

.badge-ok {
  background: rgba(61, 122, 61, 0.14);
  color: #2f5f2f;
}

.badge-refus {
  background: rgba(163, 55, 47, 0.12);
  color: #a3372f;
}

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

th, td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Formulaires */
input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-dark);
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bronze);
}

label {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1rem;
}

button, .bouton {
  display: inline-block;
  background: var(--bronze);
  color: var(--cream);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

button:hover, .bouton:hover {
  background: var(--bronze-dark);
  transform: translateY(-1px);
}

.lien-retour {
  display: inline-block;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.lien-retour:hover {
  color: var(--bronze);
}

@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-user {
    border-top: none;
    padding: 0.8rem 1rem;
  }
  .content {
    padding: 1.6rem;
  }
}

@media print {
  .sidebar, .pas-impression, .lien-retour { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .carte { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
