/* Vague 2 : en-tête blanc (le vrai logo est jade + bleu), animations de glisse,
   curseur « glisser pour valider », voyage en cours, espaces employé/direction. */

/* ── En-tête ── */
.entete { background: #fff; color: var(--nuit); padding: .55rem 1rem; box-shadow: 0 1px 0 var(--gris-2), 0 6px 18px rgba(11,42,60,.05); }
.marque img { height: 40px; width: auto; display: block; }
.marque-rp { font-size: .68rem; font-weight: 800; letter-spacing: .08em; background: var(--jade-clair); color: var(--jade-fonce); padding: .2rem .5rem; border-radius: 6px; }
.nav-haut a { color: var(--gris-3); opacity: 1; transition: background .2s, color .2s; }
.nav-haut a:hover { background: var(--gris-1); color: var(--nuit); }
.nav-haut a.actif { background: var(--jade); color: #04302b; }
.compte .avatar { border: 0; background: var(--gris-2); }
.btn-entete { background: var(--jade); color: #04302b; }
.btn-fantome { color: var(--gris-3); opacity: 1; }
.btn-fantome:hover { background: var(--gris-1); color: var(--nuit); }
.nav-bas { grid-template-columns: repeat(var(--nb-nav, 4), 1fr); }

/* ── Transitions de page : glisse par la droite (en avant) ou la gauche (en arrière) ── */
.app.entre-avant > * { animation: glisseAvant .32s cubic-bezier(.2,.8,.25,1) both; }
.app.entre-arriere > * { animation: glisseArriere .32s cubic-bezier(.2,.8,.25,1) both; }
.app > *:nth-child(2) { animation-delay: .04s !important; }
.app > *:nth-child(3) { animation-delay: .08s !important; }
.app > *:nth-child(n+4) { animation-delay: .12s !important; }
@keyframes glisseAvant { from { opacity: 0; transform: translateX(28px); } }
@keyframes glisseArriere { from { opacity: 0; transform: translateX(-28px); } }
.apparait > * { animation: monteDoux .38s cubic-bezier(.2,.8,.25,1) both; }
.apparait > *:nth-child(2) { animation-delay: .05s; }
.apparait > *:nth-child(3) { animation-delay: .1s; }
.apparait > *:nth-child(4) { animation-delay: .15s; }
.apparait > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes monteDoux { from { opacity: 0; transform: translateY(14px); } }

/* ── Boutons : reflet qui glisse au survol ── */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%); transform: translateX(-120%); transition: transform .55s; pointer-events: none; }
.btn:hover::after { transform: translateX(120%); }
.btn.grand { padding: 1.05rem 1.4rem; font-size: 1.05rem; }
.btn .material-ico { transition: transform .2s; }
.btn:hover .material-ico { transform: translateX(3px); }

/* ── Onglets à pastille coulissante ── */
.segments { position: relative; }
.segments .pastille-seg { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--jade); transition: transform .3s cubic-bezier(.3,.9,.3,1), width .3s cubic-bezier(.3,.9,.3,1); z-index: 0; }
.segments button { position: relative; z-index: 1; transition: color .2s; }
.segments button.actif { background: none; color: #04302b; }
.segments.defile { display: flex; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.segments.defile button { flex: none; }
.liste-anim > * { animation: glisseAvant .3s cubic-bezier(.2,.8,.25,1) both; }
.liste-anim > *:nth-child(2) { animation-delay: .04s; }
.liste-anim > *:nth-child(3) { animation-delay: .08s; }
.liste-anim > *:nth-child(4) { animation-delay: .12s; }
.liste-anim > *:nth-child(n+5) { animation-delay: .16s; }

/* ── Curseur « glisser pour valider » ── */
.glisse { position: relative; height: 60px; border-radius: 999px; background: var(--jade-clair); overflow: hidden; user-select: none; touch-action: none; margin-top: 1rem; }
.glisse.sombre { background: var(--nuit); }
.glisse-remplissage { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--jade); border-radius: 999px; }
.glisse-texte { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--jade-fonce); padding-left: 56px; pointer-events: none; overflow: hidden; }
.glisse.sombre .glisse-texte { color: #d9eef0; }
.glisse-texte::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-100%); animation: reflet 2.4s infinite; }
@keyframes reflet { to { transform: translateX(100%); } }
.glisse-poignee { position: absolute; top: 5px; left: 5px; width: 50px; height: 50px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(11,42,60,.25); display: grid; place-items: center; color: var(--jade-fonce); cursor: grab; transition: transform .28s cubic-bezier(.3,.9,.3,1); }
.glisse.tire .glisse-poignee { transition: none; cursor: grabbing; }
.glisse.fini .glisse-texte { color: #04302b; }
.glisse.occupe { pointer-events: none; opacity: .75; }
.glisse:focus-within { outline: 3px solid rgba(0,196,179,.4); outline-offset: 2px; }

/* ── Voyage en cours ── */
.voyage { background: linear-gradient(135deg, var(--nuit), #14435c); color: #fff; border-radius: var(--rayon); padding: 1.2rem; position: relative; overflow: hidden; box-shadow: var(--ombre); }
.voyage::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(0,196,179,.18); }
.voyage .etat { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--jade); }
.voyage .point { width: 9px; height: 9px; border-radius: 50%; background: var(--jade); animation: pouls 1.4s infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(0,196,179,.6); } 100% { box-shadow: 0 0 0 12px rgba(0,196,179,0); } }
.voyage h2 { margin: .4rem 0 .1rem; font-size: 1.5rem; color: #fff; }
.voyage .temps { font-variant-numeric: tabular-nums; opacity: .8; font-size: .9rem; }
.voyage .alerte { background: rgba(229,154,0,.18); border: 1px solid rgba(229,154,0,.5); color: #ffd58a; border-radius: 12px; padding: .6rem .8rem; margin-top: .9rem; font-size: .88rem; }
.voyage .btn { margin-top: 1rem; }
.action-principale { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.2rem; }
.action-principale p { margin: .2rem 0 1rem; }
.duo-btn { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

/* ── Étoiles ── */
.etoiles { display: flex; justify-content: center; gap: .3rem; margin: 1rem 0; }
.etoiles button { font-size: 2.6rem; line-height: 1; color: var(--gris-2); transition: transform .18s cubic-bezier(.3,1.6,.5,1), color .15s; padding: 0 .1rem; }
.etoiles button.on { color: #f5b400; }
.etoiles button:hover { transform: scale(1.25) rotate(-6deg); }
.etoiles-ligne { color: #f5b400; letter-spacing: .1em; white-space: nowrap; }
textarea, select { width: 100%; padding: .75rem .9rem; border: 2px solid var(--gris-2); border-radius: 12px; font: inherit; resize: vertical; background: #fff; }
textarea:focus, select:focus { outline: none; border-color: var(--jade); }

/* ── Chips (mode de transport) ── */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-radius: 999px; border: 2px solid var(--gris-2); font-weight: 700; font-size: .9rem; background: #fff; transition: all .2s; }
.chip.sel { border-color: var(--jade); background: var(--jade-clair); color: var(--jade-fonce); transform: translateY(-1px); }

/* ── Employé : passagers ── */
.recherche-res { display: grid; gap: .4rem; margin-top: .6rem; }
.personne { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 14px; background: #fff; box-shadow: var(--ombre); width: 100%; text-align: left; transition: transform .15s; }
.personne:hover { transform: translateX(4px); }
.personne img, .personne .ph { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--gris-2); flex: none; }
.personne .t { font-weight: 700; }
.personne .s { color: var(--gris-3); font-size: .8rem; }
.btn.oui { background: #d6f5ee; color: #006b4a; }
.btn.non { background: #fde8ea; color: #a1212d; }
.badge { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge.oui { background: #d6f5ee; color: #006b4a; }
.badge.non { background: #fde8ea; color: #a1212d; }
.badge.neutre { background: var(--gris-2); color: var(--gris-3); }

/* ── Direction ── */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tuile { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem; }
.tuile .v { font-size: 1.6rem; font-weight: 800; }
.tuile .l { color: var(--gris-3); font-size: .82rem; font-weight: 600; }
@media (min-width: 760px) { .tuiles { grid-template-columns: repeat(4, 1fr); } }

/* Champs texte : fond clair explicite (sinon le navigateur les rend sombres). */
input[type=text], textarea { background: #fff; color: var(--nuit); }
.glisse.sombre .glisse-texte::after { opacity: .25; }

/* ── Barres de navigation : une pastille qui se balade d'un onglet à l'autre ── */
.nav-haut, .nav-bas { position: relative; }
.nav-pastille { position: absolute; top: 0; left: 0; border-radius: 999px; z-index: 0; pointer-events: none;
  transition: transform .38s cubic-bezier(.3,1.25,.4,1), width .3s ease, height .3s ease; }
.nav-haut .nav-pastille { background: var(--jade); }
.nav-bas .nav-pastille { background: var(--jade-clair); border-radius: 16px; }
.nav-haut a, .nav-bas a { position: relative; z-index: 1; }
.nav-haut a.actif { background: none; color: #04302b; }
.nav-bas a.actif .material-ico { background: none; padding: 0; }
.nav-bas a { transition: color .25s; }
.nav-bas a.actif .material-ico { transform: translateY(-1px) scale(1.12); }
.nav-bas a .material-ico { transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
