/* Assistance trajet v1, 14/11/2026. Reprend les maquettes v1 et v2 du 13/11. */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: "Nunito", system-ui, sans-serif; color: var(--text); background: var(--bg2); font-size: 17px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* le fond velours, sur tout l'ecran */
.fond {
  position: fixed; inset: 0; z-index: 0; transition: background .5s ease;
  background:
    radial-gradient(120% 60% at 15% 0%, var(--glow1), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, var(--glow2), transparent 60%),
    linear-gradient(170deg, var(--bg1), var(--bg2));
}
.fond::before, .sw::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: var(--grain); mix-blend-mode: overlay;
}
.app { position: relative; z-index: 1; max-width: 440px; margin: 0 auto; min-height: 100%; padding: 16px 20px 26px; }
.ecran { display: none; animation: entre .28s ease; }
.ecran.actif { display: block; }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } }

/* ---------- accueil ---------- */
.hellorow { display: flex; justify-content: space-between; align-items: center; }
.hello { font-size: 19px; color: var(--muted); font-weight: 700; }
.outils { display: flex; gap: 10px; align-items: center; }
.rond { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.palette {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; border: 0;
  background: conic-gradient(from 200deg, #ffa184, #ffd27f, #84ecd0, #9b7be0, #ea6b90, #ffa184);
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 0 0 3px rgba(255,255,255,.55);
  animation: respire 3s ease-in-out infinite;
}
@keyframes respire { 50% { transform: scale(1.07); } }

.mission { margin: 12px 0 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.rang { display: grid; grid-template-columns: 92px 1fr 18px; align-items: center; gap: 2px 8px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; transition: background .15s; }
.rang:last-child { border-bottom: 0; }
.rang:active { background: var(--line); }
.rang::after { content: "›"; grid-column: 3; grid-row: 1 / span 2; font-size: 22px; opacity: .45; }
.rang .lab { font-size: 13px; font-weight: 700; color: var(--muted); grid-row: 1 / span 2; }
.rang b { font-size: 18px; font-weight: 800; grid-column: 2; }
.rang small { font-size: 13px; color: var(--muted); font-weight: 600; grid-column: 2; }
.rang small:empty { display: none; }
.rang small.ok { color: var(--ok); }
.rang.vide b { color: var(--warn); }

h3.q { font-size: 29px; line-height: 1.12; font-weight: 800; margin-bottom: 14px; letter-spacing: -.3px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { text-align: left; border-radius: 26px; padding: 14px 16px 12px; min-height: 112px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; transition: transform .15s ease; }
.tile:active, .btn:active, .opt:active, .pick:active, .pastille-lieu:active { transform: scale(.96); }
.tile .ico { font-size: 30px; }
.tile b { font-size: 19px; display: block; margin-top: 6px; }
.tile small { font-size: 14px; color: var(--muted); font-weight: 700; display: block; min-height: 19px; }
.tile small.w { color: var(--warn); }
.tile small.attente { opacity: .6; animation: pouls 1.2s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: .25; } }

.btn {
  display: block; width: 100%; text-align: center; border: 0; margin-top: 16px; padding: 18px; border-radius: 26px; text-decoration: none;
  font: 800 19px "Nunito", system-ui, sans-serif; color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 26px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s ease;
}
.btn.doux { background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.foot { margin-top: 16px; font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; min-height: 18px; }

/* ---------- options ---------- */
.top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.back { font-size: 34px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; background: none; border: 0; opacity: .8; }
.top b { font-size: 22px; font-weight: 800; display: block; }
.top span { display: block; font-size: 14px; color: var(--muted); font-weight: 700; }
.meteo { padding: 12px 14px; border-radius: 20px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); font-size: 16px; font-weight: 800; }
.meteo small { display: block; font-weight: 600; color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.35; }
.meteo:empty { display: none; }
.opt { display: block; width: 100%; text-align: left; border-radius: 24px; padding: 14px 16px; margin-bottom: 12px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s ease, outline-color .2s; outline: 3px solid transparent; outline-offset: 2px; }
.opt.sel { outline-color: var(--text); }
.opt .l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.opt .mode { font-size: 19px; font-weight: 800; }
.opt .heure { font-size: 27px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; }
.opt .heure small { font-size: 12px; font-weight: 700; letter-spacing: 0; opacity: .75; margin-right: 4px; }
.opt .l2 { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.opt .point { margin-top: 8px; font-size: 16px; font-weight: 800; line-height: 1.3; }
.opt .point.ok { color: var(--ok); }
.opt .point.alerte { color: var(--warn); }
.src { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.src.centre { text-align: center; margin-top: 14px; }
.opt.reco { background: linear-gradient(140deg, var(--accent), var(--accent2)); color: var(--accent-text); border: 0;
  box-shadow: 0 14px 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.opt.reco .l2, .opt.reco .src { color: var(--accent-text); opacity: .78; }
.opt.reco .point { color: var(--accent-text); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 4px 10px;
  border-radius: 99px; margin-bottom: 6px; background: rgba(255,255,255,.28); color: var(--accent-text); }
.why { font-size: 16px; font-weight: 800; margin: 6px 2px 0; line-height: 1.35; }
.why span { color: var(--muted); font-weight: 700; }
.why:empty { display: none; }
.pannes { font-size: 13px; color: var(--warn); font-weight: 700; margin-top: 12px; text-align: center; }
.attendre { text-align: center; padding: 50px 10px; font-weight: 800; font-size: 18px; color: var(--muted); animation: pouls 1.4s ease-in-out infinite; }

/* ---------- guidage ---------- */
.grand { display: flex; justify-content: space-around; align-items: center; padding: 16px; border-radius: 26px; margin-bottom: 14px;
  background: linear-gradient(140deg, var(--accent), var(--accent2)); color: var(--accent-text);
  box-shadow: 0 14px 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.grand small { display: block; font-size: 13px; font-weight: 800; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.grand b { font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.grand .fl { font-size: 26px; opacity: .7; }
.etapes { list-style: none; margin: 4px 0 14px; }
.etapes li { position: relative; padding: 12px 14px 12px 50px; margin-bottom: 10px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  font-size: 17px; font-weight: 700; line-height: 1.35; }
.etapes li .ico { position: absolute; left: 14px; top: 12px; font-size: 22px; }
.etapes li small { display: block; font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.etapes li small b { color: var(--text); }
.etapes li .h { font-weight: 800; font-size: 19px; }
.pastille { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 800; font-size: 15px; margin-right: 6px; }
.retard { color: var(--warn); font-weight: 800; }
.avis { padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.avis b { color: var(--warn); }

/* ---------- menu des ambiances ---------- */
.auto { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 12px 16px; border-radius: 22px; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auto b { font-size: 17px; display: block; }
.auto small { font-size: 13px; color: var(--muted); font-weight: 600; }
.switch { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .3s; }
.on > .switch, .switch.on { background: var(--accent); }
.on > .switch::after, .switch.on::after { left: 23px; }
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; }
.pick { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .15s; }
.pick small { font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; }
.sw { position: relative; width: 74px; height: 74px; border-radius: 50%;
  background:
    radial-gradient(circle at 68% 68%, var(--accent) 0 17%, var(--accent2) 18% 24%, transparent 25%),
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  box-shadow: 0 8px 18px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.18); transition: box-shadow .25s, transform .25s; }
.pick.sel .sw { box-shadow: 0 0 0 3px var(--ring-bg), 0 0 0 6px var(--ring), 0 10px 22px rgba(0,0,0,.3); transform: scale(1.04); }
.sw.de { display: grid; place-items: center; font-size: 30px; background: conic-gradient(from 0deg, #ffa184, #ffd27f, #84ecd0, #9b7be0, #ea6b90, #ffa184); }
.sw.de.spin { animation: tourne .6s ease; }
@keyframes tourne { to { transform: rotate(360deg); } }
.hint { text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 10px; }

/* ---------- feuille du bas ---------- */
.voile { position: fixed; inset: 0; z-index: 5; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.voile.on { opacity: 1; pointer-events: auto; }
.feuille { position: fixed; left: 50%; bottom: 0; z-index: 6; width: 100%; max-width: 440px; max-height: 88%; overflow-y: auto;
  transform: translate(-50%, 105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  border-radius: 30px 30px 0 0; padding: 22px 20px 26px; color: var(--text);
  background: linear-gradient(170deg, var(--bg1), var(--bg2)); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -20px 50px rgba(0,0,0,.35); }
.feuille.on { transform: translate(-50%, 0); }
.feuille h4 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.feuille p.sous { font-size: 14px; color: var(--muted); font-weight: 700; margin: 4px 0 16px; }
.lieux { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pastille-lieu { padding: 13px 18px; border-radius: 99px; font-weight: 800; font-size: 17px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s; }
.pastille-lieu.fort { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--accent-text); border: 0; }
.champ { width: 100%; padding: 15px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 17px; outline: none; }
.champ::placeholder { color: var(--muted); }
.champ:focus { border-color: var(--accent); }
.sugg button { display: block; width: 100%; text-align: left; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.choix { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px;
  border-radius: 20px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 18px; }
.choix input[type=time] { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; font-weight: 800; font-size: 18px; color-scheme: light dark; }
.sombre .choix input[type=time] { color-scheme: dark; }
.choix small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.lien { display: block; width: 100%; background: none; border: 0; text-align: center; margin-top: 12px; font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 9; transform: translate(-50%, 200px); opacity: 0; transition: transform .3s, opacity .3s; max-width: 400px; width: calc(100% - 40px);
  padding: 14px 18px; border-radius: 20px; font-weight: 800; font-size: 16px; text-align: center; color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- les dix ambiances ---------- */
.claire { --shadow: 8px 10px 22px rgba(130,100,80,.20), -6px -6px 16px rgba(255,255,255,.75); --grain: .2; }
.sombre { --shadow: 0 8px 24px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.07); --grain: .15; }

.prune  { --bg1:#3d1a3c; --bg2:#1a0b22; --glow1:rgba(255,140,150,.30); --glow2:rgba(150,90,255,.22); --card:rgba(255,225,235,.08); --line:rgba(255,225,235,.14); --text:#fcebe6; --muted:#cfaebb; --ok:#a6ecc2; --warn:#ffd27f; --accent:#ffa184; --accent2:#ea6b90; --accent-text:#2c0f22; --accent-glow:rgba(234,107,144,.40); }
.sable  { --bg1:#f8eee4; --bg2:#ead6c2; --glow1:rgba(255,255,255,.75); --glow2:rgba(214,140,100,.25); --card:#fbf5ee; --line:rgba(160,110,80,.12); --text:#3b2a20; --muted:#8b705f; --ok:#3d8758; --warn:#b5601c; --accent:#d9784d; --accent2:#b8503a; --accent-text:#fff7f0; --accent-glow:rgba(184,80,58,.35); }
.lagon  { --bg1:#11434c; --bg2:#071c25; --glow1:rgba(90,230,210,.25); --glow2:rgba(255,170,80,.18); --card:rgba(170,245,240,.07); --line:rgba(170,245,240,.14); --text:#e9fbf8; --muted:#9fcac6; --ok:#84ecd0; --warn:#ffd56e; --accent:#ffb84d; --accent2:#ff7d5e; --accent-text:#2a1406; --accent-glow:rgba(255,125,94,.38); }
.madras { --bg1:#fff3c4; --bg2:#ffd27e; --glow1:rgba(255,255,255,.7); --glow2:rgba(230,60,40,.22); --card:#fffaf0; --line:rgba(180,80,20,.14); --text:#3a1c0c; --muted:#8a5a2e; --ok:#1f8a4c; --warn:#c0392b; --accent:#e8432f; --accent2:#1f8a4c; --accent-text:#fff8ee; --accent-glow:rgba(232,67,47,.35); }
.menthe { --bg1:#eafaf3; --bg2:#c6ecdb; --glow1:rgba(255,255,255,.8); --glow2:rgba(29,143,120,.20); --card:#f7fffb; --line:rgba(30,110,90,.12); --text:#16362b; --muted:#5b8475; --ok:#1e8a5a; --warn:#b9651a; --accent:#2fb38a; --accent2:#1d8f78; --accent-text:#f2fffa; --accent-glow:rgba(29,143,120,.33); }
.lavande{ --bg1:#f3eefc; --bg2:#dacdf2; --glow1:rgba(255,255,255,.8); --glow2:rgba(122,85,201,.20); --card:#fbf8ff; --line:rgba(90,60,150,.12); --text:#2d2140; --muted:#7a6a94; --ok:#2f8a5f; --warn:#b4621c; --accent:#9b7be0; --accent2:#7a55c9; --accent-text:#fbf8ff; --accent-glow:rgba(122,85,201,.35); }
.abricot{ --bg1:#fff1e8; --bg2:#ffd3bd; --glow1:rgba(255,255,255,.8); --glow2:rgba(240,98,146,.18); --card:#fff8f3; --line:rgba(170,90,60,.12); --text:#40241a; --muted:#91685a; --ok:#2f8a55; --warn:#b5541c; --accent:#ff8a65; --accent2:#f06292; --accent-text:#fff7f3; --accent-glow:rgba(240,98,146,.32); }
.encre  { --bg1:#1b2547; --bg2:#0b1026; --glow1:rgba(120,140,255,.25); --glow2:rgba(255,210,120,.15); --card:rgba(210,220,255,.07); --line:rgba(210,220,255,.14); --text:#eef1ff; --muted:#a9b2d6; --ok:#8fe3b4; --warn:#ffd77a; --accent:#f5c86a; --accent2:#e8a24a; --accent-text:#1d1405; --accent-glow:rgba(232,162,74,.35); }
.foret  { --bg1:#24402e; --bg2:#0f1f16; --glow1:rgba(160,230,140,.20); --glow2:rgba(255,190,90,.15); --card:rgba(220,255,220,.07); --line:rgba(220,255,220,.13); --text:#eef8ec; --muted:#a9c4aa; --ok:#9ee6a8; --warn:#ffd36b; --accent:#f0b35a; --accent2:#d9823b; --accent-text:#23140a; --accent-glow:rgba(217,130,59,.35); }
.contraste { --bg1:#000; --bg2:#000; --glow1:transparent; --glow2:transparent; --card:#111; --line:#fff; --text:#fff; --muted:#e6e6e6; --ok:#7cff8a; --warn:#ffe600; --accent:#ffe600; --accent2:#ffe600; --accent-text:#000; --accent-glow:transparent; --shadow:none; --grain:0; }

body { --ring: var(--text); --ring-bg: var(--bg1); }
