:root{
  --sgci-navy:#0d2f63;
  --sgci-navy-2:#061a3c;
  --sgci-blue:#143e7a;
  --sgci-red:#c92236;
  --sgci-orange:#f29a22;
  --sgci-green:#0f7f55;
  --bg:#eef3f8;
  --surface:#ffffff;
  --surface-2:#f7fafc;
  --line:#d9e3ef;
  --text:#122033;
  --muted:#64748b;
  --shadow:0 22px 65px rgba(6,26,60,.15);
  --radius:24px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;font-family:"Inter","Segoe UI",Arial,sans-serif;color:var(--text);background:
  radial-gradient(circle at 8% 0%, rgba(242,154,34,.20), transparent 28%),
  radial-gradient(circle at 92% 4%, rgba(15,127,85,.16), transparent 26%),
  radial-gradient(circle at 50% 100%, rgba(13,47,99,.13), transparent 30%),
  linear-gradient(145deg,#fbfdff 0%,#eef3f8 58%,#e7eef6 100%);
}
a{color:inherit}.app-shell{min-height:100vh}.container{max-width:1240px;margin:0 auto;padding:32px 20px 60px}
.topbar{position:sticky;top:0;z-index:50;background:linear-gradient(135deg,rgba(6,26,60,.98),rgba(13,47,99,.98));color:#fff;border-bottom:4px solid var(--sgci-orange);box-shadow:0 16px 42px rgba(6,26,60,.25);backdrop-filter:blur(14px)}
.topbar-inner{max-width:1240px;margin:0 auto;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:14px}.brand img{width:92px;height:72px;object-fit:contain;background:#fff;border-radius:20px;padding:7px;box-shadow:0 12px 28px rgba(0,0,0,.25)}.brand strong{display:block;font-size:24px;letter-spacing:.3px}.brand small{display:block;color:#dbeafe;font-size:13px;margin-top:3px}.nav{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.nav a{text-decoration:none;color:#fff;font-weight:850;font-size:14px;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.17);transition:.18s}.nav a:hover,.nav a.active{background:#fff;color:var(--sgci-navy);transform:translateY(-1px)}
.hero{position:relative;overflow:hidden;margin-bottom:22px;border-radius:30px;padding:30px;background:linear-gradient(135deg,var(--sgci-navy-2),var(--sgci-navy) 62%,#15457f);color:#fff;box-shadow:var(--shadow)}.hero:before{content:"";position:absolute;right:-70px;top:-90px;width:280px;height:280px;border-radius:50%;background:conic-gradient(from 60deg,var(--sgci-orange),var(--sgci-red),var(--sgci-green),var(--sgci-orange));opacity:.22}.hero:after{content:"";position:absolute;left:-100px;bottom:-115px;width:280px;height:280px;border-radius:50%;background:rgba(255,255,255,.09)}.hero h1{position:relative;margin:0 0 8px;font-size:34px;line-height:1.1;color:#fff}.hero p{position:relative;margin:0;color:#dbeafe;max-width:850px;line-height:1.55}.hero .hero-logo{position:relative;display:inline-flex;background:#fff;border-radius:22px;padding:8px;margin-bottom:14px;box-shadow:0 12px 28px rgba(0,0,0,.20)}.hero .hero-logo img{height:72px;width:110px;object-fit:contain}
.card{background:rgba(255,255,255,.92);border:1px solid rgba(217,227,239,.88);border-radius:var(--radius);padding:24px;margin-bottom:20px;box-shadow:var(--shadow);backdrop-filter:blur(10px)}.card.compact{padding:18px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}h1,h2,h3{margin-top:0;color:var(--sgci-navy)}h2{font-size:23px}.muted{color:var(--muted);line-height:1.45}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.form-panel{background:linear-gradient(180deg,#fbfdff,#f4f8fd);border:1px solid #e2ebf5;border-radius:22px;padding:18px}
label{display:block;font-weight:850;font-size:13px;color:#263b59;margin:0 0 8px}input,select,textarea{width:100%;padding:13px 14px;border:1px solid #cbd8e6;border-radius:15px;font-size:15px;background:#fff;color:var(--text);transition:.16s ease;box-shadow:0 1px 0 rgba(6,26,60,.03)}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--sgci-orange);box-shadow:0 0 0 4px rgba(242,154,34,.18)}textarea{min-height:105px;resize:vertical}.required{color:var(--sgci-red)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 17px;border-radius:15px;text-decoration:none;border:0;cursor:pointer;font-weight:900;transition:.16s ease;background:linear-gradient(135deg,var(--sgci-navy),var(--sgci-blue));color:#fff;box-shadow:0 12px 25px rgba(13,47,99,.20)}.btn:hover{filter:brightness(1.02);transform:translateY(-1px)}.btn.orange{background:linear-gradient(135deg,var(--sgci-orange),#ffb34d);color:#14213a}.btn.green{background:linear-gradient(135deg,var(--sgci-green),#17a673);color:#fff}.btn.red{background:linear-gradient(135deg,var(--sgci-red),#e7485a);color:#fff}.btn.gray{background:#64748b;color:#fff}.btn.light{background:#fff;color:var(--sgci-navy);border:1px solid var(--line);box-shadow:none}.btn.small{padding:8px 12px;font-size:13px;border-radius:11px}.actions{display:flex;gap:10px;align-items:center;margin-top:16px;flex-wrap:wrap}.exportbar{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.table-wrap{overflow:auto;border-radius:20px;border:1px solid var(--line);background:#fff}table{width:100%;border-collapse:collapse;background:#fff;min-width:840px}th,td{padding:14px 15px;border-bottom:1px solid var(--line);text-align:left;font-size:14px;vertical-align:top}th{position:sticky;top:0;background:linear-gradient(180deg,#f3f7ff,#e6eef9);color:var(--sgci-navy);font-size:12px;text-transform:uppercase;letter-spacing:.45px}tr:hover td{background:#fbfdff}.success{background:#e9f8f0;border:1px solid #9adcb8;color:#0b6b43;padding:13px 15px;border-radius:16px;margin-bottom:15px;font-weight:800}.error{background:#fff0f2;border:1px solid #f1a1ab;color:#a11927;padding:13px 15px;border-radius:16px;margin-bottom:15px;font-weight:800}
.signature-pad{border:2px dashed var(--sgci-navy);background:#fff;width:100%;height:220px;border-radius:20px;touch-action:none;box-shadow:inset 0 0 0 6px #f7fafc}.signature-note{font-size:13px;color:var(--muted);margin-top:6px}.stat-card{background:linear-gradient(135deg,#fff,#f8fbff);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 12px 32px rgba(13,47,99,.09);position:relative;overflow:hidden}.stat-card:before{content:"";position:absolute;right:-32px;top:-34px;width:105px;height:105px;border-radius:50%;background:linear-gradient(135deg,rgba(242,154,34,.22),rgba(201,34,54,.12))}.stat{font-size:36px;font-weight:950;color:var(--sgci-navy);letter-spacing:-.5px}.badge{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;background:#eef4fb;border:1px solid #dbe7f7;border-radius:999px;font-size:12px;color:var(--sgci-navy);font-weight:900}.pill-row{display:flex;gap:8px;flex-wrap:wrap}
.login-page{min-height:calc(100vh - 80px);display:grid;place-items:center;padding:38px 14px}.login.card{width:min(490px,100%);padding:34px;border-radius:30px;box-shadow:0 30px 90px rgba(6,26,60,.18)}.logo-center{text-align:center;margin-bottom:20px}.logo-center img{max-width:235px;width:68%;height:auto;object-fit:contain}.login h1{text-align:center;font-size:32px;margin-bottom:8px}.login .btn{width:100%;height:48px}.login-note{background:linear-gradient(135deg,#f8fbff,#eef5ff);border:1px solid var(--line);border-radius:18px;padding:13px 15px;margin-top:18px}.footer{text-align:center;color:#64748b;font-size:12px;margin:15px 0 25px}.print-title{display:none}
@media(max-width:920px){.topbar-inner{display:block}.brand{margin-bottom:12px}.nav{justify-content:flex-start}.grid,.grid2,.grid3{grid-template-columns:1fr}.container{padding:20px 12px 42px}.hero{padding:22px}.hero h1{font-size:27px}.brand img{height:60px;width:80px}.signature-pad{height:185px}.card{padding:18px;border-radius:22px}table{min-width:760px}.login-page{padding-top:20px}}
@media print{.topbar,.footer,.actions,.exportbar,form,.btn{display:none!important}body{background:#fff}.container{max-width:100%;margin:0;padding:0}.card{box-shadow:none;border:1px solid #ddd;border-radius:0}.print-title{display:block!important}.table-wrap{overflow:visible;border:0}table{min-width:0}th{position:static}}
.history-pre{white-space:pre-wrap;max-width:650px;max-height:260px;overflow:auto;background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:12px;font-size:12px;color:#24364f}
details summary{cursor:pointer;font-weight:900;color:var(--sgci-navy)}
.alert-soft{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;padding:12px 14px;border-radius:16px;margin-bottom:16px;font-weight:800}
.location-box{margin:14px 0;padding:12px 14px;border-radius:14px;background:#eef5ff;border:1px solid rgba(18,47,99,.18);color:#122f63;font-weight:700}
.login-note a{color:#122f63;font-weight:800}

.steps-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.step-card{background:#fff;border:1px solid rgba(11,42,111,.15);border-radius:18px;padding:16px;min-height:110px}.step-card.done{border-color:#2E7D32;background:linear-gradient(135deg,#ffffff,#f0fff4)}.step-time{font-size:28px;font-weight:900;color:#0B2A6F;margin:8px 0}.action-buttons .btn{min-width:190px}.password-wrap{position:relative}.password-wrap input{padding-right:50px}.toggle-pass{position:absolute;right:12px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;font-size:18px;padding:4px}@media(max-width:900px){.steps-grid{grid-template-columns:1fr 1fr}.action-buttons .btn{width:100%}}@media(max-width:560px){.steps-grid{grid-template-columns:1fr}}

/* Améliorations mobiles + consultation détaillée */
.phone-auth{align-items:center; padding:18px;}
.phone-card{max-width:430px; width:100%; border-radius:28px;}
.period-cell{min-width:150px; padding:10px; border:1px solid rgba(15,35,72,.12); border-radius:14px; background:#fff;}
.period-cell strong{display:block; color:#0b2a5b; font-size:13px;}
.period-time{font-size:20px; font-weight:900; color:#0b2a5b; margin:4px 0;}
.map-link{font-weight:900; color:#0b2a5b; text-decoration:underline;}
.wide-table th,.wide-table td{vertical-align:top;}
@media(max-width:760px){
  body{font-size:15px;}
  .container, main{width:100%; padding:12px!important;}
  .hero{border-radius:22px; padding:22px;}
  .hero h1{font-size:26px;}
  .card{border-radius:22px; padding:18px;}
  .grid,.grid2{grid-template-columns:1fr!important;}
  .actions,.pill-row{gap:8px; flex-wrap:wrap;}
  .btn{width:100%; text-align:center; justify-content:center;}
  .topbar,.header,.nav{flex-wrap:wrap;}
  .table-wrap{overflow-x:auto;}
  .phone-card input,.phone-card button{font-size:17px; min-height:48px;}
}




/* Correction iPhone */
@media (max-width: 768px){

    input[type="date"]{
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    input,
    select,
    textarea{
        width:100%;
        box-sizing:border-box;
    }

}








/* Correction affichage mobile Android / Samsung */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  .login-logo,
  .auth-logo,
  .login-card img,
  .card img {
    max-width: 120px !important;
    height: auto !important;
  }

  .login-card,
  .auth-card,
  .card {
    width: calc(100% - 24px) !important;
    max-width: 420px !important;
    margin: 20px auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
  }

  input,
  select,
  textarea,
  button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
  }

  .topbar,
  .topbar-inner,
  .nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .nav a {
    display: inline-block !important;
    text-decoration: none !important;
    padding: 10px 14px !important;
    border-radius: 22px !important;
    background: #24395f !important;
    color: white !important;
  }
}













button:disabled{
    opacity:0.45;
    cursor:not-allowed;
    filter:grayscale(100%);
}








/* ===== Correction responsive SGCI Route - iPhone / Android ===== */

body {
  overflow-x: hidden;
}

.container {
  width: 100%;
}

/* Boutons étapes */
/* Correction boutons étapes chauffeur */
.action-buttons{
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  margin-top: 18px !important;
}

.action-buttons .btn{
  width: 100% !important;
  height: auto !important;
  min-height: 64px !important;
  padding: 16px 18px !important;
  border-radius: 22px !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  margin: 0 !important;
}

/* Très petits téléphones */
@media (max-width: 390px){
  .action-buttons{
    gap: 12px !important;
  }

  .action-buttons .btn{
    min-height: 58px !important;
    font-size: 17px !important;
    padding: 14px 12px !important;
  }
}

button:disabled,
.action-buttons .btn:disabled{
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  filter: grayscale(70%) !important;
}

/* Cartes étape */
.steps-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

.step-card {
  width: 100% !important;
}

/* Formulaire mobile */
@media (max-width: 768px) {
  .container {
    padding: 16px 12px 40px !important;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px !important;
    border-radius: 24px !important;
  }

  .hero {
    width: 100% !important;
    padding: 24px !important;
    border-radius: 24px !important;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 42px) !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 18px !important;
    box-sizing: border-box !important;
  }

  .signature-pad {
    width: 100% !important;
    height: 220px !important;
  }
}

/* Très petits téléphones Android */
@media (max-width: 390px) {
  .action-buttons .btn {
    font-size: 16px !important;
    min-height: 54px !important;
    padding: 12px !important;
  }

  .hero h1 {
    font-size: 30px !important;
  }

  .card {
    padding: 14px !important;
  }
}









/* Correction finale espacement boutons actions */
div.actions.action-buttons {
  display: grid !important;
  grid-template-columns: 1fr !important;
  row-gap: 16px !important;
  column-gap: 0 !important;
  width: 100% !important;
}

div.actions.action-buttons > button.btn {
  display: flex !important;
  width: 100% !important;
  margin: 0 !important;
  min-height: 64px !important;
  border-radius: 24px !important;
}

div.actions.action-buttons > button.btn + button.btn {
  margin-top: 16px !important;
}
/* ===== SGCI V4 - Paie, historique, consultation compacte ===== */
.pay-period-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:14px 0 16px;
}
.pay-period-grid>div,
.info-box{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 16px;
}
.pay-period-grid strong,
.info-box strong{display:block;color:var(--sgci-navy);font-size:13px;margin-bottom:5px;text-transform:uppercase;letter-spacing:.3px}
.pay-period-grid span,
.info-box span{display:block;font-weight:900;color:var(--text)}
.alert-empty{background:#eef6ff;border-color:#b7d6ff;color:#0d2f63}
.route-badge{background:linear-gradient(135deg,#eaf2ff,#d8e8ff)!important;border-color:#9fc4ff!important;color:#0d2f63!important;font-weight:900!important}
.route-badge.empty{background:#f1f5f9!important;color:#64748b!important}
.total-pill{display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--sgci-green),#17a673);color:#fff;border-radius:999px;padding:8px 13px;font-weight:950;white-space:nowrap;box-shadow:0 8px 18px rgba(15,127,85,.18)}
.total-pill.big{font-size:22px;padding:13px 20px;border-radius:20px}
.compact-table th,.compact-table td{padding:10px 11px;font-size:13px}
.mini-steps-grid{display:grid;grid-template-columns:repeat(5,minmax(92px,1fr));gap:8px;min-width:520px}
.mini-step{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:8px;display:grid;gap:3px;align-content:start}
.mini-step strong{font-size:11px;color:#0d2f63;text-transform:uppercase}.mini-step span{font-size:16px;font-weight:900}.map-link{font-weight:900;color:#0d2f63;text-decoration:underline}.log-summary-card .section-title{align-items:flex-start}.log-summary-card .grid3{margin-top:8px}
.sgci-step-buttons{display:block!important;width:100%!important;max-width:92%!important;margin:20px auto 0!important}.sgci-step-btn{display:flex!important;width:100%!important;max-width:100%!important;min-width:0!important;height:54px!important;min-height:54px!important;margin:0 0 14px!important;padding:10px 16px!important;border-radius:18px!important;font-size:18px!important;line-height:1.2!important;align-items:center!important;justify-content:center!important;white-space:normal!important}.sgci-step-btn:last-child{margin-bottom:0!important}.sgci-step-btn:disabled{opacity:.45!important;cursor:not-allowed!important;filter:grayscale(70%)!important}
@media(max-width:920px){.pay-period-grid{grid-template-columns:1fr}.mini-steps-grid{grid-template-columns:1fr;min-width:0}.total-pill.big{font-size:20px;width:100%}.compact-table{min-width:760px}.log-summary-card .section-title{display:block}.sgci-step-buttons{max-width:100%!important}.sgci-step-btn{height:52px!important;min-height:52px!important;font-size:17px!important}}
@media(max-width:390px){.sgci-step-btn{height:50px!important;min-height:50px!important;font-size:16px!important;padding:9px 12px!important}}
