/* ============================================
   Chanbé IA — 24h By Webcup
   Palette : lagon profond + corail — ancrage océan Indien
   Typo : Fraunces (display) + Inter (texte)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --lagon-900: #0a2e36;
  --lagon-700: #124a56;
  --lagon-500: #1c6b7a;
  --corail: #e8724c;
  --sable: #f7f2e9;
  --blanc: #ffffff;
  --gris-texte: #4a5560;
  --erreur: #c0392b;
  --rayon: 10px;
  --ombre: 0 4px 20px rgba(10, 46, 54, 0.08);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--lagon-900);
  background: var(--sable);
  line-height: 1.6;
}

h1, h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.15;
}

.hidden { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--blanc);
  border-bottom: 1px solid rgba(10, 46, 54, 0.08);
}

.brand {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--lagon-900);
}
.brand span { color: var(--corail); }

.topbar-actions { display: flex; gap: 0.75rem; }

/* ---------- Boutons ---------- */
.btn-plein, .btn-ghost {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.65rem 1.4rem;
  border-radius: var(--rayon);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-plein {
  background: var(--corail);
  color: var(--blanc);
}
.btn-plein:hover { background: #d4603a; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--lagon-900);
  border: 1px solid rgba(10, 46, 54, 0.2);
}
.btn-ghost:hover { background: rgba(10, 46, 54, 0.05); }

.btn-large { padding: 0.9rem 2.2rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  max-width: 720px;
  margin: 5rem auto;
  padding: 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--lagon-900);
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--gris-texte);
  margin-bottom: 2rem;
}

/* ---------- Modale ---------- */
.modale {
  position: fixed;
  inset: 0;
  background: rgba(10, 46, 54, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modale-contenu {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--ombre);
}

.modale-fermer {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gris-texte);
}

/* ---------- Formulaires ---------- */
form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lagon-900);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

input, textarea {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(10, 46, 54, 0.2);
  border-radius: var(--rayon);
  background: var(--sable);
}
input:focus, textarea:focus {
  outline: 2px solid var(--lagon-500);
  outline-offset: 1px;
}

.erreur { color: var(--erreur); font-size: 0.9rem; min-height: 1.2rem; }

/* ---------- Dashboard ---------- */
.dashboard {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.liste-items {
  display: grid;
  gap: 1rem;
}

.item-carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ombre);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.item-carte h3 { font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; }
.item-carte p { color: var(--gris-texte); font-size: 0.92rem; }

.item-actions { display: flex; gap: 0.5rem; }
.item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris-texte);
  font-size: 0.85rem;
}
.item-actions button:hover { color: var(--corail); }

.etat-vide {
  text-align: center;
  color: var(--gris-texte);
  padding: 3rem 1rem;
  background: var(--blanc);
  border-radius: var(--rayon);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--gris-texte);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .topbar { padding: 1rem; }
  .topbar-actions { gap: 0.4rem; }
  .btn-plein, .btn-ghost { padding: 0.55rem 1rem; font-size: 0.85rem; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
