/* Justificatifs École W */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
  --encre:        #111827;
  --encre-doux:   #6b7280;
  --trait:        #e5e7eb;
  --fond:         #ffffff;
  --fond-page:    #f9fafb;
  --accent:       #2563eb;

  --ok:           #059669;  --ok-fond:      #ecfdf5;
  --alerte:       #dc2626;  --alerte-fond:  #fef2f2;
  --attente:      #d97706;  --attente-fond: #fffbeb;
  --gris:         #9ca3af;  --gris-fond:    #f3f4f6;

  --rayon: 12px;
  --ombre: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  color: var(--encre);
  background: var(--fond-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-formulaire {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.carte {
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: 16px;
  box-shadow: var(--ombre);
  padding: 40px 44px;
  width: 100%;
  max-width: 520px;
}

.carte h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 .25em;
}

.carte .sous-titre {
  color: var(--encre-doux);
  font-size: .88rem;
  margin: 0 0 2rem;
}

.conteneur {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .2em; }
h2 { font-size: .78rem; font-weight: 600; margin: 0 0 .8em; color: var(--encre-doux); text-transform: uppercase; letter-spacing: .05em; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.aide { color: var(--encre-doux); font-size: .85rem; }

.barre {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--trait);
}
.barre h1 { margin: 0; }
.nav-liens { display: flex; gap: 1.2rem; }
.lien-discret { color: var(--encre-doux); font-size: .88rem; font-weight: 400; }

.alertes { margin-bottom: 1.4rem; }
.alerte-msg {
  background: var(--alerte-fond); color: var(--alerte);
  border: 1px solid #fecaca; border-radius: var(--rayon);
  padding: .7rem 1rem; margin: 0 0 .5rem; font-size: .88rem;
}

.formulaire { display: flex; flex-direction: column; gap: 1.2rem; }
.formulaire > label,
.filtres label {
  display: flex; flex-direction: column; gap: .35rem;
  font-weight: 500; font-size: .88rem;
}
.formulaire > label.case { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }

input[type=text], input[type=password], input[type=email], input[type=date],
select, textarea {
  font: inherit; font-size: .93rem; color: var(--encre);
  padding: .6rem .8rem;
  border: 1px solid var(--trait); border-radius: 8px;
  background: var(--fond); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { resize: vertical; min-height: 70px; }

button {
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
  background: var(--encre); color: #fff;
  border: 1px solid var(--encre); border-radius: 8px;
  padding: .6rem 1.1rem;
  transition: opacity .15s;
}
button:hover { opacity: .85; }

.creneaux {
  border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 1rem 1.1rem; background: var(--fond-page);
}
.creneaux legend { font-weight: 500; font-size: .88rem; padding: 0 .4rem; }
.creneau { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.creneau input[type=date] { flex: 2; }
.creneau select { flex: 1; }
.creneau .retirer {
  background: transparent; color: var(--encre-doux);
  border: 1px solid var(--trait); padding: .4rem .7rem; font-size: .85rem;
}
#ajouter-creneau {
  background: transparent; color: var(--accent);
  border: 1px dashed var(--trait); font-size: .88rem;
  margin-top: .3rem;
}

.statut { padding: 1.1rem 1.3rem; border-radius: var(--rayon); margin-bottom: 1rem; }
.statut.ok         { background: var(--ok-fond);    border: 1px solid #a7f3d0; }
.statut.hors-delai { background: var(--alerte-fond); border: 1px solid #fecaca; }

.filtres {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  margin-bottom: 1.8rem;
  background: var(--fond); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 1rem 1.2rem;
  box-shadow: var(--ombre);
}
.filtres label.case { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
.filtres select { min-width: 180px; }

.justif {
  background: var(--fond); border: 1px solid var(--trait);
  border-left: 3px solid var(--gris); border-radius: var(--rayon);
  padding: 1.1rem 1.3rem; margin-bottom: .8rem;
  box-shadow: var(--ombre);
}
.justif.statut-a_valider   { border-left-color: var(--attente); }
.justif.statut-rejet_delai { border-left-color: var(--alerte); }
.justif.statut-accepte     { border-left-color: var(--ok); }
.justif.statut-refuse      { border-left-color: var(--gris); }

.justif header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.justif .qui { font-weight: 600; font-size: .97rem; }
.justif .meta { color: var(--encre-doux); font-size: .83rem; margin: .3rem 0 .5rem; }
.creneaux-liste { margin: .4rem 0 .7rem; padding-left: 1.2rem; }
.creneaux-liste li { margin: .1rem 0; font-size: .9rem; }
.justif .piece { font-size: .88rem; margin: .4rem 0 .8rem; }
.tranche { font-size: .85rem; color: var(--encre-doux); }

.badge {
  font-size: .73rem; font-weight: 600; padding: .2rem .65rem;
  border-radius: 999px; white-space: nowrap; letter-spacing: .02em;
}
.badge-a_valider   { background: var(--attente-fond); color: var(--attente); }
.badge-rejet_delai { background: var(--alerte-fond);  color: var(--alerte); }
.badge-accepte     { background: var(--ok-fond);      color: var(--ok); }
.badge-refuse      { background: var(--gris-fond);    color: var(--gris); }

.decision { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.decision input[type=text] { flex: 1; min-width: 180px; }
.btn-accepter { background: var(--ok);    border-color: var(--ok); }
.btn-refuser  { background: transparent; color: var(--alerte); border-color: var(--alerte); }

.vide { color: var(--encre-doux); font-style: italic; font-size: .9rem; }

.bloc { margin-bottom: 2.4rem; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau td { padding: .55rem .5rem; border-bottom: 1px solid var(--trait); vertical-align: middle; font-size: .9rem; }
.tableau tr.archive { opacity: .45; }
.inline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; }
.inline input { width: auto; }
.nouveau { margin-top: .9rem; }

.page-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

@media (max-width: 580px) {
  .carte { padding: 28px 20px; }
  .creneau, .decision, .inline { flex-direction: column; align-items: stretch; }
  .barre { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .justif header { flex-direction: column; align-items: flex-start; gap: .3rem; }
}
