/* ============================================================
   RamdaDocs - Version Temporaire
   CSS GLOBAL (commun à toutes les pages)
   ⚠️ Ce fichier ne doit PAS contenir de `* { ... }` agressif
   pour ne pas écraser les styles des vues.
   ============================================================ */

/* ===== Reset doux (respecte les vues) ===== */
html, body {
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f9;
  color: #222;
  min-height: 100vh;
}

/* ============================================================
   HEADER COMMUN (bouton retour + titre)
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #1e3a8a;
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  position: sticky;
  top: 0;
  z-index: 100;
  /* Le header ne doit pas intercepter les clics ailleurs */
  pointer-events: auto;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.badge {
  background: #f59e0b;
  color: #111;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.spacer { flex: 1; }

.btn-back {
  background: #fff;
  color: #1e3a8a;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-size: 0.95rem;
}
.btn-back:hover { background: #e0e7ff; }
.btn-back:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ============================================================
   CONTENEUR PRINCIPAL (pages simples)
   ⚠️ Nommé .main-container pour éviter les conflits avec
   d'éventuels .container dans les vues.
   ============================================================ */
.main-container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

/* ============================================================
   PAGE D'ACCUEIL
   ============================================================ */

/* Message de bienvenue */
.welcome {
  text-align: center;
  margin-bottom: 30px;
  color: #1e3a8a;
  font-weight: 500;
  font-size: 1.4rem;
}

/* Grille 2 colonnes */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}

/* Carte de groupe */
.card-group {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.card-group h3 {
  margin: 0 0 16px 0;
  color: #1e3a8a;
  border-bottom: 2px solid #e0e7ff;
  padding-bottom: 8px;
  font-size: 1.15rem;
}

/* Lien qui englobe un bouton */
.card-link {
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
}
.card-link:last-child {
  margin-bottom: 0;
}

/* Bouton de carte (accueil) */
.card-btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  background: #eef2ff;
  color: #1e3a8a;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.card-btn:hover {
  background: #1e3a8a;
  color: #fff;
  transform: translateX(4px);
}
.card-btn:active {
  transform: translateX(2px);
}

/* ============================================================
   STYLES GÉNÉRIQUES POUR LES PAGES DE VUES
   (optionnels — au cas où la vue n'a pas son propre CSS)
   ============================================================ */

/* Une vue simple sans style propre */
.vue {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.vue-titre {
  color: #1e3a8a;
  margin: 0 0 20px 0;
  border-bottom: 2px solid #e0e7ff;
  padding-bottom: 10px;
}

.vue-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
}

.vue-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}

.vue-form select,
.vue-form input {
  padding: 10px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

/* ⚠️ S'assurer que les inputs sont toujours interactifs */
input, select, textarea, button {
  pointer-events: auto;
}

/* ============================================================
   PROTECTION : éviter que les vues désactivent les inputs
   ============================================================ */
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .6;
}
