/* Minimal, volontairement : un outil interne pour dix entreprises
   partenaires, pas une vitrine. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
}

h1 {
  font-size: 1.25rem;
  margin: 0;
}

.page-connexion {
  max-width: 360px;
  margin: 4rem auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sous-titre {
  color: #666;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

form label {
  display: block;
  font-size: 0.85rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

form input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #1a56db;
  color: white;
  font-size: 0.95rem;
}

button:disabled {
  background: #999;
  cursor: not-allowed;
}

form button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.65rem;
}

.message-erreur {
  color: #b91c1c;
  background: #fee2e2;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.separateur {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

.separateur::before,
.separateur::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}

.separateur span {
  padding: 0 0.75rem;
}

.bouton-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  color: #1a1a1a;
  font-size: 0.95rem;
  text-decoration: none;
  box-sizing: border-box;
}

.bouton-google:hover {
  background: #f5f5f5;
}

/* `display: flex` l'emporterait sur l'attribut `hidden` : le bouton Google
   et son « ou » ne s'affichent que si Google est configuré (13.10.2026). */
.separateur[hidden],
.bouton-google[hidden] {
  display: none;
}

/* « Mot de passe oublié ? » — un lien, pas un second bouton bleu. */
.lien-oubli {
  margin: 0.75rem 0 0;
  text-align: center;
}

.lien-discret {
  padding: 0;
  background: none;
  color: #1a56db;
  font-size: 0.85rem;
  text-decoration: underline;
}

.formulaire-oubli {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
}

.formulaire-oubli .succes {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.entete button {
  background: #e5e7eb;
  color: #1a1a1a;
}

.page-tableau-de-bord {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th, td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

th {
  background: #f0f0f0;
  font-weight: 600;
}

td select {
  padding: 0.3rem;
  margin-right: 0.5rem;
}

/* Sortie de secours vers le site public : sans elle, quelqu'un qui arrive
   par erreur sur la connexion partenaire n'a aucun chemin de retour. */
.retour-site {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}

.retour-site a {
  color: #666;
  text-decoration: none;
}

.retour-site a:hover {
  color: #1a56db;
  text-decoration: underline;
}

/* ---------- Dossiers chauffeur (dossiers.js, documents.js) ---------- */
.section-dossiers { margin-top: 2.5rem; }
.section-dossiers h2 { margin-top: 2rem; }
.aide { color: #666; font-size: 0.85rem; }
.dossier {
  background: white; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.dossier h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.dossier p { margin: 0.25rem 0; }
.documents-lus { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.documents-lus a {
  padding: 0.35rem 0.7rem; border-radius: 6px; background: #eef2ff; color: #1a56db;
  text-decoration: none; font-size: 0.85rem;
}
.attestations { border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.75rem 1rem; margin: 0.75rem 0; }
.attestations legend { font-size: 0.85rem; font-weight: 600; padding: 0 0.25rem; }
.case { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.9rem; margin: 0.4rem 0; }
.case input { width: auto; margin-top: 0.2rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
button.principal { background: #1a56db; color: white; border-color: #1a56db; }
.succes { background: #ecfdf5; border-radius: 8px; padding: 0.75rem 1rem; }
.succes .lien { width: 100%; font-family: ui-monospace, monospace; font-size: 0.8rem; margin: 0.5rem 0; }
.inscription-directe { background: white; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); max-width: 640px; }
.inscription-directe select { width: 100%; padding: 0.5rem; }
.inscription-directe details { margin: 1rem 0; }
.document { border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.75rem; margin: 0.5rem 0; }
.document-tete { display: flex; justify-content: space-between; gap: 0.5rem; }
.document-etat { font-size: 0.8rem; color: #666; }
.document-etat.ok { color: #047857; font-weight: 600; }
.bouton.secondaire { display: inline-block; margin-top: 0.4rem; padding: 0.4rem 0.7rem; border-radius: 6px; background: #eef2ff; color: #1a56db; cursor: pointer; font-size: 0.85rem; }
.apercus { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.vignette { position: relative; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.vignette button { position: absolute; top: 0; right: 0; padding: 0 0.35rem; margin: 0; }
.actions button { flex: 1; }
.actions button:not(.principal) { background: white; color: #b91c1c; border: 1px solid #e5e7eb; }
.chauffeur { background: white; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border-left: 4px solid #047857; }
.chauffeur.etat-bientot { border-left-color: #d97706; }
.chauffeur.etat-suspendu, .chauffeur.etat-incomplet { border-left-color: #b91c1c; }
.chauffeur-tete { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.badge { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; background: #ecfdf5; color: #047857; }
.etat-bientot .badge { background: #fffbeb; color: #b45309; }
.etat-suspendu .badge, .etat-incomplet .badge { background: #fef2f2; color: #b91c1c; }
.chauffeur > button { margin-top: 0.4rem; font-size: 0.85rem; padding: 0.35rem 0.7rem; background: #eef2ff; color: #1a56db; }
.actions-chauffeur { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.actions-chauffeur button { font-size: 0.85rem; padding: 0.35rem 0.7rem; background: #eef2ff; color: #1a56db; width: auto; }
.renouvellement { margin-top: 0.5rem; max-width: 360px; }
.actions-chauffeur button.retirer { background: #fef2f2; color: #b91c1c; }
.annonce-chauffeurs { background: #ecfdf5; color: #065f46; padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.9rem; }

/* La catégorie en tuiles hors de la carte d'inscription : carte d'un dossier
   à valider et « Modifier » un chauffeur (13.10.2026). Mêmes codes que
   inscriptionChauffeur.css, en plus compact. */
.bloc-categorie { border: 1px solid #e5e7eb; border-radius: 8px; padding: 0.75rem 1rem; margin: 0.75rem 0; }
.bloc-categorie legend { font-size: 0.85rem; font-weight: 600; padding: 0 0.25rem; }
.bloc-categorie .tuiles,
.modification .tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0.4rem 0; }
.bloc-categorie .tuile,
.modification .tuile {
  position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0;
  padding: 0.6rem 0.75rem; background: #f7f8fa; border: 1.5px solid #e5e7eb; border-radius: 12px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bloc-categorie .tuile input,
.modification .tuile input { position: absolute; width: auto; opacity: 0; pointer-events: none; }
.bloc-categorie .tuile strong,
.modification .tuile strong { font-size: 0.95rem; font-weight: 800; color: #0f1729; }
.bloc-categorie .tuile span,
.modification .tuile span { font-size: 0.78rem; color: #4b5563; }
.bloc-categorie .tuile:has(input:checked),
.modification .tuile:has(input:checked) { background: #eef2ff; border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12); }
.bloc-categorie .tuile:has(input:checked) strong,
.modification .tuile:has(input:checked) strong { color: #1a56db; }
.bloc-categorie .tuile:focus-within,
.modification .tuile:focus-within { outline: 2px solid #1a56db; outline-offset: 2px; }

/* « Modifier » un chauffeur (13.10.2026). */
.modification { margin-top: 0.75rem; padding: 0.9rem 1rem 1rem; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; max-width: 620px; }
.modification-titre { margin: 0; font-weight: 700; color: #0f1729; }
.modification .grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.75rem; }
.modification .grille.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modification label.champ { display: flex; flex-direction: column; gap: 4px; margin: 0.6rem 0 0; font-weight: 600; color: #374151; }
.modification label.champ input { font-weight: 400; background: #fff; border-color: #d1d5db; border-radius: 8px; }
.modification-etiquette { margin: 0.75rem 0 0; font-size: 0.85rem; font-weight: 600; color: #374151; }
.modification .boutons { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.modification .boutons button { width: auto; margin: 0; padding: 0.5rem 1.1rem; }
.modification .boutons button.secondaire { background: #fff; color: #374151; border: 1px solid #d1d5db; }
@media (max-width: 560px) {
  .modification .grille,
  .modification .grille.trois,
  .bloc-categorie .tuiles,
  .modification .tuiles { grid-template-columns: minmax(0, 1fr); }
}

.partage { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.partage button { margin: 0; width: auto; }
.bouton-whatsapp {
  display: inline-flex; align-items: center; padding: 0.5rem 1rem; border-radius: 4px;
  background: #25d366; color: #073b1c; font-weight: 600; text-decoration: none; font-size: 0.95rem;
}
.bouton-whatsapp:hover { background: #1fb858; }
.encadre-paiements { background: white; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border-left: 4px solid #d97706; }
.encadre-paiements.etat-actif { border-left-color: #047857; }
.encadre-paiements h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.encadre-paiements button { margin-top: 0.5rem; }
.encadre-paiements a { color: #1a56db; font-size: 0.9rem; }

/* Remarque du client sous son nom — 05.10.2026. */
td .remarque {
  margin-top: 4px;
  font-size: 0.9em;
  color: #78350f;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: pre-line;
}

/* Lien présenté comme un bouton (accords SMS de l'espace exploitant, 07.10.2026). */
.bouton-lien { display: inline-block; margin-top: 0.5rem; padding: 0.5rem 1rem; border-radius: 4px; background: #1a56db; color: #fff; text-decoration: none; font-size: 0.95rem; }
.bouton-lien:hover { background: #1747b8; }
.aide.alerte { color: #92400e; background: #fef3c7; padding: 0.3rem 0.6rem; border-radius: 6px; }
