/* Studio Creative — Agenda · Réunions · Clients. Mise en page reprise de l'appli téléphone MyKortex (façon Calendrier et Dictaphone d'iPhone). */
:root { --ios: #FF3B30; --ios-bleu: #007AFF; --ligne: #E5E5EA; --marine: #1a2942; --cyan: #00c2e0;
        --bas: env(safe-area-inset-bottom, 0px); --onglets: calc(58px + var(--bas)); --hauteur: 100vh; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: #F2F2F7; color: #000; font: 15px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Arial, sans-serif; }
a { color: inherit; }

/* ── Connexion ── */
.porte { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.porte__ico { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 14px; display: block; box-shadow: 0 10px 30px -10px rgba(26,41,66,.55); }
.porte h1 { text-align: center; font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }
.porte p.sous { text-align: center; color: #6B6B70; margin: 0 0 26px; }
.porte label { display: block; font-size: 13px; font-weight: 600; color: #3C3C43; margin: 0 0 6px; }
.porte input { width: 100%; font: inherit; font-size: 17px; padding: 14px 15px; border-radius: 12px; border: 1px solid #D1D1D6; background: #fff; margin-bottom: 14px; }
.porte button { width: 100%; font: inherit; font-size: 17px; font-weight: 600; padding: 15px; border-radius: 12px; border: 0; background: var(--marque-bouton, var(--marine)); color: var(--marque-bouton-txt, #fff); cursor: pointer; }
.porte .err { background: #FEE2E2; color: #991B1B; padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.porte .aide { text-align: center; font-size: 12.5px; color: #8E8E93; margin-top: 22px; line-height: 1.5; }

/* ── Onglets du bas, comme une application d'iPhone. Placés DEPUIS LE HAUT à la vraie hauteur de l'écran (--hauteur, mesurée en JS) :
      sur iPhone, une appli ajoutée à l'écran d'accueil place mal le « bas » de l'écran. ── */
nav.onglets { position: fixed; left: 0; right: 0; top: calc(var(--hauteur) - var(--onglets)); z-index: 20; display: flex; justify-content: space-around; height: var(--onglets);
              padding: 6px 0 calc(4px + var(--bas)); background: rgba(249,249,251,.94); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
              border-top: .5px solid rgba(60,60,67,.29); }
nav.onglets::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 200px; background: rgb(249,249,251); }
nav.onglets a { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #8E8E93; font-size: 10.5px; font-weight: 600; padding: 3px 0; }
nav.onglets svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav.onglets svg .plein { fill: currentColor; stroke: none; }
nav.onglets a.is-on { color: var(--ios); }

/* Les écrans sont fixés aux bords : la page ne défile jamais, seule la zone centrale défile. */
html:has(body.ecran), body.ecran { height: var(--hauteur); overflow: hidden; overscroll-behavior: none; }
body.page-agenda { background: #fff; }
html:has(body.page-agenda) { background: #fff; }
.ecr { position: fixed; top: 0; left: 0; right: 0; height: calc(var(--hauteur) - var(--onglets)); display: flex; flex-direction: column; }
.ecr-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 16px 24px; max-width: 680px; width: 100%; margin: 0 auto; }

/* ── En-tête façon iOS ── */
.ag-tete { flex: none; background: rgba(249,249,251,.96); border-bottom: .5px solid rgba(60,60,67,.29); padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px; }
.ag-tete__l { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; max-width: 680px; margin: 0 auto; }
.ag-lien { all: unset; cursor: pointer; color: var(--ios); font-size: 17px; padding: 6px 4px; }
.ag-lien--fort { font-weight: 600; }
.ag-lien[disabled] { opacity: .4; }
.ag-mois { flex: 1; text-align: center; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ag-plus { all: unset; cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--ios); }
.ag-plus svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ag-cale { width: 36px; }
.ag-rech { display: block; width: 100%; max-width: 680px; margin: 6px auto 2px; font: inherit; font-size: 16px; border: 0; background: #E3E3E8; border-radius: 10px; padding: 8px 12px; color: #000; outline: none; }

/* ── Agenda : bandeau de la semaine, vue du jour heure par heure ── */
.ag-sem { display: flex; align-items: center; gap: 2px; margin: 4px auto 0; max-width: 680px; }
.ag-sem__fl { all: unset; cursor: pointer; flex: none; width: 22px; text-align: center; color: #C7C7CC; font-size: 22px; line-height: 1; }
.ag-sem__j { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); }
.ag-j { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; }
.ag-j__l { font-size: 11px; font-weight: 600; color: #8E8E93; }
.ag-j__n { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 400; color: #000; }
.ag-j.is-abs .ag-j__n, .ag-j.is-we .ag-j__n { color: #8E8E93; }
.ag-j.is-auj .ag-j__n { color: var(--ios); font-weight: 600; }
.ag-j.is-on .ag-j__n { background: #000; color: #fff; font-weight: 600; }
.ag-j.is-on.is-auj .ag-j__n { background: var(--ios); }
.ag-j__pt { width: 5px; height: 5px; border-radius: 50%; background: #8E8E93; }
.ag-j__pt.is-vide { visibility: hidden; }
.ag-date { text-align: center; font-size: 15px; font-weight: 500; color: #000; margin-top: 6px; }
.ag-date::first-letter { text-transform: uppercase; }
.ag-abs { flex: none; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: #6B7280; background: #F2F2F7; border-bottom: .5px solid var(--ligne); text-align: center; }
.ag-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 12px; }
.ag-jour { position: relative; margin: 10px auto 20px; max-width: 680px; }
.ag-h { position: absolute; left: 0; right: 0; height: 0; border-top: .5px solid var(--ligne); }
.ag-h__t { position: absolute; left: 6px; top: -8px; width: 42px; font-size: 11.5px; color: #8E8E93; background: #fff; font-variant-numeric: tabular-nums; }
.ag-ev { all: unset; cursor: pointer; position: absolute; box-sizing: border-box; overflow: hidden; border-radius: 6px; padding: 3px 6px 3px 8px;
         background: color-mix(in srgb, var(--c) 18%, #fff); border-left: 3.5px solid var(--c); z-index: 2; }
.ag-ev b { display: block; font-size: 13.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 70%, #000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev span { display: block; font-size: 12px; color: color-mix(in srgb, var(--c) 60%, #000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev.is-court { display: flex; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ag-ev.is-court span { display: none; }
.ag-ev .ag-ev__cr { position: absolute; right: 5px; top: 4px; width: 14px; height: 14px; fill: none; stroke: color-mix(in srgb, var(--c) 70%, #000); stroke-width: 2; stroke-linecap: round; }
.ag-now { position: absolute; left: 50px; right: 0; height: 0; border-top: 2px solid var(--ios); z-index: 3; pointer-events: none; }
.ag-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ios); }
.ag-now span { position: absolute; left: -48px; top: -9px; font-size: 11px; font-weight: 700; color: var(--ios); background: #fff; padding-right: 2px; }
.ag-charge { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.65); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 12px; z-index: 30; }

/* ── Feuilles qui montent du bas, comme sur iPhone ── */
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0); transition: background .25s; }
.voile.is-ouvert { background: rgba(0,0,0,.35); }
.fiche { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; display: flex; flex-direction: column; background: #F2F2F7; border-radius: 12px 12px 0 0;
         transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); max-width: 680px; margin: 0 auto; }
.fiche.is-ouverte { transform: none; }
.fiche--grande { height: 92vh; }
.fiche__barre { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; gap: 8px; }
.fiche__barre b { font-size: 17px; font-weight: 600; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fiche__corps { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px calc(24px + var(--bas)); }
.grp { background: #fff; border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.grp:empty { display: none; }
.ch { display: block; width: 100%; border: 0; font: inherit; font-size: 17px; padding: 12px 14px; background: transparent; color: #000; resize: none; outline: none; }
.grp .ch + .ch { border-top: .5px solid var(--ligne); }
.li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; min-height: 46px; font-size: 17px; }
.li + .li { border-top: .5px solid var(--ligne); }
.li input, .li select { font: inherit; font-size: 16px; border: 0; background: #F2F2F7; border-radius: 7px; padding: 6px 10px; color: #000; max-width: 62%; min-width: 0; }
.li input.li__large { flex: 1; max-width: 70%; text-align: right; }
.seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; background: #E3E3E8; border-radius: 9px; padding: 2px; margin-bottom: 18px; }
.seg button { all: unset; cursor: pointer; text-align: center; font-size: 14px; font-weight: 600; padding: 7px 0; border-radius: 7px; color: #000; }
.seg button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.err { background: #FEE2E2; color: #991B1B; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; margin: 0 0 16px; }
.suppr { all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box; text-align: center; background: #fff; color: var(--ios); font-size: 17px; padding: 13px; border-radius: 10px; }
.bt-ligne { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; background: #fff; color: var(--ios-bleu); font-size: 17px; padding: 13px 14px; border-radius: 10px; margin-bottom: 18px; }
.bt-ligne svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bt-gros { all: unset; cursor: pointer; box-sizing: border-box; display: block; width: 100%; text-align: center; background: var(--ios-bleu); color: #fff; font-size: 17px; font-weight: 600; padding: 14px; border-radius: 12px; margin-bottom: 12px; }
.bt-gros[disabled] { opacity: .5; }
.toast { position: fixed; left: 50%; bottom: calc(var(--onglets) + 24px); transform: translateX(-50%); z-index: 70; background: rgba(0,0,0,.75); color: #fff; font-size: 14px; padding: 9px 16px; border-radius: 99px; }

/* ── Listes groupées (réunions, clients) ── */
.re-li { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 60px; cursor: pointer; }
div.re-li { cursor: default; }
.re-li + .re-li { border-top: .5px solid var(--ligne); }
.re-li__pt { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.re-li__av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--marine), #3b5a8a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.re-li__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.re-li__txt b { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #000; }
.re-li__txt small { font-size: 13px; color: #6B6B70; line-height: 1.3; }
.re-et { flex: none; font-size: 15px; font-weight: 600; color: var(--ios-bleu); }
.re-et--att { color: #8E8E93; font-weight: 500; }
.re-li__act { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.re-bt { all: unset; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ios-bleu); padding: 3px 2px; }
.re-bt--rouge { color: var(--ios); }
.re-vide { text-align: center; color: #8E8E93; padding: 56px 24px 24px; font-size: 15px; line-height: 1.45; }
.re-vide svg { width: 52px; height: 52px; fill: none; stroke: #C7C7CC; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.re-vide b { color: #3C3C43; font-size: 17px; }
.re-note { font-size: 12.5px; color: #6B6B70; line-height: 1.45; margin: 10px 4px 0; }
.re-indispo { background: #FFF4E5; color: #8A4B00; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; margin: 0 0 14px; }
.re-titre-grp { margin: 18px 4px 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6B6B70; }

/* ── Réunions : bouton rond rouge de l'app Dictaphone, écran d'enregistrement ── */
.re-go { all: unset; cursor: pointer; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin: 10px 0 12px; }
.re-go i { display: block; width: 76px; height: 76px; border-radius: 50%; background: #FF3B30; border: 5px solid #F2F2F7; box-shadow: 0 0 0 3px #FF3B30; }
.re-go span { font-size: 16px; font-weight: 600; color: #FF3B30; }
.re-go[disabled] { opacity: .4; }
.re-micro { background: #fff; border-radius: 12px; padding: 18px 16px 14px; margin: 4px 0 12px; text-align: center; }
.re-micro svg { width: 40px; height: 40px; fill: none; stroke: var(--ios-bleu); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.re-micro b { display: block; font-size: 18px; margin: 6px 0 4px; }
.re-micro p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: #3C3C43; }
.re-micro .re-micro__aide { margin: 0 0 4px; font-size: 13.5px; text-align: left; background: #F2F2F7; border-radius: 10px; padding: 10px 12px; }
.re-micro.is-refus svg { stroke: var(--ios); }
.re-aide { font-size: 13px; color: #6B6B70; text-align: center; line-height: 1.45; margin: 4px 8px 0; }
.re-rec { position: fixed; inset: 0; z-index: 60; background: #fff; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px calc(var(--bas) + 28px); }
.re-rec__haut { text-align: center; }
.re-rec__haut b { display: block; font-size: 19px; font-weight: 600; }
.re-rec__haut span { font-size: 14px; color: #8E8E93; }
.re-rec__centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.re-rec__temps { font-size: 66px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.re-rec.is-pause .re-rec__temps { color: #8E8E93; }
#rNiveau { width: 100%; max-width: 420px; height: 60px; }
.re-rec__etat { font-size: 14px; font-weight: 600; color: #248A3D; text-align: center; min-height: 20px; }
.re-rec__etat.is-att { color: #C93400; }
.re-rec__veille { font-size: 13px; color: #8E8E93; text-align: center; max-width: 300px; line-height: 1.4; }
.re-rec__bas { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 420px; margin: 0 auto; }
.re-rec__pause { all: unset; cursor: pointer; width: 96px; text-align: center; font-size: 17px; font-weight: 600; color: var(--ios-bleu); }
.re-rec__cale { width: 96px; }
.re-rec__stop { all: unset; cursor: pointer; width: 78px; height: 78px; border-radius: 50%; border: 4px solid #D1D1D6; display: flex; align-items: center; justify-content: center; }
.re-rec__stop i { display: block; width: 30px; height: 30px; border-radius: 7px; background: #FF3B30; }
.re-fin__t { margin: 4px 2px 2px; font-size: 20px; }
.re-fin__r { margin: 0 2px 16px; color: #6B6B70; font-size: 15px; }

/* ── Compte rendu ── */
.seg-bloc { flex: none; padding: 0 16px; }
.re-meta { margin: 2px 2px 14px; color: #6B6B70; font-size: 14px; }
.re-h { margin: 18px 2px 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6B6B70; }
.re-p { margin: 0; background: #fff; border-radius: 10px; padding: 12px 14px; font-size: 16px; line-height: 1.45; white-space: pre-wrap; }
.re-ul { margin: 0; padding: 0; list-style: none; background: #fff; border-radius: 10px; overflow: hidden; }
.re-ul li { padding: 10px 14px; font-size: 16px; line-height: 1.4; }
.re-ul li + li { border-top: .5px solid var(--ligne); }
.re-zone { display: block; width: 100%; font: inherit; font-size: 16px; line-height: 1.45; border: 0; border-radius: 10px; padding: 12px 14px; background: #fff; resize: vertical; min-height: 70px; outline: none; }
.re-zone:focus { box-shadow: 0 0 0 2px var(--ios-bleu); }
.re-aide-edit { font-size: 12.5px; color: #8E8E93; margin: 4px 4px 0; }
.re-vide2 { color: #8E8E93; text-align: center; padding: 24px 0; }
.re-err { color: #991B1B; font-weight: 600; }
.re-noms { background: #fff; border-radius: 10px; padding: 4px 14px 8px; margin-bottom: 12px; }
.re-noms .re-h { margin-top: 10px; }
.re-nom { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.re-nom input { flex: 1; font: inherit; font-size: 16px; border: 0; background: #F2F2F7; border-radius: 8px; padding: 8px 10px; }
.re-fil { display: flex; flex-direction: column; gap: 8px; }
.re-bulle { background: #fff; border-radius: 10px; padding: 9px 12px 10px; }
.re-bulle__t { font-size: 13px; color: #8E8E93; }
.re-bulle__t b { font-size: 14px; }
.re-bulle p { margin: 3px 0 0; font-size: 16px; line-height: 1.42; }
.re-son { width: 100%; margin: 0 0 14px; }
.re-actions { flex: none; display: flex; justify-content: space-around; padding: 10px 12px calc(10px + var(--bas)); border-top: .5px solid rgba(60,60,67,.29); background: rgba(249,249,251,.96); }
.re-actions button { all: unset; cursor: pointer; font-size: 17px; font-weight: 600; color: var(--ios-bleu); padding: 6px 9px; }
.re-actions button[disabled] { opacity: .45; }
.re-actions .re-rouge { color: var(--ios); }

/* ── Fiche client ── */
.cl-tete { text-align: center; margin: 6px 0 18px; }
.cl-tete .re-li__av { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 8px; }
.cl-tete b { display: block; font-size: 22px; }
.cl-tete span { color: #6B6B70; font-size: 15px; }
.cl-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.cl-actions a, .cl-actions button { all: unset; cursor: pointer; box-sizing: border-box; background: #fff; border-radius: 10px; padding: 10px 4px; text-align: center; color: var(--ios-bleu); font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cl-actions svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cl-actions .is-off { opacity: .35; pointer-events: none; }

/* Grand écran : la vue reste centrée et lisible */
@media (min-width: 900px) {
  .fiche { bottom: 50%; transform: translateY(150%); border-radius: 14px; max-height: 86vh; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
  .fiche.is-ouverte { transform: translateY(50%); }
  .fiche--grande { height: 86vh; }
}
