/* GES-GROUPES — feuille de style unique, sobre et lisible */
:root {
  --fond: #f4f5f7;
  --carte: #ffffff;
  --texte: #1f2933;
  --discret: #616e7c;
  --bordure: #d9dee4;
  --accent: #1d5fbf;
  --accent-fonce: #164a96;
  --danger: #b42318;
  --succes-fond: #e6f4ea;
  --succes: #1e6b36;
  --info-fond: #e8f0fb;
  --erreur-fond: #fdecea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: .8rem 1rem;
  background: var(--accent);
  color: #fff;
}
.barre a, .barre .lien { color: #fff; text-decoration: none; }
.barre .marque { font-weight: 700; font-size: 1.15rem; }
.barre nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; }
.barre nav a:hover, .barre .lien:hover { text-decoration: underline; }

main { max-width: 960px; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.6rem; margin: .4rem 0; }
h2 { font-size: 1.25rem; margin: .3rem 0 .8rem; }
a { color: var(--accent); }

.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}
.etroite { max-width: 420px; margin: 3rem auto; }

summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: .3rem 0; }
details[open] > summary { margin-bottom: .8rem; }

.titre-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.adresse-groupe { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; margin: 0; }
.discret { color: var(--discret); font-size: .92rem; }
.vide { color: var(--discret); font-style: italic; }

/* Formulaires */
label { display: block; font-weight: 600; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: .25rem;
  padding: .6rem .7rem;
  font: inherit;
  border: 1px solid var(--bordure);
  border-radius: 7px;
  background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; }

.pile { display: grid; gap: .9rem; }
.ligne-form { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.ligne-form input { flex: 1 1 220px; margin: 0; }
.adresse-saisie { display: flex; align-items: center; gap: .4rem; }
.adresse-saisie input { flex: 1; }
.adresse-saisie span { font-weight: 400; white-space: nowrap; }
.enligne { display: inline; margin: 0; }
.boutons { display: flex; flex-wrap: wrap; gap: .8rem; }
hr { border: 0; border-top: 1px solid var(--bordure); margin: 1.2rem 0; }

/* Boutons */
button, .bouton {
  display: inline-block;
  padding: .6rem 1.1rem;
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--bordure);
  border-radius: 7px;
  background: #fff;
  color: var(--texte);
  cursor: pointer;
  text-decoration: none;
}
button:hover, .bouton:hover { border-color: var(--accent); }
.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.principal:hover { background: var(--accent-fonce); }
.danger { color: var(--danger); border-color: var(--danger); background: #fff; }
.danger:hover { background: var(--danger); color: #fff; }
.petit { padding: .3rem .7rem; font-size: .9rem; }
button.lien { background: none; border: 0; padding: 0; font-weight: 400; }

/* Messages */
.message { padding: .8rem 1rem; border-radius: 8px; margin: 1rem 0; background: var(--info-fond); }
.message.succes { background: var(--succes-fond); color: var(--succes); }
.message.erreur { background: var(--erreur-fond); color: var(--danger); }
.message ul { margin: .5rem 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; }

.badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .05rem .5rem;
  border-radius: 99px;
  background: #e4e7eb;
  color: var(--discret);
  font-size: .8rem;
  font-weight: 600;
  vertical-align: middle;
}

/* Tableaux */
table.liste {
  width: 100%;
  border-collapse: collapse;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  overflow: hidden;
}
.liste th, .liste td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.liste th { background: #eef1f4; font-size: .9rem; }
.liste tr:last-child td { border-bottom: 0; }
.liste tr.inactif { opacity: .6; }
.liste td.actions { text-align: right; width: 1%; white-space: nowrap; }
.liste form { margin: 0; }

/* Téléphone : chaque ligne devient une petite fiche */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .liste thead { display: none; }
  .liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr { border-bottom: 1px solid var(--bordure); padding: .4rem 0; }
  .liste td { border: 0; padding: .2rem .8rem; }
  .liste td[data-label]::before {
    content: attr(data-label) " : ";
    color: var(--discret);
    font-size: .85rem;
  }
  .liste td.actions { text-align: left; width: 100%; }
  .titre-ligne > .bouton, .titre-ligne > form { width: 100%; }
  .titre-ligne > .bouton, .titre-ligne button { width: 100%; text-align: center; }
}
