/* Espace client Viabus : même DA que viabus.fr (marine, corail, titres Dongle, texte Verdana). */

@font-face { font-family: 'Dongle'; font-weight: 400; font-display: swap; src: url('/fonts/dongle-400-latin.woff2') format('woff2'); size-adjust: 175%; ascent-override: 48%; descent-override: 16%; line-gap-override: 0%; }
@font-face { font-family: 'Dongle'; font-weight: 700; font-display: swap; src: url('/fonts/dongle-700-latin.woff2') format('woff2'); size-adjust: 175%; ascent-override: 48%; descent-override: 16%; line-gap-override: 0%; }
@font-face { font-family: 'Viabus Text'; font-weight: 400; font-display: swap; src: local('Verdana'), url('/fonts/dejavu-sans-400-latin.woff2') format('woff2'); size-adjust: 90%; }
@font-face { font-family: 'Viabus Text'; font-weight: 700; font-display: swap; src: local('Verdana Bold'), local('Verdana-Bold'), url('/fonts/dejavu-sans-700-latin.woff2') format('woff2'); size-adjust: 90%; }

:root {
	--navy: #021d49;
	--navy-2: #1d3a66;
	--coral: #fb5373;
	--coral-deep: #d9365c;
	--blush: #fdf3f5;
	--mist: #f3f6fa;
	--line: rgba(2, 29, 73, .1);
	--gris: #5b6b85;
	--vert: #1d7a4e;
	--vert-doux: #e4f4ea;
	--rouge: #b4233c;
	--rouge-doux: #fbe7eb;
	--ambre: #8a5a00;
	--ambre-doux: #fff3d6;
	--rayon: 14px;
	--titre: 'Dongle', 'Viabus Text', sans-serif;
	--texte: 'Viabus Text', Verdana, 'DejaVu Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--mist); color: var(--navy); font-family: var(--texte); font-size: 15px; line-height: 1.55; }
a { color: var(--coral-deep); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1; margin: 0 0 .4em; color: var(--navy); }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 .7em; }
img { max-width: 100%; height: auto; }

.ec-cadre { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.ec-entete { background: #fff; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 5; }
.ec-entete-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.ec-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.ec-logo span { font-family: var(--titre); font-size: 1.7rem; font-weight: 400; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1; }
.ec-session { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--gris); min-width: 0; }
.ec-session span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-lien-bouton { border: 0; background: none; padding: 0; color: var(--coral-deep); font: inherit; text-decoration: underline; cursor: pointer; white-space: nowrap; }

.ec-principal { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.ec-pied { padding: 20px 0; font-size: .8rem; color: var(--gris); border-top: 1px solid var(--line); background: #fff; }
.ec-pied a { color: var(--navy); }

/* Messages */
.ec-flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.ec-flash-ok { background: var(--vert-doux); color: var(--vert); }
.ec-flash-err { background: var(--rouge-doux); color: var(--rouge); }
.ec-discret { color: var(--gris); font-size: .85rem; }
.ec-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--ambre-doux); color: var(--ambre); font-size: .85rem; }

/* Cartes, champs, boutons */
.ec-carte { background: #fff; border: 1px solid var(--line); border-radius: var(--rayon); padding: 22px 24px; }
.ec-carte + .ec-carte { margin-top: 18px; }
.ec-champ { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: .85rem; font-weight: 700; }
.ec-champ small { font-weight: 400; color: var(--gris); }
.ec-champ input, .ec-champ textarea { width: 100%; padding: 11px 13px; border: 1px solid rgba(2, 29, 73, .22); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-weight: 400; font-size: .95rem; }
.ec-champ textarea { resize: vertical; }
.ec-champ input:focus, .ec-champ textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: var(--coral); }
.ec-case { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: .9rem; }
.ec-case input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--coral-deep); flex: none; }
.ec-code { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; font-weight: 700 !important; }

.ec-bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--navy); background: #fff; color: var(--navy); font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.ec-bouton:hover { background: var(--navy); color: #fff; }
.ec-bouton-plein { background: var(--coral); border-color: var(--coral); color: #fff; }
.ec-bouton-plein:hover { background: var(--coral-deep); border-color: var(--coral-deep); color: #fff; }
.ec-bouton-non { border-color: var(--rouge); color: var(--rouge); }
.ec-bouton-non:hover { background: var(--rouge); color: #fff; }

/* Connexion */
.ec-connexion { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; max-width: 980px; margin: 4vh auto 0; }
.ec-connexion-seule { grid-template-columns: minmax(0, 480px); justify-content: center; }
.ec-accueil h1 { font-size: 3.4rem; }
.ec-accueil p { font-size: 1rem; }
.ec-liste-coches { list-style: none; padding: 0; margin: 0 0 18px; }
.ec-liste-coches li { position: relative; padding-left: 28px; margin-bottom: 6px; }
.ec-liste-coches li::before { content: ''; position: absolute; left: 4px; top: .45em; width: 11px; height: 6px; border-left: 2px solid var(--coral); border-bottom: 2px solid var(--coral); transform: rotate(-45deg); }
.ec-formulaire h2, .ec-titre-carte { font-size: 2rem; }
.ec-formulaire .ec-bouton { width: 100%; margin: 4px 0 12px; }

/* Devis : bandeau */
.ec-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: 28px 30px; border-radius: 20px; background: var(--navy); color: #fff; margin-bottom: 18px; }
.ec-hero h1 { color: #fff; font-size: 3rem; margin-bottom: .15em; }
.ec-surtitre { margin: 0 0 6px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.ec-hero-dates { color: rgba(255, 255, 255, .85); }
.ec-statut { margin: 12px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.ec-pastille { display: inline-block; margin-right: 6px; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--ambre-doux); color: var(--ambre); }
.ec-pastille-accepte { background: var(--vert-doux); color: var(--vert); }
.ec-pastille-refuse, .ec-pastille-retire, .ec-pastille-passe { background: var(--rouge-doux); color: var(--rouge); }
.ec-hero-prix { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.ec-hero-prix .ec-discret { color: rgba(255, 255, 255, .7); margin: 0 0 6px; }
.ec-prix { margin: 0; font-family: var(--titre); font-size: 3.2rem; line-height: .9; }
.ec-prix small { font-size: 1.4rem; margin-left: 6px; }
.ec-hero .ec-bouton { border-color: rgba(255, 255, 255, .6); background: transparent; color: #fff; min-width: 250px; }
.ec-hero .ec-bouton:hover { background: #fff; color: var(--navy); }
.ec-hero .ec-bouton-plein { background: var(--coral); border-color: var(--coral); }
.ec-hero .ec-bouton-plein:hover { background: var(--coral-deep); border-color: var(--coral-deep); color: #fff; }

.ec-mot { margin: 0 0 18px; padding: 16px 22px; border-radius: var(--rayon); background: var(--blush); border-left: 4px solid var(--coral); }
.ec-mot p:last-child { margin: 0; }
.ec-mot-de { font-weight: 700; font-size: .85rem; color: var(--coral-deep); }

.ec-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }

.ec-resume { margin: 0; display: grid; gap: 10px; }
.ec-resume > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ec-resume > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ec-resume dt { color: var(--gris); font-size: .85rem; }
.ec-resume dd { margin: 0; }

/* Itinéraire */
.ec-etape-bloc + .ec-etape-bloc { margin-top: 20px; }
.ec-etape-bloc h3 { color: var(--coral-deep); }
.ec-trajet { list-style: none; margin: 0; padding: 0; position: relative; }
.ec-trajet li { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 18px; position: relative; padding: 0 0 14px; }
.ec-trajet li::before { content: ''; position: absolute; left: 68px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--navy-2); }
.ec-trajet li::after { content: ''; position: absolute; left: 73px; top: 18px; bottom: -2px; width: 1px; background: var(--line); }
.ec-trajet li:last-child::after { display: none; }
.ec-trajet li.ec-extremite::before { background: var(--coral); border-color: var(--coral); }
.ec-heure { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; }
.ec-lieu { display: flex; flex-direction: column; padding-left: 22px; min-width: 0; overflow-wrap: anywhere; }
.ec-lieu em { font-style: normal; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.ec-lieu a { font-size: .8rem; }
.ec-programme { margin-top: 6px; padding: 12px 16px; border-radius: 10px; background: var(--mist); }
.ec-programme p { margin: 4px 0 0; }

/* Réponses */
.ec-reponses { display: flex; flex-direction: column; gap: 10px; }
.ec-action { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ec-action summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ec-action summary::-webkit-details-marker { display: none; }
.ec-action summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--coral-deep); }
.ec-action[open] summary::after { content: '−'; }
.ec-action form { padding: 0 18px 16px; }
.ec-action-ok { border-color: var(--vert); }
.ec-action-ok summary { color: var(--vert); }
.ec-action-non summary { color: var(--rouge); }

/* Colonne de côté */
.ec-conseiller p { margin: 0 0 4px; overflow-wrap: anywhere; }
.ec-echange { padding: 12px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.ec-echange:first-of-type { border-top: 0; padding-top: 0; }
.ec-echange header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ec-echange header span { color: var(--gris); font-size: .78rem; }
.ec-echange p { margin: 0 0 4px; overflow-wrap: anywhere; }
.ec-echange-viabus { margin: 0 -12px; padding-left: 12px; padding-right: 12px; background: var(--blush); border-radius: 10px; border-top: 0; }
.ec-echange-viabus + .ec-echange { border-top: 0; }
.ec-donnee span { color: var(--gris); }
.ec-donnee span::after { content: ' :'; }

/* Tablette et mobile */
@media (max-width: 980px) {
	.ec-colonnes, .ec-connexion { grid-template-columns: 1fr; }
	.ec-hero { grid-template-columns: 1fr; align-items: start; }
	.ec-hero-prix { align-items: stretch; text-align: left; }
	.ec-hero .ec-bouton { min-width: 0; }
}
@media (max-width: 600px) {
	h1, .ec-hero h1, .ec-accueil h1 { font-size: 2.3rem; }
	.ec-principal { padding-top: 16px; }
	.ec-carte { padding: 18px 16px; }
	.ec-hero { padding: 22px 18px; border-radius: 16px; }
	.ec-logo img { width: 96px; }
	.ec-logo span { font-size: 1.4rem; }
	.ec-session span { display: none; }
	.ec-resume > div { grid-template-columns: 1fr; gap: 2px; }
	.ec-trajet li { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
	.ec-trajet li::before { left: 50px; }
	.ec-trajet li::after { left: 55px; }
	.ec-lieu { padding-left: 16px; }
}

/* Réservation confirmée (commande publiée par l'intranet) */
.ec-pastille-commande { background: var(--vert-doux); color: var(--vert); }
.ec-resa { border: 2px solid var(--vert); }
.ec-resa h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ec-resa-num { font-family: var(--texte); font-size: .9rem; font-weight: 700; color: var(--vert); }
.ec-resa-trajet { margin: 14px 0 16px; }
.ec-resa-annulee { border-color: var(--rouge); }
.ec-resa-annulee .ec-resa-num { color: var(--rouge); }
.ec-resa-annulee .ec-resa-trajet, .ec-resa-annulee .ec-resume { opacity: .6; text-decoration: line-through; }
.ec-echange-viabus.ec-type-confirmation { background: var(--vert-doux); }
.ec-echange-viabus.ec-type-annulation { background: var(--rouge-doux); }
.ec-resa > .ec-discret:last-child { margin: 14px 0 0; }
