/* Système de design BST — page d'accueil (mobile d'abord) */
:root{
  color-scheme:light;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
  --vert:#347600; --vert-nuit:#1F3A12; --jaune:#F2C21B;
  --texte:#1B2414; --texte2:#4D5947; --fond:#F2F5EE; --blanc:#FFFFFF;
  --bordure:#D3DBC9; --bordure2:#C5CFBA; --bordure3:#E3E8DC;
  --texte-vert:#F1F6EC; --texte-vert2:#D7E4CB; --texte-vert3:#B9CCA8;
  --titre:'Barlow Condensed','Arial Narrow',sans-serif;
  --corps:'Barlow',system-ui,sans-serif;
}
/* Éléments d'accueil uniquement, préfixés .nh- pour ne pas toucher aux autres pages */
.nh-root{margin:0;background:var(--fond);color:var(--texte);font-family:var(--corps);font-size:16px;line-height:1.45}
.nh-root a{color:var(--vert)}.nh-root a:hover{color:#28601A}
/* Neutralise l'ancien style du bandeau (styles.css) pour le nouvel en-tête */
.hero.hero-blue{margin:0;padding:0;background:var(--vert) !important;color:var(--blanc) !important;display:block}
.hero.hero-blue.bst-app-header-hidden{display:none}
.hero.hero-blue .hero-top{justify-content:space-between;min-height:auto}

/* --- En-tête --- */
.nh-header{background:var(--fond)}
.nh-header-inner{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 16px}
.nh-brand{display:flex;align-items:center;gap:10px;color:var(--blanc);text-decoration:none}
.nh-brand img{flex:none;display:block;width:44px;height:44px}
.nh-brand span{max-width:104px;font-weight:600;font-size:14px;line-height:1.15}
.nh-header-actions{display:flex;align-items:center;gap:4px}
.nh-lang{display:flex;align-items:center;gap:3px;height:20px;padding:0 5px;border:1px solid rgba(255,255,255,.5);border-radius:6px;background:transparent;color:var(--blanc);font:600 10px var(--corps);cursor:pointer}
.nh-lang svg{flex:none;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nh-lang select{font:inherit;background:transparent;border:0;outline:none;color:inherit;cursor:pointer;padding:0}

/* --- Bandeau vert --- */
.nh-hero{background:var(--vert);color:var(--blanc);padding:18px 16px 84px}
.nh-hero h1{margin:0;font-family:var(--titre);font-weight:600;font-size:34px;line-height:1.1}
.nh-hero p{margin:12px 0 0;max-width:330px;font-size:17px;line-height:1.45;color:var(--texte-vert);text-wrap:pretty}

/* --- Billet blanc (formulaire) --- */
.nh-ticket{position:relative;margin:-84px 16px 0;background:var(--blanc);border-radius:8px;box-shadow:0 18px 32px -20px rgba(20,40,6,.55),0 1px 0 rgba(20,40,6,.08)}
.nh-ticket-route{display:flex;gap:12px;padding:20px 14px 20px 18px}
.nh-route-line{flex:none;display:flex;flex-direction:column;align-items:center;padding:34px 0 10px}
.nh-route-line .dot-start{display:block;width:12px;height:12px;box-sizing:border-box;border:3px solid var(--vert);border-radius:50%;background:var(--blanc)}
.nh-route-line .line{display:block;flex:1;width:0;margin:5px 0;border-left:2px dotted var(--vert)}
.nh-route-line .dot-end{display:block;width:14px;height:14px;box-sizing:border-box;border:3px solid var(--texte);border-radius:50%;background:var(--jaune)}
.nh-route-fields{flex:1;min-width:0;display:flex;flex-direction:column;gap:13px}
.nh-field{display:flex;flex-direction:column;gap:2px}
.nh-field>span{font-size:14px;font-weight:600;color:var(--texte2)}
.nh-field .input{display:flex;align-items:center;gap:6px}
.nh-field .input input{flex:1;min-width:0;margin:0;padding:0;border:0;background:transparent;color:var(--texte);font-family:var(--corps);font-weight:400;font-size:20px;line-height:1.1;outline:none}
.nh-field .input svg{flex:none;width:18px;height:18px;fill:none;stroke:var(--texte2);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nh-sep{height:1px;background:var(--bordure3)}
.nh-swap{flex:none;align-self:center;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1.5px solid var(--bordure2);border-radius:50%;background:var(--blanc);color:var(--vert);cursor:pointer}
.nh-swap svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* --- Découpe pointillée --- */
.nh-perf{position:relative;display:flex;align-items:center;height:24px}
.nh-perf::before,.nh-perf::after{content:"";position:absolute;top:0;width:24px;height:24px;border-radius:50%;background:var(--fond)}
.nh-perf::before{left:-12px}.nh-perf::after{right:-12px}
.nh-perf i{flex:1;margin:0 20px;border-top:2px dashed var(--bordure2)}
.nh-perf-v{display:none}

/* --- Date + compteurs + bouton --- */
.nh-ticket-meta{display:flex;flex-direction:column;gap:16px;padding:4px 16px 20px}
.nh-date{display:flex;flex-direction:column;gap:6px}
.nh-date>span{font-size:14px;font-weight:600;color:var(--texte2)}
.nh-date-btn{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 12px 0 14px;border:1.5px solid var(--bordure2);border-radius:6px;background:var(--blanc);color:var(--texte);font:600 17px var(--corps);text-align:left;cursor:pointer}
.nh-date-btn svg{flex:none;width:20px;height:20px;fill:none;stroke:var(--vert);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nh-counters{display:flex;flex-direction:column}
.nh-counter{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px}
.nh-counter .lbl{display:flex;flex-direction:column}
.nh-counter .lbl b{font-weight:400;font-size:15px;line-height:1.3}
.nh-counter .lbl span{font-size:14px;line-height:1.3;color:var(--texte2)}
.nh-counter .ctl{display:flex;align-items:center;gap:4px}
.nh-counter .ctl button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1.5px solid var(--vert);border-radius:50%;background:var(--blanc);color:var(--vert);cursor:pointer}
.nh-counter .ctl button:disabled{border-color:var(--bordure);color:#A3AD9B;cursor:not-allowed}
.nh-counter .ctl button.plus{background:var(--vert);color:var(--blanc)}
.nh-counter .ctl button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.nh-counter .ctl output{min-width:30px;text-align:center;font-family:var(--corps);font-weight:400;font-size:20px;line-height:1}
.nh-counter-sep{height:1px;background:var(--bordure3)}
.nh-submit{height:54px;border:0;border-radius:6px;background:var(--vert);color:var(--blanc);font:700 18px var(--corps);cursor:pointer}
.nh-msg{display:block;color:#c0392b;font-size:14px;font-weight:600;margin:0 0 4px}
.nh-msg[hidden]{display:none}

/* --- Texte QR --- */
.nh-qr-note{margin:14px 16px 0;font-size:15px;line-height:1.45;color:var(--texte2);text-wrap:pretty}

/* --- Sections --- */
.nh-pro{padding:24px 16px}
.nh-pro h2,.nh-app h2,.nh-aide h2{margin:0;font-family:var(--titre);font-weight:600;font-size:22px;line-height:1.15;text-wrap:balance;color:var(--texte)}
.nh-app h2{color:var(--blanc)}
.nh-pro-list{list-style:none;margin:20px 0 0;padding:0;background:var(--blanc);border:1px solid var(--bordure);border-radius:8px}
.nh-pro-list li{border-bottom:1px solid var(--bordure3)}
.nh-pro-list li:last-child{border-bottom:0}
.nh-pro-list a{display:flex;align-items:center;gap:14px;padding:16px 14px 16px 16px;color:var(--texte);text-decoration:none}
.nh-pro-list a .ic{flex:none;width:28px;height:28px;fill:none;stroke:var(--vert);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nh-pro-list a .txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.nh-pro-list a .txt b{font-weight:600;font-size:15px}
.nh-pro-list a .txt span{font-size:15px;line-height:1.4;color:var(--texte2)}
.nh-pro-list a .chev{flex:none;width:20px;height:20px;fill:none;stroke:var(--texte2);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nh-admin-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:16px;color:var(--vert);font-weight:600;font-size:16px}
.nh-admin-link svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.nh-app{background:var(--vert-nuit);color:var(--blanc);padding:24px 16px}
.nh-app p{margin:10px 0 0;font-size:16px;line-height:1.5;color:var(--texte-vert2);text-wrap:pretty}
.nh-app .btn{display:flex;align-items:center;justify-content:center;gap:10px;height:54px;margin-top:20px;border-radius:6px;background:var(--jaune);color:var(--texte);font-weight:700;font-size:18px;text-decoration:none}
.nh-app .btn svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nh-app .ver{margin:10px 0 0;font-size:14px;color:var(--texte-vert3);text-align:center}

.nh-aide{background:var(--blanc);border-bottom:1px solid var(--bordure);padding:24px 16px 28px}
.nh-aide p{margin:10px 0 0;font-size:16px;line-height:1.5;color:var(--texte2);text-wrap:pretty}
.nh-aide .stack{display:flex;flex-direction:column;gap:10px;margin-top:20px}
.nh-aide .wa{display:flex;align-items:center;justify-content:center;gap:10px;height:54px;border-radius:6px;background:var(--vert);color:var(--blanc);font-weight:700;font-size:18px;text-decoration:none}
.nh-aide .wa svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nh-aide .num{margin:0;font-size:15px;color:var(--texte2);text-align:center}
.nh-aide .form{display:flex;align-items:center;justify-content:center;height:54px;box-sizing:border-box;border:1.5px solid var(--vert);border-radius:6px;color:var(--vert);font-weight:700;font-size:18px;text-decoration:none}
.nh-facebook{display:flex;align-items:center;min-height:44px;margin-top:4px;color:var(--vert);font-weight:600;font-size:15px;text-decoration:none}

/* --- Pied de page --- */
.nh-footer{display:flex;flex-direction:column;gap:14px;background:var(--vert-nuit);color:var(--blanc);padding:20px 16px 24px}
.nh-footer .brand{display:flex;align-items:center;gap:12px}
.nh-footer .brand img{flex:none;display:block;width:56px;height:56px}
.nh-footer .brand span{font-weight:600;font-size:15px}
.nh-footer .motto{margin:0;font-size:15px;color:var(--texte-vert2)}
.nh-footer nav{display:flex;flex-wrap:wrap;gap:0 20px}
.nh-footer nav a{display:flex;align-items:center;min-height:44px;color:var(--blanc);font-size:15px}
.nh-footer .copyright{margin:0;font-size:14px;color:var(--texte-vert3)}
.nh-footer .nh-delete{display:flex;align-items:center;min-height:44px;font-size:14px;color:var(--texte-vert3)}

/* --- Corrections : règles des anciennes feuilles (styles.css, home-layout.css) qui débordaient sur l'accueil --- */
body.bst-home-page #home.nh-root{padding:0;border-radius:0;background:var(--fond)}
body.bst-home-page .language-switcher.nh-lang select{width:auto;min-width:0;height:auto;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font-size:inherit;box-shadow:none}
.nh-lang select option{color:var(--texte)}
body.bst-home-page form.nh-ticket{width:auto;max-width:none}
body.bst-home-page .language-switcher.nh-lang select{line-height:18px}
/* Raccourcis « Proposer un voyage » et « Rechercher un billet » (ajoutés par passenger-search.js) */
body.bst-home-page .nh-root .passenger-shortcuts{display:flex;flex-direction:column;gap:10px;margin:20px 16px 0;padding:0}
body.bst-home-page .nh-root .passenger-shortcuts a.primary{display:flex;align-items:center;justify-content:center;width:auto;height:48px;min-height:48px;box-sizing:border-box;margin:0;padding:0 16px;border:1.5px solid var(--vert);border-radius:6px;background:var(--blanc);color:var(--vert);font:700 16px var(--corps);text-decoration:none;box-shadow:none}

/* Textes non gras (05/10) : 500 au plus ; les titres restent en Barlow Condensed 600, la graisse la plus fine hébergée */
body.bst-home-page .nh-brand span{font-family:var(--corps);font-weight:500}
body.bst-home-page .nh-root :is(.nh-field>span,.nh-meta-date>span,.nh-date-btn,.nh-submit,.nh-admin-link,.nh-pro-list a .txt b,.nh-app .btn,.nh-aide .form,.nh-facebook),body.bst-home-page .nh-root .passenger-shortcuts a.primary{font-weight:500}
body.bst-home-page .nh-root form.nh-ticket .nh-ticket-meta :is(.nh-meta-date>span,.nh-date>span,.nh-date-btn){font-weight:400}
/* Tailles de texte qui suivent la largeur de l'écran, du téléphone à l'ordinateur */
body.bst-home-page .nh-hero h1{font-size:clamp(28px,2.4vw + 20px,44px)}
body.bst-home-page .nh-root :is(.nh-pro,.nh-app,.nh-aide) h2{font-size:clamp(21px,1vw + 17px,28px)}
body.bst-home-page .nh-root :is(.nh-hero p,.nh-app p,.nh-aide p,.nh-qr-note,.nh-submit-row p){font-size:clamp(15px,.25vw + 14px,17px)}

/* --- Ordinateur (>= 700px) --- */
@media (min-width:700px){
  .nh-header-inner{width:min(1160px,calc(100% - 48px));margin:0 auto;flex-wrap:wrap;gap:12px 32px;padding:16px 0}
  .nh-brand img{width:52px;height:52px}
  .nh-brand span{max-width:none;font-size:17px;line-height:1.2}
  .nh-nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px 24px}
  .nh-nav a{display:flex;align-items:center;min-height:44px;color:var(--texte);font-weight:600;font-size:16px;text-decoration:none}
  .nh-lang{gap:4px;padding:0 6px;font-size:11px}
  .nh-hero{padding:40px 0 104px}
  .nh-hero .wrap{width:min(1160px,calc(100% - 48px));margin:0 auto;display:flex;align-items:flex-end;padding:0}
  .nh-hero h1{font-size:clamp(28px,4vw,44px);line-height:1.05}
  .nh-hero p{max-width:520px;font-size:17px;margin-top:14px}
  .nh-ticket{width:100%;max-width:1160px;margin:-96px auto 0;display:flex;flex-wrap:wrap;box-shadow:0 24px 40px -26px rgba(20,40,6,.6),0 1px 0 rgba(20,40,6,.08)}
  .nh-ticket-route{flex:1 1 360px;box-sizing:border-box;gap:16px;padding:28px 24px 28px 30px}
  .nh-route-line .dot-start{width:14px;height:14px}
  .nh-route-line .dot-end{width:16px;height:16px}
  .nh-route-line .line{margin:6px 0}
  .nh-route-fields{gap:16px}
  .nh-field .input input{font-size:24px}
  .nh-swap{width:48px;height:48px}
  .nh-swap svg{width:22px;height:22px}
  .nh-perf-v{display:block;position:relative;flex:none;width:0;margin:18px 0;border-left:2px dashed var(--bordure2)}
  .nh-perf-v::before{content:"";position:absolute;left:-11px;top:-30px;width:24px;height:24px;border-radius:50%;background:var(--vert)}
  .nh-perf-v::after{content:"";position:absolute;left:-11px;bottom:-30px;width:24px;height:24px;border-radius:50%;background:var(--fond)}
  .nh-ticket-meta{flex:1.4 1 460px;box-sizing:border-box;gap:22px;padding:28px 30px}
  .nh-meta-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:18px 24px}
  .nh-meta-date{flex:1.3 1 200px;min-width:0;display:flex;flex-direction:column;gap:6px}
  .nh-meta-date>span{font-size:15px;font-weight:600;color:var(--texte2)}
  .nh-meta-counter{flex:1 1 150px;min-width:0;display:flex;flex-direction:column;gap:8px}
  .nh-submit-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px}
  .nh-submit{flex:none;height:56px;padding:0 36px;font-size:19px}
  .nh-submit-row p{flex:1 1 240px;margin:0;font-size:15px;line-height:1.45;color:var(--texte2)}
  .nh-pro{padding:56px 0}
  .nh-pro .wrap{width:min(1160px,calc(100% - 48px));margin:0 auto;display:flex;flex-wrap:wrap;align-items:flex-start;gap:32px 64px}
  .nh-pro-head{flex:1 1 340px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:20px}
  .nh-pro-head h2{font-size:26px;line-height:1.15}
  .nh-pro-list{flex:1.5 1 520px;min-width:0;margin:0}
  .nh-pro-list a{gap:18px;padding:22px 22px 22px 24px}
  .nh-pro-list a .ic{width:30px;height:30px;stroke-width:1.7}
  .nh-pro-list a .txt b{font-size:16px;line-height:1.35}
  .nh-pro-list a .txt span{font-size:15px;line-height:1.45}
  .nh-pro-list a .chev{width:22px;height:22px}
  .nh-app-aide{padding:0 0 56px}
  .nh-app-aide .wrap{width:min(1160px,calc(100% - 48px));margin:0 auto;display:flex;flex-wrap:wrap;gap:24px}
  .nh-app{flex:1 1 420px;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:28px;border-radius:8px}
  .nh-app h2,.nh-aide h2{font-size:26px}
  .nh-app .btn{margin-top:6px;padding:0 26px;box-sizing:border-box}
  .nh-app .ver{text-align:left}
  .nh-aide{flex:1 1 420px;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:28px;border:1px solid var(--bordure);border-radius:8px}
  .nh-aide .stack{flex-direction:row;flex-wrap:wrap;gap:12px;margin-top:6px}
  .nh-aide .wa,.nh-aide .form{padding:0 24px;box-sizing:border-box}
  .nh-aide .num{text-align:left}
  .nh-footer{padding:28px 0 32px}
  .nh-footer .wrap{width:min(1160px,calc(100% - 48px));margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 40px}
  .nh-footer .brand img{width:64px;height:64px}
  .nh-footer .brand span{font-size:17px}
  .nh-footer .motto{font-size:16px}
  .nh-footer nav{gap:0 28px}
  .nh-footer nav a{font-size:16px}
  .nh-hero .wrap{flex-direction:column;align-items:flex-start}
  .nh-perf{display:none}
  body.bst-home-page form.nh-ticket{width:auto;max-width:1160px;margin:-96px max(24px,calc((100% - 1160px) / 2)) 0}
  body.bst-home-page .nh-root .passenger-shortcuts{flex-direction:row;width:min(1160px,calc(100% - 48px));margin:20px auto 0}
  body.bst-home-page .nh-root .passenger-shortcuts a.primary{flex:1 1 0}
}
/* --- Tablette (700 à 999px) : billet empilé comme sur téléphone, la découpe verticale ne tient pas --- */
@media (min-width:700px) and (max-width:999px){
  body.bst-home-page form.nh-ticket{display:block}
  .nh-perf{display:flex}
  .nh-perf-v{display:none}
}
/* Inscription : exemple sous chaque case, case mal remplie en rouge (06/10) */
#registerForm .field-hint{display:block;margin-top:4px;font-size:13px;font-weight:400;line-height:1.35;color:#4D5947}
#registerForm .field-error-input{border-color:#c0392b!important;background:#fff6f5!important;box-shadow:0 0 0 2px rgba(192,57,43,.2)!important}
#registerForm .field-error-text{display:block;margin-top:4px;font-size:13px;font-weight:600;line-height:1.35;color:#c0392b}
/* Langue : un seul cadre, la pastille. Le contour bleu décalé de home-layout.css (focus) est retiré ; la bordure de la pastille passe en blanc à la place. */
body.bst-home-page .language-switcher.nh-lang select:focus-visible{outline:none}
body.bst-home-page .language-switcher.nh-lang:has(select:focus-visible){border-color:var(--blanc)}
