/* ============================================================
   EXTRANET XFORCE — Feuille de styles commune
   Palette : orange #EC6A24 · anthracite #3B3B3B · fond #F2F2F2
   ============================================================ */

:root {
  --orange:      #EC6A24;
  --orange-dark: #C9550F;
  --anthracite:  #3B3B3B;
  --gris-fond:   #F2F2F2;
  --gris-bord:   #C9CDD2;
  --gris-texte:  #6B7076;
  --erreur:      #B3261E;
  --succes:      #1E6B3A;
  --rayon:       10px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gris-fond);
  color: var(--anthracite);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
}

/* ── Carte (login, modales, blocs centrés) ── */
.carte {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
  border-top: 6px solid var(--orange);
  padding: 32px 32px 28px;
}

/* ── Logo ── */
.logo {
  display: block;
  width: 200px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 24px;
}

/* ── Titres ── */
h1 {
  margin: 0 0 24px;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

h2 {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ── Formulaires ── */
.champ { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: .9rem;
  font-weight: 600;
}

.saisie { position: relative; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 1rem;
  color: var(--anthracite);
  background: #fff;
  border: 1.5px solid var(--gris-bord);
  border-radius: var(--rayon);
  transition: border-color .15s, box-shadow .15s;
}

textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(236, 106, 36, .18);
}

.aide {
  margin: 6px 0 0;
  font-size: .8rem;
  color: var(--gris-texte);
}

/* Bouton œil (afficher/masquer mot de passe) */
.oeil {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--gris-texte);
  cursor: pointer;
}
.oeil:hover { color: var(--anthracite); }
.oeil:focus-visible { outline: 3px solid rgba(236, 106, 36, .5); }
.oeil svg { width: 22px; height: 22px; }

#password { padding-right: 48px; }

/* ── Alertes ── */
.alerte {
  margin: 0 0 18px;
  padding: 10px 14px;
  font-size: .9rem;
  border-radius: 6px;
}

.alerte-erreur {
  color: var(--erreur);
  background: #FCEDEC;
  border-left: 4px solid var(--erreur);
}

.alerte-succes {
  color: var(--succes);
  background: #EAF5EE;
  border-left: 4px solid var(--succes);
}

/* ── Boutons ── */
.btn {
  height: 48px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--rayon);
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(236, 106, 36, .5); outline-offset: 2px; }

.btn-primary {
  color: #fff;
  background: var(--orange);
  border: 0;
  width: 100%;
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary {
  color: var(--anthracite);
  background: #fff;
  border: 1.5px solid var(--gris-bord);
}
.btn-secondary:hover { background: var(--gris-fond); }

.btn-danger {
  color: #fff;
  background: var(--erreur);
  border: 0;
}
.btn-danger:hover { background: #8c1c16; }

/* Groupe de 2 boutons côte à côte */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.actions.actions-simple {
  grid-template-columns: 1fr;
}

/* ── Navigation / Header ── */
.header {
  background: var(--anthracite);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header .logo-header {
  height: 36px;
  width: auto;
}

.header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-size: .95rem;
  opacity: .85;
  transition: opacity .15s;
}
.header nav a:hover { opacity: 1; }

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-enseigne {
  font-size: .85rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: .04em;
}

.btn-deconnexion {
  height: 34px;
  padding: 0 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--anthracite);
  background: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-deconnexion:hover { background: var(--gris-fond); color: var(--anthracite); text-decoration: none; }

/* ── Contenu principal ── */
.conteneur {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px;
}

/* ── Tableau ── */
.tableau-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

thead {
  background: var(--anthracite);
  color: #fff;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .03em;
}

tbody tr { border-bottom: 1px solid var(--gris-fond); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #faf8f6; }

tbody td {
  padding: 12px 16px;
  color: var(--anthracite);
}

/* ── Badges statut ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}

.badge-en-cours  { background: #FFF3E0; color: #E65100; }
.badge-valide    { background: #E8F5E9; color: #2E7D32; }
.badge-annule    { background: #FFEBEE; color: var(--erreur); }

/* ── Liens ── */
a {
  color: var(--orange);
  text-decoration: none;
}
a:hover { color: var(--orange-dark); text-decoration: underline; }

.lien {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: .9rem;
  color: var(--gris-texte);
  text-decoration: none;
}
.lien:hover { color: var(--orange-dark); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .carte { padding: 24px 20px; }
  .actions { grid-template-columns: 1fr; }
  .conteneur { padding: 0 16px; margin: 20px auto; }
  thead { display: none; }
  tbody tr { display: block; margin-bottom: 12px; background: #fff; border-radius: 8px; padding: 12px; }
  tbody td { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--gris-fond); }
  tbody td::before { content: attr(data-label); font-weight: 600; color: var(--gris-texte); }
}
