/* ============================================================
   Clair Ressenti — Design v5.4
   Thème clair : scientifique-spirituel
   Palette : bleu pastel, lavande, crème, doré
   Polices : Playfair Display (titres) + Inter (corps)
   Feuille additive — s'ajoute par-dessus l'existant sans tout casser
   ============================================================ */

/* ---- 1. Variables racines ---- */
:root {
  /* Palette principale */
  --cr-cream:        #f5f1e8;
  --cr-cream-light:  #faf7f0;
  --cr-blue-pastel:  #a8c5d6;
  --cr-lavender:     #b8a9c9;
  --cr-gold:         #c9a96e;
  --cr-gold-light:   #e0c98a;
  --cr-gold-dark:    #a88a4f;
  --cr-text:         #2c2c2c;
  --cr-text-muted:   #6b6b6b;
  --cr-white:        #fffdf8;
  --cr-card-bg:      #fffdf8;
  --cr-border:       #e8e0d0;
  --cr-border-gold:  #c9a96e;
  --cr-shadow:       0 2px 12px rgba(44, 44, 44, 0.06);
  --cr-shadow-hover: 0 4px 20px rgba(44, 44, 44, 0.10);
  --cr-radius:       14px;
  --cr-radius-sm:    8px;
  --cr-transition:   0.25s ease;

  /* Polices */
  --cr-font-title:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --cr-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- 2. Importation des polices Google ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;400;500;600;700&display=swap');

/* ---- 3. Base & typographie ---- */
body {
  background-color: var(--cr-cream);
  color: var(--cr-text);
  font-family: var(--cr-font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cr-font-title);
  font-weight: 600;
  color: var(--cr-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p {
  font-family: var(--cr-font-body);
  color: var(--cr-text);
  line-height: 1.7;
}

a {
  color: var(--cr-gold-dark);
  text-decoration: none;
  transition: color var(--cr-transition);
}

a:hover {
  color: var(--cr-gold);
  text-decoration: underline;
}

/* ---- 4. Navigation ---- */
nav, .nav, .navbar, header.navbar {
  background: var(--cr-cream-light);
  border-bottom: 1px solid var(--cr-border);
  box-shadow: 0 1px 8px rgba(44, 44, 44, 0.04);
  font-family: var(--cr-font-body);
}

nav a, .nav a, .navbar a {
  color: var(--cr-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: color var(--cr-transition), border-color var(--cr-transition);
  border-bottom: 2px solid transparent;
}

nav a:hover, .nav a:hover, .navbar a:hover {
  color: var(--cr-gold-dark);
  text-decoration: none;
  border-bottom-color: var(--cr-gold);
}

nav a.active, .nav a.active, .navbar a.active {
  color: var(--cr-gold-dark);
  border-bottom-color: var(--cr-gold);
}

/* ---- 5. Cartes ---- */
.card, .panel, .box, .widget {
  background: var(--cr-card-bg);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  box-shadow: var(--cr-shadow);
  padding: 1.5rem;
  transition: box-shadow var(--cr-transition), transform var(--cr-transition);
}

.card:hover, .panel:hover, .box:hover {
  box-shadow: var(--cr-shadow-hover);
  transform: translateY(-2px);
}

/* Variante dorée */
.card-gold, .card.highlight, .panel.highlight {
  border: 1px solid var(--cr-border-gold);
  border-top: 3px solid var(--cr-gold);
}

/* ---- 6. Boutons ---- */
.btn, button, input[type="submit"], input[type="button"] {
  font-family: var(--cr-font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--cr-radius-sm);
  border: 1px solid var(--cr-gold);
  background: var(--cr-gold);
  color: var(--cr-white);
  cursor: pointer;
  transition: all var(--cr-transition);
  display: inline-block;
  text-align: center;
  line-height: 1.4;
}

.btn:hover, button:hover, input[type="submit"]:hover {
  background: var(--cr-gold-dark);
  border-color: var(--cr-gold-dark);
  box-shadow: 0 3px 10px rgba(201, 169, 110, 0.3);
  transform: translateY(-1px);
}

/* Variante secondaire */
.btn-secondary, .btn-outline {
  background: transparent;
  color: var(--cr-gold-dark);
  border: 1px solid var(--cr-gold);
}

.btn-secondary:hover, .btn-outline:hover {
  background: var(--cr-gold);
  color: var(--cr-white);
}

/* Variante pastel */
.btn-pastel {
  background: var(--cr-blue-pastel);
  border-color: var(--cr-blue-pastel);
  color: var(--cr-text);
}

.btn-pastel:hover {
  background: #8fb4c8;
  border-color: #8fb4c8;
}

/* ---- 7. Inputs & formulaires ---- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  font-family: var(--cr-font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-white);
  color: var(--cr-text);
  transition: border-color var(--cr-transition), box-shadow var(--cr-transition);
  width: 100%;
  box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--cr-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  font-family: var(--cr-font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--cr-text);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---- 8. Tableaux ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--cr-font-body);
  font-size: 0.9rem;
  background: var(--cr-card-bg);
  border-radius: var(--cr-radius);
  overflow: hidden;
  box-shadow: var(--cr-shadow);
}

thead {
  background: var(--cr-blue-pastel);
}

thead th {
  color: var(--cr-text);
  font-weight: 600;
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--cr-gold);
}

tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--cr-border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--cr-cream-light);
}

/* ---- 9. Badges & tags ---- */
.badge, .tag, .label-pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--cr-font-body);
}

.badge-gold {
  background: rgba(201, 169, 110, 0.15);
  color: var(--cr-gold-dark);
  border: 1px solid rgba(201, 169, 110, 0.3);
}

.badge-blue {
  background: rgba(168, 197, 214, 0.25);
  color: #4a7a96;
  border: 1px solid rgba(168, 197, 214, 0.4);
}

.badge-lavender {
  background: rgba(184, 169, 201, 0.25);
  color: #6b5a80;
  border: 1px solid rgba(184, 169, 201, 0.4);
}

/* ---- 10. Bannière / hero ---- */
.hero, .banner, .header-banner {
  background: linear-gradient(135deg, var(--cr-cream) 0%, var(--cr-blue-pastel) 40%, var(--cr-lavender) 100%);
  border-radius: var(--cr-radius);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--cr-shadow);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero h1, .banner h1 {
  font-family: var(--cr-font-title);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cr-text);
  margin-bottom: 0.5rem;
}

.hero .tagline, .banner .tagline {
  font-family: var(--cr-font-body);
  font-size: 1.1rem;
  color: var(--cr-text-muted);
  font-style: italic;
  font-weight: 300;
}

/* ---- 11. Séparateurs décoratifs ---- */
.divider-gold {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cr-gold), transparent);
  border: none;
  margin: 2rem 0;
}

/* ---- 12. Alertes & notifications ---- */
.alert, .notification, .flash {
  border-radius: var(--cr-radius-sm);
  padding: 1rem 1.2rem;
  font-family: var(--cr-font-body);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-info, .notification-info {
  background: rgba(168, 197, 214, 0.15);
  border-left-color: var(--cr-blue-pastel);
  color: #3a6a86;
}

.alert-success, .notification-success {
  background: rgba(201, 169, 110, 0.12);
  border-left-color: var(--cr-gold);
  color: var(--cr-gold-dark);
}

.alert-warning {
  background: rgba(184, 169, 201, 0.15);
  border-left-color: var(--cr-lavender);
  color: #6b5a80;
}

.alert-error, .alert-danger {
  background: rgba(200, 80, 80, 0.08);
  border-left-color: #c85050;
  color: #8a3838;
}

/* ---- 13. Footer ---- */
footer, .footer {
  background: var(--cr-cream-light);
  border-top: 1px solid var(--cr-border);
  padding: 2rem 1.5rem;
  font-family: var(--cr-font-body);
  font-size: 0.85rem;
  color: var(--cr-text-muted);
  text-align: center;
}

footer a, .footer a {
  color: var(--cr-gold-dark);
}

/* ---- 14. Utilitaires ---- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--cr-text-muted); }
.text-gold   { color: var(--cr-gold-dark); }
.font-title  { font-family: var(--cr-font-title); }
.font-body   { font-family: var(--cr-font-body); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.gradient-text-gold {
  background: linear-gradient(135deg, var(--cr-gold), var(--cr-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 15. Animations subtiles ---- */
@keyframes cr-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cr-glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(201, 169, 110, 0.2); }
  50%      { box-shadow: 0 0 15px rgba(201, 169, 110, 0.4); }
}

.animate-fade-in {
  animation: cr-fade-in 0.5s ease-out;
}

.glow-pulse {
  animation: cr-glow-pulse 3s ease-in-out infinite;
}

/* ---- 16. Barre de progression / métriques ---- */
.progress-bar, .meter {
  width: 100%;
  height: 8px;
  background: var(--cr-border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .fill, .meter .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cr-blue-pastel), var(--cr-gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---- 17. Conteneur principal ---- */
.container, .main, .content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ---- 18. Responsive ---- */
@media (max-width: 768px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  .hero, .banner, .header-banner {
    padding: 1.5rem;
  }

  .hero h1, .banner h1 {
    font-size: 1.8rem;
  }

  .hero .tagline, .banner .tagline {
    font-size: 0.95rem;
  }

  .card, .panel, .box, .widget {
    padding: 1rem;
  }

  .container, .main, .content {
    padding: 1rem;
  }

  nav, .nav, .navbar {
    padding: 0.5rem;
  }

  nav a, .nav a, .navbar a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  table {
    font-size: 0.8rem;
  }

  thead th, tbody td {
    padding: 0.5rem 0.6rem;
  }

  .btn, button {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .hero h1, .banner h1 { font-size: 1.5rem; }
  .card, .panel, .box { padding: 0.8rem; }
}

/* ---- 19. Print-friendly ---- */
@media print {
  body {
    background: white;
    color: black;
  }

  .card, .panel, .box {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  nav, footer, .btn, button {
    display: none;
  }
}

/* ---- 20. Scrollbar styling (subtle) ---- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--cr-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--cr-border);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cr-gold-light);
}

/* ============================================================
   Fin — Design v5.4 — Clair Ressenti
   ============================================================ */