/* int/assets/css/int.css - Interface salarie Adomali (mobile d'abord). */
:root {
    --violet: #64008d;
    --violet-clair: #f3e9f7;
    --texte: #221a26;
    --doux: #6d6472;
    --ok: #1d7a4b;
    --alerte: #b45309;
    --erreur: #b91c1c;
    --bord: #e6e1ea;
    --fond: #f7f5f9;
    --rayon: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* L'attribut hidden doit TOUJOURS gagner, meme sur un element dont le CSS fixe un
   display (c'est le cas du voile de chargement : display:flex annulait hidden et
   le rond tournait en permanence). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--fond); color: var(--texte); font-size: 16px; line-height: 1.45;
    padding-bottom: 78px;                     /* place pour la barre d'onglets */
}
h1 { font-size: 1.4rem; margin: 0.4rem 0; }
h3 { font-size: 1rem; margin: 0 0 0.6rem; }
a { color: var(--violet); }
.doux { color: var(--doux); }
.petit { font-size: 0.82rem; }
.centre { text-align: center; }

/* --------------------------------------------------------------- connexion */
.connexion { max-width: 420px; margin: 0 auto; padding: 2rem 1.2rem; text-align: center; }
.connexion .logo { width: 96px; height: 96px; }
.connexion form { text-align: left; margin-top: 1.2rem; }
/* Le bouton se detache nettement du champ mot de passe (avant, il collait au champ). */
.connexion .bouton.principal { display: block; width: 100%; margin-top: 1.1rem; padding: 0.9rem; }
.connexion button.lien { display: block; margin: 0.5rem auto 0; }

label { display: block; margin: 0.7rem 0 0.2rem; font-size: 0.85rem; color: var(--doux); }
input, select, textarea {
    width: 100%; padding: 0.75rem; font-size: 1rem; font-family: inherit;
    border: 1px solid var(--bord); border-radius: 10px; background: #fff; color: var(--texte);
}
textarea { resize: vertical; }

/* --------------------------------------------------------------- structure */
.entete {
    position: sticky; top: 0; z-index: 5; display: flex; align-items: center;
    justify-content: space-between; gap: 0.5rem;
    padding: 0.7rem 1rem; background: var(--violet); color: #fff;
}
.entete .doux { color: #e6d3ef; }
main { padding: 0.9rem 0.9rem 1.5rem; max-width: 620px; margin: 0 auto; }
.titre { font-size: 1.05rem; margin: 0.2rem 0 0.7rem; }
.sous-titre { font-size: 0.9rem; text-transform: capitalize; margin: 1rem 0 0.5rem; color: var(--doux); }

.carte {
    background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
    padding: 0.9rem; margin-bottom: 0.7rem;
}
.encart { background: var(--violet-clair); border-radius: 10px; padding: 0.6rem 0.8rem; margin-bottom: 0.7rem; }
.vide { text-align: center; padding: 2rem 1rem; color: var(--doux); }

/* --------------------------------------------------------------- missions */
.mission .ligne-haut, .carte.demande, .carte.solde .detail-solde {
    display: flex; justify-content: space-between; align-items: center;
}
.client { font-weight: 600; }
.adresse, .details .doux { font-size: 0.85rem; color: var(--doux); }
.puces, .actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.puce {
    font-size: 0.75rem; background: var(--fond); border: 1px solid var(--bord);
    border-radius: 20px; padding: 0.15rem 0.55rem; color: var(--doux);
}
.puce.ok { background: #e7f6ee; border-color: #bfe6d1; color: var(--ok); }
.etat { font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 20px; background: var(--fond); border: 1px solid var(--bord); }
.etat-terminee, .etat-validee, .etat-valide { background: #e7f6ee; border-color: #bfe6d1; color: var(--ok); }
.etat-enattente { background: #fdf3e3; border-color: #f3dcae; color: var(--alerte); }
.etat-refuse, .etat-annule { background: #fdeaea; border-color: #f5c2c2; color: var(--erreur); }

.consignes ul { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.pointage .large { margin-top: 0.5rem; }

/* --------------------------------------------------------------- boutons */
.bouton {
    display: inline-block; border: 1px solid var(--violet); background: #fff; color: var(--violet);
    border-radius: 10px; padding: 0.6rem 0.9rem; font-size: 0.95rem; font-family: inherit;
    cursor: pointer; text-decoration: none; text-align: center;
}
.bouton.principal { background: var(--violet); color: #fff; }
.bouton.clair { border-color: var(--bord); color: var(--texte); }
.bouton.danger { background: var(--erreur); border-color: var(--erreur); color: #fff; }
.bouton.large { display: block; width: 100%; padding: 0.9rem; font-size: 1.05rem; }
.bouton.petit { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.lien { background: none; border: none; color: var(--violet); text-decoration: underline; padding: 0.6rem 0; font-size: 0.9rem; cursor: pointer; }
.rond { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,0.18); font-size: 1.1rem; cursor: pointer; }
.retour { margin-bottom: 0.4rem; }

/* --------------------------------------------------------------- cases a cocher */
.liste-cases { display: flex; flex-direction: column; gap: 0.35rem; }
.case { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; color: var(--texte); margin: 0; }
.case input { width: 22px; height: 22px; flex: none; accent-color: var(--violet); }
.case span { flex: 1; }
.jours { flex-direction: row; flex-wrap: wrap; }
.jours .case { width: 46%; }

/* --------------------------------------------------------------- kilometres */
.carte.trajet { display: flex; align-items: center; gap: 0.6rem; }
.carte.trajet .etape {
    width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--violet-clair);
    color: var(--violet); text-align: center; font-size: 0.85rem; line-height: 26px;
}
.carte.trajet .details { flex: 1; min-width: 0; }
.carte.trajet .details strong { font-size: 0.9rem; }
.carte.trajet .km { width: 74px; text-align: right; padding: 0.5rem; }
.carte.trajet .unite { font-size: 0.8rem; color: var(--doux); }

/* --------------------------------------------------------------- conges */
.carte.solde { text-align: center; }
.carte.solde .gros { font-size: 2.6rem; font-weight: 700; color: var(--violet); line-height: 1.1; }
.detail-solde { font-size: 0.8rem; color: var(--doux); margin: 0.5rem 0; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.apercu { display: flex; gap: 0.4rem; margin: 0.5rem 0; }
.apercu img { width: 50%; border-radius: 8px; }

/* --------------------------------------------------------------- navigation et messages */
.onglets {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex;
    background: #fff; border-top: 1px solid var(--bord);
    padding-bottom: env(safe-area-inset-bottom);
}
.onglet {
    flex: 1; border: none; background: none; padding: 0.5rem 0.2rem; font-size: 0.68rem;
    font-family: inherit; color: var(--doux); cursor: pointer; position: relative;
}
.onglet span { display: block; font-size: 1.25rem; }
.onglet.actif { color: var(--violet); font-weight: 600; }
.onglet.apastille::after {
    content: ''; position: absolute; top: 0.4rem; right: 25%; width: 9px; height: 9px;
    border-radius: 50%; background: var(--alerte);
}
.bandeau {
    position: fixed; left: 0.6rem; right: 0.6rem; bottom: 84px; z-index: 8;
    padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 0.88rem; text-align: center;
    background: #2b2130; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.bandeau.ok { background: var(--ok); }
.bandeau.erreur { background: var(--erreur); }
.bandeau.attente { background: var(--alerte); }
.voile { position: fixed; inset: 0; z-index: 9; background: rgba(255,255,255,0.55); display: flex; align-items: center; justify-content: center; }
.tour { width: 38px; height: 38px; border: 4px solid var(--violet-clair); border-top-color: var(--violet); border-radius: 50%; animation: tour 0.9s linear infinite; }
@keyframes tour { to { transform: rotate(360deg); } }
@media (min-width: 620px) { body { font-size: 17px; } }
