/* SLY ELEC — feuille de style unique, mobile d'abord. */
:root {
  /* la ligne de la vitrine : noir, blanc, un seul accent (or), le trait du logo */
  --bleu: #111417; --bleu-2: #2a2f36; --accent: #f5a623; --accent-2: #d98d0b;
  --fond: #f5f6f8; --carte: #ffffff; --texte: #1b1f24; --gris: #5f6670; --gris-2: #9aa3af;
  --bordure: #e3e6ea; --vert: #1b8a4a; --rouge: #c0392b; --orange: #d9781b; --violet: #6b3fa0; --bleu-clair: #fff7e6;
  --rayon: 14px; --ombre: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.45; color: var(--texte); background: var(--fond); padding-bottom: 72px; }
a { color: var(--texte); }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; font-weight: 800; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--texte); font-weight: 800; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
p { margin: .3rem 0 .8rem; }
small, .petit { font-size: .85rem; color: var(--gris); }
.muet { color: var(--gris); }
.droite { text-align: right; }
.centre { text-align: center; }
.gras { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* Barre haute */
.barre { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); color: var(--texte); padding: 0 1rem; min-height: 58px; border-bottom: 1px solid var(--bordure); }
.marque { color: var(--texte); text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; white-space: nowrap; display: inline-flex; align-items: center; }
.marque img { height: 38px; width: auto; display: block; }
.marque .eclair { color: var(--accent); }
.barre .mention { color: var(--gris); font-size: .9rem; font-weight: 600; border-left: 1px solid var(--bordure); padding-left: 1rem; }
.nav-haut { display: none; flex: 1; gap: .15rem; flex-wrap: wrap; }
.nav-haut a { color: var(--gris); text-decoration: none; padding: .3rem .45rem; border-bottom: 2px solid transparent; font-size: .9rem; font-weight: 600; }
.nav-haut a:hover { color: var(--texte); }
.nav-haut a.actif { color: var(--texte); border-bottom-color: var(--accent); }
.sortie { margin-left: auto; color: var(--texte); text-decoration: none; font-size: .85rem; font-weight: 700; border: 2px solid var(--bleu); border-radius: 999px; padding: .3rem .8rem; white-space: nowrap; }
.sortie:hover { background: var(--bleu); color: #fff; }

/* Barre basse (mobile) */
.nav-bas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--bordure); padding-bottom: env(safe-area-inset-bottom); }
.nav-bas a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: .4rem 0 .35rem; font-size: .7rem; color: var(--gris); text-decoration: none; }
.nav-bas a span { font-size: 1.25rem; line-height: 1.2; }
.nav-bas a.actif { color: var(--texte); }
.nav-bas a.plus span { background: var(--accent); color: var(--bleu); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; margin-top: -14px; box-shadow: var(--ombre); }

@media (min-width: 1000px) {
  body { padding-bottom: 0; }
  .nav-haut { display: flex; }
  .nav-bas { display: none; }
  .marque img { height: 42px; }
}

/* Page */
.page { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.titre-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .3rem 0 1rem; }
.titre-page h1::before { content: ""; display: block; width: 2rem; height: 2.5px; background: var(--accent); margin-bottom: .45rem; }
.retour { display: inline-block; font-size: .9rem; text-decoration: none; margin-bottom: .2rem; }
.actions-titre { display: flex; gap: .5rem; flex-wrap: wrap; }

.bandeau { padding: .7rem .9rem; border-radius: var(--rayon); margin-bottom: .9rem; font-size: .95rem; }
.bandeau.avert { background: #fff4dc; border: 1px solid #f3d38a; color: #6b4a00; }
.bandeau.succes { background: #e3f6ea; border: 1px solid #a8dfbd; color: #0f5a2d; }
.bandeau.erreur { background: #fde8e6; border: 1px solid #f3b6b0; color: #7a1f16; }
.bandeau.info { background: #fff7e6; border: 1px solid #f6dca8; color: #5b3a00; }

/* Cartes et grilles */
.carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.carte.plate { box-shadow: none; border: 1px solid var(--bordure); }
.entete-carte { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.entete-carte h2 { margin: 0; }
.colonnes { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .colonnes { grid-template-columns: 1fr 1fr; } .colonnes.trois { grid-template-columns: 1fr 1fr 1fr; } }

.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .tuiles { grid-template-columns: repeat(4, 1fr); } }
.tuile { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .8rem .9rem; text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
a.tuile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,42,68,.09); }
.tuile .valeur { font-size: 1.35rem; font-weight: 800; color: var(--texte); line-height: 1.2; }
.tuile .libelle { font-size: .8rem; color: var(--gris); }
.tuile.alerte .valeur { color: var(--rouge); }
.tuile .jauge { height: 6px; background: #e9edf2; border-radius: 3px; margin-top: .45rem; overflow: hidden; }
.tuile .jauge i { display: block; height: 100%; background: var(--vert); }
.tuile .jauge i.haut { background: var(--orange); }
.tuile .jauge i.plein { background: var(--rouge); }

/* Listes d'éléments */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--bordure); }
.liste li:first-child { border-top: 0; }
.liste .corps { flex: 1; min-width: 0; }
.liste .corps .titre { font-weight: 600; }
.liste .corps .sous { font-size: .85rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste a.corps { text-decoration: none; color: inherit; }
.liste .heure { font-variant-numeric: tabular-nums; color: var(--texte); font-weight: 700; min-width: 3.2rem; }
.liste .montant { font-weight: 600; white-space: nowrap; }
.vide { color: var(--gris); padding: .8rem 0; text-align: center; }

/* Badges */
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; background: #e9edf2; color: #3b4452; }
.badge.gris { background: #e9edf2; color: #3b4452; }
.badge.bleu { background: #e9edf2; color: #1b1f24; }
.badge.orange { background: #fff1d6; color: #8a4b05; }
.badge.violet { background: #ebe1f7; color: #4b2a78; }
.badge.vert { background: #dbf3e4; color: #0f5a2d; }
.badge.rouge { background: #fbe0dd; color: #7a1f16; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 2px solid var(--bleu); border-radius: 999px; padding: .55rem 1.05rem; font-size: .93rem; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; background: var(--bleu); color: #fff; transition: transform .12s, background .12s; }
.btn:hover { background: var(--bleu-2); border-color: var(--bleu-2); transform: translateY(-1px); }
.btn.secondaire { background: #fff; color: var(--texte); border-color: #cfd4db; }
.btn.secondaire:hover { background: #fff; border-color: var(--bleu); transform: none; }
.btn.accent { background: var(--accent); color: var(--texte); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { background: #fff; color: var(--rouge); border-color: #f0c3bd; }
.btn.danger:hover { background: #fdf0ee; border-color: var(--rouge); transform: none; }
.btn.vert { background: var(--vert); color: #fff; border-color: var(--vert); }
.btn.grand { width: 100%; padding: .95rem; font-size: 1.05rem; border-radius: 999px; }
.btn.petit { padding: .3rem .7rem; font-size: .83rem; }
.btn[disabled], .btn.inactif { opacity: .5; pointer-events: none; }
.boutons { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.boutons .btn { flex: 1 1 auto; }

/* Étapes du dépannage : trois grosses touches */
.etapes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; margin: .8rem 0; }
.etapes .etape { border: 2px solid var(--bordure); border-radius: var(--rayon); padding: .8rem .4rem; text-align: center; background: #fff; cursor: pointer; font: inherit; }
.etapes .etape .ico { font-size: 1.6rem; display: block; }
.etapes .etape .lib { font-weight: 700; display: block; font-size: .95rem; }
.etapes .etape .quand { font-size: .8rem; color: var(--gris); display: block; min-height: 1.1em; }
.etapes .etape.fait { border-color: var(--vert); background: #effaf3; }
.etapes .etape.actif { border-color: var(--accent); background: #fff8e8; }
.etapes .etape:disabled { opacity: .45; cursor: default; }

/* Formulaires */
form .champ { margin-bottom: .85rem; }
label { display: block; font-size: .85rem; font-weight: 700; color: #1b1f24; margin-bottom: .25rem; }
label .opt { font-weight: 400; color: var(--gris); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=password], select, textarea {
  width: 100%; font: inherit; padding: .6rem .75rem; border: 1.5px solid #cfd4db; border-radius: 10px; background: #fff; color: var(--texte); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.ligne-champs { display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .ligne-champs { grid-template-columns: 1fr 1fr; } .ligne-champs.trois { grid-template-columns: 1fr 1fr 1fr; } .ligne-champs.quatre { grid-template-columns: repeat(4, 1fr); } }
.case { display: flex; align-items: flex-start; gap: .55rem; font-weight: 400; font-size: .95rem; color: var(--texte); padding: .5rem .6rem; border: 1px solid var(--bordure); border-radius: 10px; background: #fff; }
.case input { margin-top: .25rem; width: 18px; height: 18px; }
.case.important { border-color: #f6dca8; background: #fff7e6; }
.aide { font-size: .82rem; color: var(--gris); margin-top: .25rem; }
.segment { display: flex; border: 1px solid #c9d3df; border-radius: 10px; overflow: hidden; }
.segment label { flex: 1; margin: 0; text-align: center; padding: .55rem .4rem; cursor: pointer; font-weight: 500; color: var(--gris); border-left: 1px solid #c9d3df; }
.segment label:first-child { border-left: 0; }
.segment input { display: none; }
.segment input:checked + span { color: var(--texte); font-weight: 700; }
.segment label:has(input:checked) { background: #fff7e6; }

/* Tableaux */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th, .tableau td { padding: .5rem .55rem; border-bottom: 1px solid var(--bordure); text-align: left; vertical-align: top; }
.tableau th { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gris); font-weight: 700; background: #f7f8fa; }
.tableau td.num, .tableau th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau tr.total td { font-weight: 700; border-top: 2px solid var(--bleu); }
.tableau input, .tableau select { padding: .4rem .5rem; }
.tableau td.etroit { width: 1%; white-space: nowrap; }

/* Résumé de prix */
.prix-bloc { background: #fff7e6; border: 1px solid #f6dca8; border-radius: var(--rayon); padding: .8rem 1rem; }
.prix-bloc .gros { font-size: 1.6rem; font-weight: 800; color: var(--texte); }
.prix-bloc .detail { font-size: .88rem; color: #335; }

/* Photos et signature */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.photos figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: #e9edf2; aspect-ratio: 1; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: .15rem .35rem; }
.photos .suppr { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; }
.signature { border: 2px dashed #c9d3df; border-radius: 12px; background: #fff; touch-action: none; width: 100%; height: 180px; display: block; }
.signature.ok { border-style: solid; border-color: var(--vert); }
.signature-img { max-width: 320px; border: 1px solid var(--bordure); border-radius: 10px; background: #fff; }

/* Agenda */
.semaine-nav { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.jour-bloc { margin-bottom: .8rem; }
.jour-bloc .jour-titre { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--texte); padding: .3rem 0; }
.jour-bloc.aujourdhui .jour-titre { color: var(--accent-2); }
.jour-bloc .jour-titre .ajout { font-size: .8rem; font-weight: 500; }
.jour-bloc.weekend .jour-titre { color: var(--gris); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { font-size: .8rem; padding: .2rem .55rem; border-radius: 999px; background: #e9edf2; color: #3b4452; text-decoration: none; }
.chip.chantier { background: #fff1d6; color: #8a4b05; }
.chip.conge { background: #f1e8fb; color: #4b2a78; }
.chip.formation { background: #e9f7ef; color: #0f5a2d; }

/* Connexion */
.connexion { max-width: 400px; margin: 7vh auto 0; }
.connexion .logo { text-align: center; margin-bottom: 1.2rem; }
.connexion .logo img { height: 78px; width: auto; margin: 0 auto; display: block; }
.connexion .logo .mention { display: block; margin-top: .6rem; color: var(--gris); font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }

/* Utilitaires */
.sep { border: 0; border-top: 1px solid var(--bordure); margin: .9rem 0; }
.inline { display: inline; }
.cache { display: none !important; }
.resume-trajet { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.resume-trajet div { flex: 1 1 100px; }
.resume-trajet .gros { font-size: 1.3rem; font-weight: 800; color: var(--texte); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #c9d3df; border-top-color: var(--bleu); border-radius: 50%; animation: tourne .8s linear infinite; vertical-align: middle; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media print { .barre, .nav-bas, .actions-titre, .boutons, .bandeau { display: none !important; } body { background: #fff; padding: 0; } .carte { border: 0; } }
