/* Oriacolis — application cliente. Identité reprise du site (index.html : variables, cartes, tarifs, Cercle). */
:root {
  --petrol: #0D3B45;
  --petrol-deep: #072830;
  --sand: #DCCDB3;
  --ivory: #F6F4F1;
  --white: #FFFFFF;
  --charcoal: #222425;
  --gold: #C9A85A;
  --gold-dark: #8B6F2E;
  --muted: rgba(34, 36, 37, 0.66);
  --line: rgba(13, 59, 69, 0.10);
  --line-gold: rgba(201, 168, 90, 0.35);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --script: 'Great Vibes', cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(100% * var(--phone-viewport-scale, 1)); }
body {
  margin: 0; min-height: 100vh; background: var(--petrol); color: var(--charcoal);
  font: 1rem/1.6 var(--sans);
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, .offer__name, .colis__status { font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--serif); color: var(--petrol); font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: var(--petrol); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
:focus-visible { outline: 0.125rem solid var(--gold); outline-offset: 0.1875rem; }

/* En-tête : comme la barre du site (ivoire, logo foncé, filet or) */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center;
  padding: calc(0.625rem + env(safe-area-inset-top)) 1.125rem 0.625rem;
  background: #0A1F24; border-bottom: 1px solid var(--gold);
  backdrop-filter: blur(0.375rem);
}
.app-header__logo { height: 2.125rem; width: auto; display: block; margin-right: 0.625rem; }
.app-header__name { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; color: var(--ivory); line-height: 1; }
.app-header__sub { font-size: 0.65625rem; letter-spacing: .14em; color: var(--gold); font-weight: 600; margin-top: 0.1875rem; }

.app-main { max-width: 32.5rem; margin: 0 auto; padding: 1.375rem 1rem 1.75rem; }
.view { display: none; }
.view.is-active { display: block; }

/* Titres d'écran : grand Cormorant, accent en italique or comme sur le site */
.screen-title { font-size: 2.25rem; line-height: 1.08; margin-bottom: 0.5rem; color: var(--ivory); }
.screen-title em { font-style: italic; color: var(--gold); font-weight: 500; }
.screen-lead { color: rgba(246, 244, 241, 0.78); margin-bottom: 1.25rem; max-width: 34ch; }

/* Carte du site : blanche, bord or léger, coins doux */
.card { background: var(--white); border: 1px solid var(--line-gold); border-radius: 1rem; padding: 1.25rem 1.125rem; }
.card + .card, .card + .panel, .panel + .card { margin-top: 1rem; }
.panel { background: var(--sand); border-radius: 1rem; padding: 1.25rem 1.125rem; margin-top: 1rem; position: relative; }
.panel h2 { font-size: 1.5rem; margin-bottom: 0.625rem; }

/* Formulaires */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 1rem; font-weight: 600; color: var(--petrol); margin-bottom: 0.375rem; }
.field input[type="text"], .field select {
  width: 100%; min-height: 3.125rem; padding: 0.75rem 0.875rem; font: 500 1rem var(--sans); color: var(--charcoal);
  background: var(--ivory); border: 1px solid var(--line-gold); border-radius: 0.75rem; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238B6F2E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 0.1875rem rgba(201, 168, 90, 0.22); }
.field__help { font-size: 0.8125rem; color: var(--muted); margin-top: 0.375rem; }
.check { display: flex; align-items: center; margin-bottom: 1.125rem; font-size: 0.9375rem; min-height: 2.75rem; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--petrol); margin: 0 0.625rem 0 0; flex: none; }

/* Boutons : pilule pétrole comme le bouton WhatsApp du site */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.125rem; padding: 0 1.625rem; border-radius: 0.5rem; border: 1px solid var(--gold);
  background: var(--gold); color: var(--petrol-deep); font: 600 0.9375rem/1 var(--sans); text-decoration: none;
  white-space: nowrap; cursor: pointer; transition: background .15s;
}
.btn:hover { background: #D6B76C; border-color: #D6B76C; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--petrol); border-color: var(--line-gold); }
.btn--ghost:hover { background: var(--white); border-color: var(--gold); }
.btn svg { width: 1.125rem; height: 1.125rem; flex: none; margin-right: 0.5rem; }
.link { display: inline-block; margin-top: 0.75rem; font-size: 0.875rem; color: var(--gold-dark); font-weight: 600; text-underline-offset: 0.1875rem; }

.alert { margin-top: 0.875rem; padding: 0.75rem 0.875rem; border-radius: 0.75rem; background: #F3ECDD; border: 1px solid var(--line-gold); color: var(--petrol-deep); font-size: 0.90625rem; }

/* Historique */
.history { margin-top: 1.125rem; }
.history__title { font-size: 1rem; font-weight: 600; color: var(--petrol); margin-bottom: 0.5rem; }
.history__list { display: flex; flex-wrap: wrap; margin: 0 -0.5rem -0.5rem 0; }
.chip { margin: 0 0.5rem 0.5rem 0; min-height: 2.5rem; padding: 0 0.875rem; border-radius: 0.5rem; border: 1px solid var(--line-gold); background: var(--white); color: var(--petrol); font: 500 0.84375rem var(--sans); cursor: pointer; }
.chip:hover { border-color: var(--gold); }

/* Résultat du suivi */
.colis { margin-top: 1.125rem; }
.colis__head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.625rem; flex-wrap: wrap; }
.colis__ref { font-size: 0.84375rem; color: var(--muted); }
.colis__status { font-family: var(--serif); font-size: 2.125rem; line-height: 1.05; color: var(--petrol); margin: 0.25rem 0 0.125rem; }
.colis__status em { font-style: italic; color: var(--gold); font-weight: 500; }
.colis__date { font-size: 0.875rem; color: var(--muted); }
.colis__desc { font-size: 0.875rem; color: var(--charcoal); margin-top: 0.625rem; padding-top: 0.625rem; border-top: 1px solid var(--line); }

/* Le trajet : pointillés or et étoiles, comme la carte du site */
.route { list-style: none; margin: 1.375rem 0 0.25rem; padding: 0; }
.route__stop { position: relative; display: flex; align-items: center; padding-bottom: 1.25rem; }
.route__stop:last-child { padding-bottom: 0; }
.route__stop::before {
  content: ""; position: absolute; left: 0.6875rem; top: 1.5rem; bottom: -0.125rem; width: 0;
  border-left: 0.125rem dashed var(--line-gold);
}
.route__stop:last-child::before { display: none; }
.route__stop.is-done::before { border-left-color: var(--gold); }
.route__mark { flex: none; margin-right: 1rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; color: var(--line-gold); }
.route__mark svg { width: 1.125rem; height: 1.125rem; }
.route__stop.is-done .route__mark { color: var(--gold); }
.route__stop.is-current .route__mark { color: var(--white); background: var(--petrol); border-radius: 50%; box-shadow: 0 0 0 0.25rem rgba(201, 168, 90, 0.35); }
.route__stop.is-current .route__mark svg { width: 0.875rem; height: 0.875rem; }
.route__label { font-size: 0.9375rem; color: var(--muted); padding-top: 1px; }
.route__stop.is-done .route__label { color: var(--charcoal); }
.route__stop.is-current .route__label { color: var(--petrol); font-weight: 600; }

/* Bloc La Poste */
.poste { margin-top: 1rem; }
.poste h2 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.poste__num { font-size: 0.84375rem; color: var(--petrol-deep); margin-bottom: 0.75rem; letter-spacing: .02em; }
.poste__last { background: var(--ivory); border-radius: 0.75rem; padding: 0.75rem 0.875rem; margin-bottom: 0.75rem; }
.poste__last strong { display: block; color: var(--petrol); font-size: 0.96875rem; }
.poste__steps { list-style: none; margin: 0; padding: 0; }
.poste__steps li { padding: 0.5rem 0; border-top: 1px solid rgba(13, 59, 69, 0.12); font-size: 0.875rem; }
.poste__steps time { display: block; font-size: 0.78125rem; color: var(--petrol-deep); opacity: .75; }
.poste__last { margin-top: 1rem; background: var(--white); border-left: 3px solid var(--gold-dark); }
.poste__last strong { font-size: 1.0625rem; line-height: 1.55; }
.poste__last time { display: block; font-size: .875rem; color: var(--petrol-deep); margin-top: .5rem; }
.poste__history summary, .commande-details summary { min-height: 48px; display: list-item; align-content: center; cursor: pointer; font-weight: 600; color: var(--petrol-deep); padding: .75rem 0; }
.poste__history { border-top: 1px solid var(--line); margin: .75rem 0; }
.poste__checked { font-size: .8125rem; color: var(--petrol-deep); margin: .75rem 0; }
.poste__notice { margin: .75rem 0; line-height: 1.65; }
.poste__link { margin-top: .625rem; white-space: normal; text-align: center; line-height: 1.4; padding: .75rem; }
.commande-card { margin-top: 1rem; }
.commande-card h2 { font-size: 1.375rem; }
.poste__timeline { list-style: none; padding: 0; margin: 1rem 0; }
.poste__event { position: relative; padding: .75rem 0 .75rem 1.5rem; border-left: 1px solid var(--gold-dark); margin-left: .3rem; }
.poste__event::before { content: ''; position: absolute; left: -.3rem; top: 1.15rem; width: .55rem; height: .55rem; border: 1px solid var(--gold-dark); border-radius: 50%; background: var(--sand); }
.poste__event.is-latest::before { background: var(--petrol); border-color: var(--petrol); }
.poste__event strong { display: block; font-size: 1rem; color: var(--petrol-deep); line-height: 1.5; }
.poste__event.is-latest strong { font-size: 1.1875rem; }
.poste__event time, .poste__place { display: block; color: var(--petrol-deep); font-size: .84375rem; }
.poste__place { margin-top: .25rem; font-weight: 500; }
.poste__detail summary { min-height: 44px; align-content: center; cursor: pointer; font-size: .8125rem; color: var(--petrol-deep); }
.poste__detail p { font-size: .875rem; line-height: 1.6; padding-bottom: .5rem; }

/* Tarifs : les quatre cartes du site */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tier { background: var(--white); border: 1px solid var(--line-gold); border-radius: 1rem; padding: 1.125rem 0.625rem 1rem; text-align: center; position: relative; }
.tier::after { content: "✦"; position: absolute; top: 0.5rem; right: 0.625rem; font-size: 0.625rem; color: var(--gold); }
.tier__name { font-size: 0.6875rem; letter-spacing: .14em; color: var(--gold-dark); font-weight: 600; }
.tier__range { font-size: 0.9375rem; font-weight: 600; color: var(--petrol); margin-top: 0.5rem; }
.tier__rule { width: 1.625rem; height: 1px; background: var(--gold); margin: 0.625rem auto; border: 0; }
.tier__price { font-size: 1.875rem; font-weight: 700; line-height: 1; color: var(--petrol); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.tiers-note { font-size: 0.875rem; color: rgba(246, 244, 241, 0.78); margin-top: 0.875rem; text-align: center; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; padding: 0.5625rem 0; font-size: 0.90625rem; color: var(--petrol-deep); }
.facts li + li { border-top: 1px solid rgba(13, 59, 69, 0.12); }
.facts li::before { content: "✦"; color: var(--gold-dark); font-size: 0.6875rem; line-height: 2; flex: none; margin-right: 0.625rem; }

/* Simulateur */
.offers { display: grid; gap: 0.75rem; margin-top: 1.125rem; }
.offer { background: var(--white); border: 1px solid var(--line-gold); border-radius: 1rem; padding: 1rem 1.125rem; }
.offer.is-best { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.offer__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.offer__name { font-family: var(--serif); font-size: 1.3125rem; font-weight: 600; color: var(--petrol); }
.offer__best { margin-left: 0.5rem; font-size: 0.75rem; font-weight: 700; color: var(--petrol-deep); background: var(--gold); padding: 0.1875rem 0.625rem; border-radius: 0.375rem; white-space: nowrap; }
.offer__lines span:first-child { display: inline-flex; align-items: center; }
.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; flex: none; display: inline-block; margin-right: 0.5rem; }
.dot--ori { background: var(--gold); }
.dot--poste { background: var(--petrol); }
.split { display: flex; height: 0.5rem; border-radius: 62.4375rem; overflow: hidden; margin: 0 0 0.75rem; background: var(--petrol); }
.split__ori { background: var(--gold); }
.split__poste { flex: 1; background: var(--petrol); }
.offer__lines { margin: 0.625rem 0 0.75rem; font-size: 0.90625rem; }
.offer__lines div { display: flex; justify-content: space-between; padding: 0.1875rem 0; color: var(--muted); }
.offer__lines span:last-child { color: var(--charcoal); font-variant-numeric: tabular-nums; }
.offer__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 0.625rem; border-top: 1px solid var(--line-gold); }
.offer__total span:first-child { font-size: 0.875rem; color: var(--petrol); font-weight: 600; }
.offer__total strong { font-size: 1.625rem; line-height: 1; color: var(--petrol); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.offer__total small { font-size: 0.875rem; color: var(--petrol); font-weight: 500; text-align: right; }
.source { font-size: 0.78125rem; color: rgba(246, 244, 241, 0.7); margin-top: 0.75rem; }
#btn-wa-sim { margin-top: 0.875rem; }

/* Contact */
.contact { text-align: center; padding: 1.875rem 1.25rem 1.625rem; }
.contact__script { font-family: var(--script); font-size: 2.5rem; line-height: 1; color: var(--gold-dark); margin-bottom: 0.5rem; }
.contact h1 { font-size: 1.875rem; margin-bottom: 0.625rem; }
.contact p { color: var(--petrol-deep); max-width: 30ch; margin: 0 auto 1.25rem; }
.contact .btn { margin-bottom: 0.625rem; }
.install-help { font-size: 0.84375rem; color: var(--muted); margin-top: 0.625rem; }

/* Four visible, full-width menu rows close to the content. */
.app-menu { max-width: 32.5rem; margin: 1rem auto 0; padding: 0 1rem; display: grid; gap: 0.375rem; }
.app-menu__button {
  display: grid; grid-template-columns: 1.5rem 1fr 0.625rem; align-items: center; gap: 0.75rem;
  width: 100%; min-height: 3rem; padding: 0.625rem 0.875rem; text-align: left;
  border: 1px solid var(--line-gold); border-radius: 0.5rem; background: var(--petrol-deep);
  color: var(--ivory); font: 500 1rem/1.4 var(--sans); cursor: pointer;
}
.app-menu__icon { width: 1.5rem; height: 1.5rem; color: var(--gold); }
.app-menu__button.is-active { background: var(--gold); color: var(--petrol-deep); font-weight: 600; }
.app-menu__button.is-active .app-menu__icon { color: var(--petrol-deep); }
.app-menu__arrow { width: 0.4375rem; height: 0.4375rem; border-top: 0.125rem solid currentColor; border-right: 0.125rem solid currentColor; transform: rotate(45deg); }
.mobile-wide-viewport .screen-title { font-size: 2.25rem; }
.mobile-wide-viewport .app-main { padding-top: 1.375rem; }

@media (min-width: 43.75rem) {
  .app-header { padding-left: max(1.125rem, calc(50% - 15.25rem)); padding-right: max(1.125rem, calc(50% - 15.25rem)); }
  .app-main { padding-top: 2.125rem; }
  .screen-title { font-size: 2.625rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .colis { animation: rise .35s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(0.375rem); } to { opacity: 1; transform: none; } }
}
