/* ============================================================
   style.css — Feuille de style GLOBALE de l'application
   Utilisée par toutes les pages : accueil.html, etc.
   
   Organisation :
     1. Variables & thème
     2. Reset & base
     3. Typographie (h1, h2, p…)
     4. Composants réutilisables (boutons, tags)
     5. Navigation bar (commune à toutes les pages)
   ============================================================ */


/* ── 1. VARIABLES & THÈME ───────────────────────────────────
   Modifiez ces valeurs pour changer l'apparence globale
   de l'application en un seul endroit.
   ─────────────────────────────────────────────────────────── */
:root {
  /* Fond dégradé principal (marron-noir, appliqué sur body) */
  --bg-gradient: linear-gradient(160deg, #1a0f0a 0%, #0d0703 40%, #000000 100%);

  /* Couleurs de surface (cards, sections) */
  --surface-1: rgba(255, 255, 255, 0.05);   /* surface légère, subtile */
  --surface-2: rgba(255, 255, 255, 0.08);   /* surface légèrement plus visible */
  --border:    rgba(255, 255, 255, 0.10);   /* bordures subtiles */

  /* Couleurs de texte */
  --text-primary:   #f0e6d8;               /* texte principal (crème chaud) */
  --text-secondary: rgba(240, 230, 216, 0.55); /* texte secondaire, discret */

  /* Couleur d'accent */
  --accent:         #c47a3a;               /* marron doré — appels à l'action */
  --accent-dark:    #9a5a20;               /* variante foncée de l'accent */

  /* Coins arrondis */
  --radius-btn: 50px;    /* boutons : très arrondis mais pas ronds */
  --radius-tag: 999px;   /* tags : pilule complète */
  --radius-card: 16px;   /* cards / sections */

  /* Espacement */
  --page-padding: 16px;  /* marge latérale des pages */

  /* Navigation bar */
  --navbar-height: 68px;
  --navbar-bg:     rgba(10, 5, 2, 0.92);
  --navbar-border: rgba(255, 255, 255, 0.08);

  /* Typographie */
  --font-main: 'Poppins', sans-serif;
}


/* ── 2. RESET & BASE ────────────────────────────────────────
   Normalisation minimale : on évite les sur-resets inutiles.
   ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;        /* le dégradé reste fixe au scroll */
  color: var(--text-primary);
  min-height: 100dvh;
  /* Espace sous le contenu pour ne pas être masqué par la navbar */
  padding-bottom: var(--navbar-height);
}

/* Import de la police Poppins depuis Google Fonts
   (à placer aussi en <link> dans chaque page HTML pour le rendu) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');


/* ── 3. TYPOGRAPHIE ─────────────────────────────────────────
   Hiérarchie de titres uniforme sur toutes les pages.
   ─────────────────────────────────────────────────────────── */
h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}


/* ── 4. COMPOSANTS RÉUTILISABLES ────────────────────────────
   Boutons, tags — éléments présents sur plusieurs pages.
   ─────────────────────────────────────────────────────────── */

/* --- Bouton principal (plein, accent) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  border: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

/* Variante "accent" — bouton principal coloré */
.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  opacity: 0.88;
}

/* Variante "ghost" — bouton contour discret */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface-1);
}

/* --- Tag (étiquette pilule) --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-tag);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Variante "statut connecté" */
.tag--connected {
  background: rgba(80, 200, 100, 0.15);
  color: #6ddb82;
  border: 1px solid rgba(80, 200, 100, 0.3);
}

/* Point de statut animé dans le tag */
.tag--connected::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ddb82;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* --- Bouton icône (rond, dans le header) --- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-2);
}


/* ── 5. NAVIGATION BAR ──────────────────────────────────────
   Commune à toutes les pages.
   Positionnée en bas, fixe, avec effet verre dépoli.
   ─────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--navbar-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 8px;
}

/* Lien de navigation (icône + label) */
.navbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-main);
}

/* Icône dans la navbar */
.navbar__item svg,
.navbar__item .navbar__icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

/* État actif — page courante */
.navbar__item--active {
  color: var(--accent);
}

/* Indicateur sous l'icône active */
.navbar__item--active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -2px;
}
