/* CHIFORI V1 — International landing
   Design tokens: navy blue (trust), orange (brand/action), green (security), white/light gray (clarity/structure) */
:root{
  --navy:#071D42;
  --blue:#123C7C;
  --orange:#FF7A1A;
  --green:#16B86E;
  --bg:#F5F7FB;
  --surface:#FFFFFF;
  --text:#172033;
  --muted:#657086;
  --line:#E3E9F5;
  --shadow:0 24px 60px rgba(7,29,66,.12);
  --shadow-sm:0 10px 26px rgba(7,29,66,.08);
  --radius:26px;
  --radius-sm:16px;
  --focus:#0B63E5;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);line-height:1.6;overflow-x:hidden}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{font-family:inherit}
ul{list-style:none}

/* Focus visibility for keyboard navigation */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid var(--focus);outline-offset:2px;border-radius:8px
}

.container{max-width:1220px;margin:auto;padding:0 22px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

.skip-link{position:absolute;left:-999px;top:auto;background:var(--navy);color:#fff;padding:12px 18px;border-radius:0 0 12px 0;z-index:200}
.skip-link:focus{left:0;top:0}

/* ---------- Header ---------- */
header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);box-shadow:0 8px 24px rgba(7,29,66,.08)}
.nav{min-height:80px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:10px 0}
.brand-block{display:flex;align-items:center;gap:12px}
.brand{display:flex;align-items:center;gap:10px;font-weight:950;color:var(--blue);font-size:26px}
.brand svg{width:42px;height:42px;flex:none}
.brand-tagline{display:block;font-size:11px;letter-spacing:.14em;color:var(--muted);font-weight:800;text-transform:uppercase;margin-top:-2px}

.nav-links{display:flex;gap:20px;color:var(--muted);font-weight:800;font-size:15px;align-items:center}
.nav-links a{padding:6px 2px;border-bottom:2px solid transparent}
.nav-links a:hover,.nav-links a:focus-visible{color:var(--navy);border-color:var(--orange)}

.nav-controls{display:flex;align-items:center;gap:10px}
.select-pill{position:relative}
.select-pill select{appearance:none;background:#EEF3FC;border:1px solid var(--line);border-radius:999px;padding:9px 34px 9px 14px;font-weight:850;font-size:14px;color:var(--navy);cursor:pointer}
.select-pill::after{content:"▾";position:absolute;right:14px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none;font-size:12px}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:999px;padding:14px 22px;font-weight:950;font-size:15px;cursor:pointer;background:var(--orange);color:#fff;box-shadow:0 16px 30px rgba(255,122,26,.25);transition:transform .15s ease,box-shadow .15s ease}
.btn:hover{transform:translateY(-2px)}
.btn.blue{background:var(--blue);box-shadow:0 16px 30px rgba(18,60,124,.25)}
.btn.green{background:var(--green);box-shadow:0 16px 30px rgba(22,184,110,.25)}
.btn.white{background:#fff;color:var(--navy);box-shadow:var(--shadow-sm);border:2px solid var(--blue)}
.btn.ghost{background:transparent;color:var(--navy);box-shadow:none;border:1.5px solid var(--line)}
.btn.sm{padding:10px 16px;font-size:13px}
.btn.block{width:100%}
.btn[disabled]{opacity:.55;cursor:not-allowed;transform:none}
.reglement-link{display:inline-block;margin-top:12px;font-size:13px;color:var(--muted);text-decoration:underline}
.reglement-link:hover{color:var(--navy)}

.modal-overlay{position:fixed;inset:0;background:rgba(7,29,66,.5);z-index:300;display:flex;align-items:center;justify-content:center;padding:20px}
.modal-box{position:relative;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:32px 26px;max-width:440px;width:100%;text-align:center}
.modal-box h3{font-size:22px;color:var(--navy);margin-bottom:20px;line-height:1.3}
.modal-actions{display:flex;flex-direction:column;gap:10px}
.modal-close{position:absolute;top:14px;right:14px;background:none;border:none;font-size:18px;color:var(--muted);cursor:pointer;width:32px;height:32px}

.menu-toggle{display:none;background:none;border:1.5px solid var(--line);border-radius:12px;width:44px;height:44px;align-items:center;justify-content:center;cursor:pointer}
.menu-toggle span,.menu-toggle span::before,.menu-toggle span::after{content:"";display:block;width:20px;height:2px;background:var(--navy);position:relative;transition:.2s}
.menu-toggle span::before{position:absolute;top:-6px}
.menu-toggle span::after{position:absolute;top:6px}
.menu-toggle.active span{background:transparent}
.menu-toggle.active span::before{top:0;transform:rotate(45deg)}
.menu-toggle.active span::after{top:0;transform:rotate(-45deg)}
body.nav-open{overflow:hidden}

/* ---------- Hero ---------- */
.hero{background:radial-gradient(circle at 88% 8%,rgba(255,122,26,.14),transparent 34%),linear-gradient(180deg,#FFFFFF,#F2F6FC 62%,#EAF0FA);color:var(--text);position:relative}
.hero .container{padding-top:64px;padding-bottom:70px;display:grid;grid-template-columns:1fr 1.15fr;gap:48px;align-items:center}
/* Arabic (dir="rtl"): CSS Grid mirrors implicit column order under RTL,
   which swaps text/visual columns and breaks this validated layout. Force
   the container's own layout direction back to ltr so columns keep their
   physical positions; direction:rtl on the children still renders Arabic
   text correctly right-to-left. Scoped to html[dir="rtl"] only — no effect
   on fr/en/sq (ltr). */
html[dir="rtl"] .hero .container{direction:ltr}
html[dir="rtl"] .hero .container>*{direction:rtl}
.pill{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);padding:9px 15px;border-radius:999px;font-weight:900;margin-bottom:20px;font-size:13.5px;color:var(--navy);box-shadow:var(--shadow-sm)}
.pill .dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(22,184,110,.2)}
h1{font-size:54px;line-height:1.05;letter-spacing:-1.2px;margin-bottom:16px;font-weight:900;color:var(--navy)}
.hero h1{text-transform:uppercase;font-size:50px}
h1 .accent{color:var(--orange)}
.lead{font-size:19px;color:var(--muted);max-width:600px;margin-bottom:20px}

.safe-strip{display:inline-flex;align-items:center;gap:10px;background:#EAFBF3;border:1px solid #BFEFD8;padding:10px 16px;border-radius:14px;margin-bottom:22px;font-weight:900;color:#0E8B54}
.safe-strip .shield{width:22px;height:22px;flex:none}

.hero-tags{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:26px}
.tag{background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:999px;font-weight:800;font-size:13.5px;display:inline-flex;align-items:center;gap:6px;color:var(--navy);box-shadow:var(--shadow-sm)}

.hero-actions{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.hero-actions .cta{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.hero-actions .cta small{font-size:12.5px;font-weight:700;color:var(--muted);padding-left:4px}
.micro{color:var(--muted);font-size:13.5px}

/* ---------- Hero visual composition ---------- */
/* Validated premium visual: a transparent-background composition (car +
   smartphone + CHIFORI SAFE card), used unedited. No card frame needed —
   the image already floats on its own transparent background. */
.visual-stage{position:relative}
.hero-visual-photo{width:100%;height:auto;display:block;object-fit:contain}

/* Reused by the "Suivi en direct" mini map further down the page */
.phone-map{margin:10px 0;border-radius:14px;overflow:hidden;background:#EAF1FF}
.phone-map svg{width:100%;height:auto;display:block}

/* ---------- Sections generic ---------- */
section{padding:76px 0}
.section-title{text-align:center;max-width:760px;margin:0 auto 44px}
.section-title h2{font-size:38px;color:var(--navy);line-height:1.15;margin-bottom:12px;font-weight:900}
.section-title p{font-size:17.5px;color:var(--muted)}
.eyebrow{display:inline-flex;align-items:center;gap:6px;color:var(--orange);font-weight:900;font-size:13px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:10px}

.card{background:var(--surface);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow-sm);border:1px solid var(--line)}
.choice-grid,.forms,.split{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.choice h3{font-size:27px;color:var(--navy);margin-bottom:10px}
.choice p{color:var(--muted);margin-bottom:16px}
.choice-list li{padding:7px 0;color:var(--muted)}
.choice-list li::before{content:"✓";color:var(--green);font-weight:950;margin-right:10px}
.choice-login-link{margin-top:14px;text-align:center;font-size:14px}
.choice-login-link a{color:var(--blue);font-weight:700;text-decoration:underline}

.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.icon{width:52px;height:52px;border-radius:16px;background:#EEF4FF;display:grid;place-items:center;font-size:26px;margin-bottom:14px}
.icon.security{background:#EAFBF3}
.icon.brand{background:#FFF1E4}
.card h3{font-size:19.5px;color:var(--navy);margin-bottom:8px}
.card p,.card li{color:var(--muted);font-size:15px}

/* ---------- Tracking demo ---------- */
.track-panel{background:linear-gradient(180deg,#fff,#F7FAFF);border-radius:var(--radius);border:1px solid var(--line);box-shadow:var(--shadow);padding:32px;max-width:920px;margin:0 auto}
.track-top{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.track-status{font-size:22px;color:var(--navy);font-weight:900}
.track-meta{display:flex;gap:22px;flex-wrap:wrap;margin-bottom:22px}
.track-meta .item{min-width:120px}
.track-meta .item span{display:block;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-weight:800}
.track-meta .item strong{font-size:22px;color:var(--navy)}
.track-steps{display:flex;gap:8px;margin-bottom:8px}
.track-step{flex:1;text-align:center}
.track-step .dot{width:16px;height:16px;border-radius:50%;background:var(--line);margin:0 auto 8px;transition:background .3s}
.track-step.active .dot{background:var(--orange)}
.track-step.done .dot{background:var(--green)}
.track-step p{font-size:12.5px;color:var(--muted);font-weight:800}
.track-step.active p,.track-step.done p{color:var(--navy)}
.track-bar{height:6px;background:var(--line);border-radius:6px;overflow:hidden;margin-bottom:22px}
.track-bar-fill{height:100%;background:linear-gradient(90deg,var(--orange),var(--green));width:0%;transition:width .6s ease}
.track-disclaimer{font-size:13px;color:var(--muted);background:#FFF6EC;border:1px solid #FFE1BE;border-radius:14px;padding:12px 14px;display:flex;gap:8px;align-items:flex-start}

/* ---------- Steps / journeys ---------- */
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.step{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:0 14px 34px rgba(7,29,66,.06)}
.step-num{width:36px;height:36px;border-radius:12px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:950;margin-bottom:10px}
.journey-scroll{display:flex;gap:14px;overflow-x:auto;padding:6px 2px 14px;scroll-snap-type:x proximity}
.journey-scroll .step{min-width:190px;scroll-snap-align:start}

/* ---------- Payment model ---------- */
.pay-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:1000px;margin:0 auto}
.pay-grid .card{text-align:center}
.badge-zero{display:inline-block;background:var(--green);color:#fff;font-weight:950;padding:8px 16px;border-radius:999px;font-size:14px;margin-bottom:14px}

/* ---------- Country / currency ---------- */
.country-picker{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-bottom:30px}
.country-chip{background:#fff;border:2px solid var(--line);border-radius:18px;padding:14px 20px;font-weight:900;cursor:pointer;font-size:16px;display:flex;align-items:center;gap:8px;color:var(--navy)}
.country-chip[aria-pressed="true"]{border-color:var(--orange);background:#FFF6EC}
.currency-demo{max-width:640px;margin:0 auto;text-align:center}
.currency-demo .price{font-size:46px;color:var(--blue);font-weight:950;margin:6px 0}
.currency-demo .fee{font-size:15px;color:var(--muted)}

/* ---------- Pricing / partner offer ---------- */
.pricebox{max-width:840px;margin:auto;text-align:center}
.price{font-size:50px;color:var(--blue);font-weight:950;margin:10px 0}

/* ---------- Forms ---------- */
form{display:grid;gap:13px;margin-top:18px}
label{font-size:13.5px;font-weight:800;color:var(--navy);display:block;margin-bottom:4px}
.field{display:flex;flex-direction:column}
input,select,textarea{width:100%;border:1px solid #D6DEEC;border-radius:14px;padding:14px 15px;font-size:16px;background:#fff;color:var(--text)}
textarea{min-height:100px;resize:vertical}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.consent{display:flex;align-items:flex-start;gap:10px;font-size:13.5px;color:var(--muted)}
.consent input{width:18px;height:18px;margin-top:2px;flex:none}
.note{font-size:13.5px;color:var(--muted);margin-top:10px}
.form-msg{font-size:13.5px;border-radius:12px;padding:10px 12px;display:none}
.form-msg.show{display:block}
.form-msg.ok{background:#EAFBF3;color:#0E8B54;border:1px solid #BFEFD8}
.form-msg.error{background:#FDEBEA;color:#C13A2E;border:1px solid #F6C7C1}
.wa-config-note{font-size:12px;color:var(--muted);background:#F1F4FA;border:1px dashed var(--line);border-radius:10px;padding:8px 10px;margin-top:6px}

/* ---------- Countries strip ---------- */
.countries{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}
.country{background:#fff;border-radius:20px;padding:16px 26px;font-size:20px;font-weight:950;box-shadow:var(--shadow-sm)}

/* ---------- Footer ---------- */
footer{background:var(--navy);color:#fff;padding:40px 0 28px}
.footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:28px;margin-bottom:26px}
footer h5{font-size:14px;text-transform:uppercase;letter-spacing:.06em;color:#9FB4DD;margin-bottom:12px}
footer ul li{margin-bottom:8px}
footer a{color:#D7E3F8}
footer a:hover{color:#fff}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:18px;color:#9FB4DD;font-size:13.5px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}

/* ---------- Route request (Google Maps integration point) ---------- */
.route-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;align-items:start;max-width:1000px;margin:0 auto}
/* Same RTL-mirroring issue as .hero .container (see comment above) — keep
   form/map columns physically in place under Arabic. */
html[dir="rtl"] .route-grid{direction:ltr}
html[dir="rtl"] .route-grid>*{direction:rtl}
.route-summary{display:flex;gap:18px;flex-wrap:wrap;margin:6px 0 4px}
.route-summary .item{min-width:110px}
.route-summary .item span{display:block;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-weight:800}
.route-summary .item strong{font-size:20px;color:var(--navy)}
.route-map{border-radius:var(--radius-sm);border:1px solid var(--line);background:#EEF3FC;min-height:320px;display:flex;align-items:center;justify-content:center}
.route-map-placeholder{text-align:center;padding:24px;color:var(--muted)}
.route-map-placeholder span{font-size:34px;display:block;margin-bottom:8px}
.route-map-placeholder p{margin:2px 0}
.integration-note{font-size:12px;color:var(--muted);background:#F1F4FA;border:1px dashed var(--line);border-radius:10px;padding:8px 10px;margin-top:8px}
.route-tracking-slot{max-width:1000px;margin:22px auto 0;border:1px dashed var(--line);border-radius:var(--radius-sm);padding:18px;text-align:center;color:var(--muted);font-size:14px}

/* DEMO SIMULATION — route request preview only, not a real map.
   Safe to delete this whole block together with the matching JS block in
   js/app.js (search "DEMO SIMULATION"); nothing else depends on it. */
.route-demo-map{width:100%;padding:20px;text-align:center}
.route-demo-map svg{width:100%;max-width:280px;height:auto}
.route-demo-label{margin-top:8px;font-size:12px;color:var(--muted);font-style:italic}
/* END DEMO SIMULATION CSS */

/* ---------- Legal placeholder pages ---------- */
.legal-page{max-width:760px;margin:60px auto;padding:0 22px}
.legal-page h1{font-size:32px;color:var(--navy);margin-bottom:16px}
.legal-page p{color:var(--muted);margin-bottom:14px}
.legal-page a.back{display:inline-block;margin-top:20px;font-weight:800;color:var(--blue)}

/* ---------- Responsive ---------- */
@media(max-width:980px){
  .hero .container,.split,.choice-grid,.forms{grid-template-columns:1fr}
  .grid4{grid-template-columns:1fr 1fr}
  .pay-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  h1{font-size:42px}
  .hero h1{font-size:38px}
  .nav-links{display:none}
  .menu-toggle{display:flex}
  .route-grid{grid-template-columns:1fr}
  .route-map{min-height:260px}
}
@media(max-width:940px){
  .steps{grid-template-columns:1fr 1fr}
}
/* Mobile hero order: visual first, then title/lead/safe/tags/CTA/share
   (expansion phrase lives in its own section right after the hero, so it
   already comes last — no change needed there). Desktop (>768px) untouched:
   the two-column grid keeps its normal DOM order. */
@media(max-width:768px){
  .hero .container>.visual-stage{order:-1;margin-bottom:22px}
}
.nav-mobile-controls{display:none}
@media(max-width:640px){
  .nav-controls .select-pill{display:none}
  .nav-mobile-controls{display:flex;gap:10px;margin-top:14px}
  .hero .container{padding-top:40px}
  h1{font-size:34px}
  .hero h1{font-size:30px}
  .lead{font-size:17px}
  .grid4,.grid3,.steps,.field-row{grid-template-columns:1fr}
  .btn{width:100%}
  .hero-actions{flex-direction:column;align-items:stretch}
  .hero-actions .cta{align-items:stretch}
  .section-title h2{font-size:28px}
  .brand{font-size:21px}
  .footer-grid{grid-template-columns:1fr}
  .country-picker{gap:8px}
  .country-chip{padding:11px 14px;font-size:14px}
  .route-summary{gap:12px}
  .route-map{min-height:200px}
  .section-title{margin-bottom:24px}
  .track-panel{padding:18px}
  .track-top{margin-bottom:14px;gap:10px}
  .phone-map{margin-bottom:12px !important}
  .track-meta{gap:14px;margin-bottom:14px}
  .track-meta .item strong{font-size:18px}
  .track-steps{margin-bottom:6px}
  .track-step .dot{width:12px;height:12px;margin-bottom:5px}
  .track-step p{font-size:11px}
  .track-bar{margin-bottom:14px}
  .track-disclaimer{font-size:12px}
}

/* Nav open state on mobile */
@media(max-width:980px){
  .nav-links.open{display:flex;position:absolute;top:80px;left:0;right:0;z-index:150;background:#fff;flex-direction:column;padding:16px 22px;box-shadow:0 20px 30px rgba(7,29,66,.12);gap:14px;border-top:1px solid var(--line);max-height:calc(100vh - 80px);overflow-y:auto}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important}
}
