/* === Variables globales === */
:root {
  --color-primary: #b30059;
  --color-secondary: #ff6699;
  --color-gray: #f2f2f2;
  --color-dark: #1f1f1f;
  --color-valid: #4CAF50;
  --color-waiting: #FFC107;
  --color-error: #F44336;
  --font-main: 'Segoe UI', sans-serif;
}

/* === Reset & base === */
body {
  margin: 0;
  font-family: var(--font-main);
  background-image: url('images/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #3a3a3a;
}

/* Overlay lisibilité */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.6);
  z-index: -1;
}

/* === Titres === */
h1, h2, h3 {
  color: var(--color-primary);
}

/* === NAVBAR === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.logo img {
  max-height: 60px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-dark);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* === Boutons === */
.cta,
.bouton-simple,
.bouton-formulaire,
.bouton-conversion {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  width: fit-content !important;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  border: none;
}

.bouton-simple {
  background-color: var(--color-primary);
}

.bouton-formulaire {
  background-color: var(--color-secondary);
  font-weight: bold;
}

.bouton-conversion {
  background-color: var(--color-dark);
}

/* === SEO CONTENT === */
.seo-content {
  max-width: 900px;
  margin: 2em auto;
  padding: 1.5em;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

/* === FOOTER === */
footer {
  background: #f2f2f2;
  padding: 2em;
  margin-top: 3em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  padding: 0;
  margin: 0 0 1em 0;
}

.footer-links a {
  color: var(--color-dark);
}

/* === Champs de formulaire === */
input[type="text"],
select {
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 1em;
}

input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* === Cellules === */
.cellule {
  padding: 1em;
  background-color: white;
  border: 1px solid #ddd;
  margin-bottom: 0.5em;
  border-radius: 4px;
}

.cellule.active {
  border-color: var(--color-primary);
  background-color: #ffe6f0;
}

.cellule:hover {
  background-color: #f9f9f9;
}

.valide { color: var(--color-valid); }
.attente { color: var(--color-waiting); }
.erreur { color: var(--color-error); }

/* === Profil utilisateur interne === */
.profil {
  display: flex;
  align-items: center;
  gap: 1em;
  background-color: white;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profil img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.profil-info {
  flex: 1;
}

.profil-info h3 {
  margin: 0;
  font-size: 1.1em;
}

.profil-info p {
  margin: 0.2em 0;
  font-size: 0.9em;
  color: #666;
}

/* === PROFILS API (ACCUEIL) === */
#profils-accueil {
  max-width: 900px;
  margin: 2em auto;
  padding: 1em;
  text-align: center;
}

.profils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1em;
  justify-items: center;
}

.profil-card {
  width: 140px;
  text-align: center;
  background: rgba(255,255,255,0.7);
  padding: 0.8em;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  text-decoration: none;
  color: var(--color-dark);
  transition: transform 0.2s ease;
}

.profil-card:hover {
  transform: scale(1.05);
}

.profil-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
}

.profil-card h3 {
  margin: 0.4em 0 0.2em;
  font-size: 0.95em;
}

.profil-card p {
  margin: 0;
  font-size: 0.85em;
  color: #555;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
  }

  .profil {
    flex-direction: column;
    align-items: flex-start;
  }

  .compteurs {
    flex-direction: column;
  }
}