/* Écrans partagés entre l'espace parents et l'espace Samira : cartes du plan, étapes D.O.R.S.,
   fil de messages, cartes d'appel, zone de saisie, formulaires. Chargé après ui.css. */
.stack { display: grid; gap: 16px; }
.iconbtn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; cursor: pointer; text-decoration: none;
  background: rgba(251, 246, 238, .1); color: var(--creme);
  transition: transform 140ms var(--ease), background-color 160ms var(--ease);
}
.iconbtn:active { transform: scale(.94); }

.day-wd { text-transform: lowercase; }
.hero .day--future b { color: rgba(251, 246, 238, .78); }

/* Ajustement nouveau */
.ajust { display: grid; gap: 10px; justify-items: start; }
.ajust-txt { font: 600 22px/1.2 var(--serif); color: var(--creme); font-variant-numeric: lining-nums; }
.ajust-par { display: flex; align-items: center; gap: 10px; font: 400 13px/1.35 var(--sans); color: rgba(251, 246, 238, .78); }
.ajust-par b { color: var(--creme); font-weight: 600; }
.mini-av { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ocre-doux); color: var(--nuit); font: 600 13px/1 var(--serif); }

/* Cartes du plan du jour */
.card h2 { font-size: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { flex: 1; }
.ico--sm { width: 34px; height: 34px; }
.label { display: block; font: 500 12px/1.3 var(--sans); color: var(--texte-2); letter-spacing: .01em; }
.coucher { display: flex; align-items: baseline; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--trait); }
.coucher .big-time { font-size: 48px; }
.sous { padding-top: 14px; }
.sous + .sous { border-top: 1px solid var(--trait); margin-top: 14px; }
.sous h3 { display: flex; align-items: center; gap: 8px; font: 600 13px/1.3 var(--sans); color: var(--texte); margin-bottom: 6px; }
.sous p { color: var(--texte); font-size: 14.5px; text-wrap: pretty; }
.badge-new.badge--sm { padding: 3px 7px 3px 6px; font-size: 9.5px; }
.rituel { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rituel li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px;
  border-radius: 999px; background: var(--creme); font-size: 13px; line-height: 1.2;
}
.rituel li span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--nuit); color: var(--creme); font: 600 10px/1 var(--sans); }

.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tuile { padding: 14px 14px 12px; border-radius: 14px; background: var(--creme); }
.tuile .big-time { font-size: 34px; margin: 6px 0 4px; }
.tuile small { font-size: 12px; }
.note { margin-top: 12px; font-size: 13.5px; color: var(--texte-2); text-wrap: pretty; }

.card.night { background: var(--nuit); color: var(--creme); position: relative; overflow: hidden; }
.card.night::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 88% 18%, rgba(251, 246, 238, .6) 99%, transparent),
    radial-gradient(1px 1px at 76% 34%, rgba(251, 246, 238, .45) 99%, transparent),
    radial-gradient(1.4px 1.4px at 94% 46%, rgba(251, 246, 238, .4) 99%, transparent);
}
.card.night p { color: rgba(251, 246, 238, .88); font-size: 14.5px; text-wrap: pretty; }
.card.night .ico { background: rgba(251, 246, 238, .1); color: var(--ocre); }

.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 16px; gap: 6px; font-size: 14px; }
.bandeau {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px;
  background: var(--ocre-doux); color: var(--nuit); font-size: 13.5px;
}
.bandeau b { flex: 1; font-weight: 600; }
.bandeau a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--blanc); font-weight: 500; font-size: 13px; text-decoration: none; position: relative; }
.bandeau a::before { content: ''; position: absolute; inset: -4px 0; }

.prevu-tete { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; }
.prevu .lettrine { float: none; margin: 0; font-size: 76px; }
.prevu .label { margin-bottom: 4px; }
.prevu h2 { font-size: 21px; line-height: 1.25; }
.prevu-quand { margin-top: 10px; font-size: 14px; color: var(--texte-2); }
.mention { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--trait); font-size: 13px; color: var(--texte-2); }
.mention svg { margin-top: 1px; }

.form { display: grid; gap: 14px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; }
.field input[readonly] { background: transparent; color: var(--texte-2); }
.hint { font-size: 12.5px; color: var(--texte-2); margin-top: -4px; }
.linkbtn { position: relative; justify-self: end; min-height: 44px; padding: 0 2px; border: 0; background: none; font: 500 13.5px/1 var(--sans); text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 4px; cursor: pointer; color: var(--texte); }
.objectif { margin: 0; display: grid; gap: 8px; }
.objectif blockquote { margin: 0; font: 600 23px/1.25 var(--serif); }
.objectif .label { font-family: var(--sans); }
.signe { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 500 13px/1 var(--sans); color: var(--texte-2); }
.night .objectif .mini-av { background: var(--ocre); }
.plan-h { margin: 14px 0 -2px 2px; font-size: 22px; }

.etapes { list-style: none; margin: 0; padding: 20px 16px 20px 18px; }
.etapes > li { padding: 0 0 18px 42px; }
.etapes > li::before { top: 13px; }
.etapes > li:not(:last-child)::after { top: 47px; bottom: -13px; }
.etape {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  transition: transform 140ms var(--ease);
}
.etape:active { transform: scale(.98); }
.etape .lettrine { float: none; margin: 0; font-size: 46px; text-align: center; }
.step--next .lettrine { opacity: .4; }
.step--done .lettrine { color: var(--texte); opacity: .85; }
.etape b { font: 600 17px/1.2 var(--serif); }
.step--next .etape b { font-weight: 600; color: var(--texte); }
.etape small { margin-top: 3px; font-size: 12.5px; }
.etape-st { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px; font: 500 11.5px/1.4 var(--sans); background: color-mix(in srgb, var(--texte) 7%, transparent); color: var(--texte-2); }
.step--current .etape-st { background: var(--nuit); color: var(--creme); }
.night .step--current .etape-st { background: var(--ocre); color: var(--nuit); }
.etape > svg { color: var(--texte-2); transition: rotate 200ms var(--ease); }
.is-open .etape > svg { rotate: 90deg; }
.etape-blocs { display: grid; gap: 10px; margin: 10px 0 2px; animation: vue-in 220ms var(--ease) both; }
.eb { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--creme) 70%, var(--surface)); }
.night .eb { background: color-mix(in srgb, var(--creme) 7%, transparent); }
.eb h4 { margin: 0 0 4px; font: 600 12.5px/1.3 var(--sans); color: var(--texte-2); letter-spacing: .01em; }
.eb p { font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.eb p + p { margin-top: 6px; }
.etape-blocs .ajuste { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; }
.etape-blocs .mention { margin-top: 0; padding-top: 0; border-top: 0; }

.base { display: grid; gap: 10px; }
.base-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.base h3 { font-size: 20px; }
.base > p { font-size: 14.5px; text-wrap: pretty; }
.base .rituel { margin: 0; }
.exemple { flex: none; padding: 3px 8px; border: 1px dashed var(--trait); border-radius: 999px; font: 500 11px/1.3 var(--sans); color: var(--texte-2); }
.coches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.coches li { display: flex; gap: 10px; align-items: flex-start; }
.coches svg { margin-top: 3px; padding: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ocre-doux); color: var(--nuit); }

.fil { display: flex; flex-direction: column; padding: 18px 14px 20px; flex: 1 0 auto !important; }
.fil-jour { display: flex; justify-content: center; margin: 14px 0 10px; }
.fil-jour:first-child { margin-top: 0; }
.fil-jour span { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--texte) 6%, transparent); font: 500 12px/1.4 var(--sans); color: var(--texte-2); }
.qui { display: block; margin-bottom: 2px; font: 600 12.5px/1.3 var(--sans); color: var(--texte-2); }
.bubble--me small, .bubble--them small { text-align: right; }
.bubble--them + .bubble--them, .bubble--me + .bubble--me { margin-top: -2px; }
.vocal { min-width: 240px; }
.vocal-l { display: flex; align-items: center; gap: 10px; }
.vocal-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--nuit); color: var(--creme); cursor: pointer; }
.vocal-btn::before { content: ''; position: absolute; inset: -2px; }
.bubble--me .vocal-btn { background: var(--ocre); color: var(--nuit); }
.vocal-btn svg { fill: currentColor; stroke: none; }
.vocal-btn svg:last-child, .is-playing .vocal-btn svg:first-child { display: none; }
.is-playing .vocal-btn svg:last-child { display: block; }
.onde { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; }
.onde i { flex: 1; min-height: 3px; border-radius: 2px; background: currentColor; opacity: .35; transform-origin: center; }
.is-playing .onde i { opacity: .7; animation: onde 900ms ease-in-out infinite alternate; }
.is-playing .onde i:nth-child(3n) { animation-delay: -300ms; }
.is-playing .onde i:nth-child(3n+1) { animation-delay: -600ms; }
@keyframes onde { to { transform: scaleY(.35); } }
.vocal-d { font: 500 12px/1 var(--sans); font-variant-numeric: tabular-nums; opacity: .7; }
.photo { padding: 6px 6px 8px; }
.photo .qui { margin: 4px 8px 6px; }
.photo-v {
  display: grid; place-items: center; width: 236px; aspect-ratio: 4 / 3; border-radius: 15px;
  background: radial-gradient(45% 40% at 72% 34%, rgba(239, 162, 46, .55), transparent 70%), linear-gradient(170deg, var(--creme) 0%, #E8D9C2 30%, var(--nuit-2) 78%, var(--nuit));
  color: var(--creme); box-shadow: inset 0 0 0 1px rgba(251, 246, 238, .12);
}
.photo p { margin: 8px 8px 0; }
.photo small { margin-right: 8px; }

.appel-carte {
  width: min(100%, 320px); margin: 4px auto 10px; padding: 14px 16px;
  border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--trait);
}
.appel-carte-tete { display: flex; align-items: center; gap: 12px; }
.appel-carte-tete b { display: block; font-weight: 600; font-size: 14.5px; }
.appel-carte-tete small { display: block; font-size: 12px; }
.appel-carte-tete time { align-self: flex-start; font-size: 11.5px; color: var(--texte-2); }
.appel-resume { margin-top: 12px; border-top: 1px solid var(--trait); }
.appel-resume summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; list-style: none; cursor: pointer;
  font: 600 14px/1 var(--sans);
}
.appel-resume summary::-webkit-details-marker { display: none; }
.appel-resume summary svg { color: var(--texte-2); transition: rotate 200ms var(--ease); }
.appel-resume[open] summary svg { rotate: 90deg; }
.appel-resume > p { font-size: 14px; text-wrap: pretty; }
.appel-resume .label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; }
.appel-resume h4 { margin: 14px 0 8px; font: 600 13px/1.3 var(--sans); }
.appel-resume .coches { font-size: 14px; }
.appel-prep { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 13px; color: var(--texte-2); }
.appel-prep svg { animation: prep 1.6s ease-in-out infinite; }
@keyframes prep { 50% { opacity: .3; } }
.appel-carte .linkbtn { display: block; margin: 2px 0 -8px auto; }

.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.transcript b { display: block; font: 600 12.5px/1.3 var(--sans); color: var(--texte-2); }
.transcript p { font-size: 14.5px; }

[data-view]:has(> .dock) { display: flex; flex-direction: column; }
[data-view]:has(> .dock) > * { flex-shrink: 0; }
[data-view] > .dock {
  position: sticky; bottom: 0; z-index: 20; margin-top: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: 0 -1px 0 rgba(22, 34, 63, .04), 0 -8px 28px rgba(22, 34, 63, .07);
}
.night [data-view] > .dock { box-shadow: 0 -1px 0 var(--trait); }
.dock .bottomnav { box-shadow: none; border-radius: 0; padding-top: 0; }
.composer { display: flex; align-items: center; gap: 4px; padding: 10px 10px 34px; }
.composer :is(input, textarea) { flex: 1; min-width: 0; min-height: 44px; padding: 10px 16px; border-radius: 999px; background: var(--fond); border-color: transparent; }
.composer .iconbtn { background: none; color: var(--texte); }
.composer .composer-send { background: var(--nuit); color: var(--creme); }
.night .composer .composer-send { background: var(--ocre); color: var(--nuit); }
.composer :is(input, textarea):placeholder-shown ~ .composer-send, .composer :is(input, textarea):not(:placeholder-shown) ~ .composer-mic { display: none; }

/* ——— Écran d'appel (parents et Samira) ——— */
.appel {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: calc(var(--st) + 16px) 24px calc(var(--sb) + 36px); text-align: center; color: var(--creme);
  background: radial-gradient(90% 55% at 50% 22%, #2A3A66, transparent 70%), var(--nuit);
}
.appel h1 { color: var(--creme); font-size: 26px; }
.appel-haut { display: grid; justify-items: center; gap: 6px; margin-top: 12px; }
.appel-haut p { color: rgba(251, 246, 238, .72); }
.appel .minuteur { font-size: 46px; color: var(--creme); }
.rec { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(251, 246, 238, .1); font: 500 13px/1 var(--sans); }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: prep 1.6s ease-in-out infinite; }
.annonce { max-width: 300px; margin: auto 0; --encadre: var(--ocre); color: var(--creme); animation: vue-in 300ms var(--ease) both; }
.participants { list-style: none; margin: auto 0; padding: 0; display: flex; justify-content: center; gap: 22px; }
.participants li { display: grid; justify-items: center; gap: 8px; animation: vue-in 300ms var(--ease) both; }
.participants .avatar { width: 72px; height: 72px; font-size: 28px; }
.participants b { font-weight: 500; font-size: 14px; }
.participants small { margin-top: -6px; color: rgba(251, 246, 238, .6); }
.participants .arrive .avatar { background: transparent; color: var(--creme); border: 1.5px dashed rgba(251, 246, 238, .5); animation: prep 1.6s ease-in-out infinite; }
.appel--sonne { justify-content: space-between; }
.appel--sonne h1 { font-size: 32px; margin-top: 30px; }
.appel--sonne .appel-haut { margin-top: 15%; }
.sonne-av { position: relative; display: grid; place-items: center; }
.sonne-av .avatar { position: relative; width: 120px; height: 120px; font-size: 48px; }
.sonne-av::before, .sonne-av::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--orange);
  animation: sonne 2s cubic-bezier(.2, .6, .3, 1) infinite;
}
.sonne-av::after { animation-delay: -1s; }
@keyframes sonne { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.appel-actions { display: flex; justify-content: center; gap: 22px; width: 100%; }
.appel-actions--2 { justify-content: space-around; }
.rond { display: grid; justify-items: center; gap: 10px; min-width: 76px; border: 0; background: none; color: rgba(251, 246, 238, .85); font: 500 13px/1.2 var(--sans); cursor: pointer; }
.rond > span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(251, 246, 238, .12); color: var(--creme); transition: transform 140ms var(--ease), background-color 160ms var(--ease); }
.rond:active > span { transform: scale(.93); }
.rond[aria-pressed="true"] > span { background: var(--creme); color: var(--nuit); }
.rond--decrocher > span { background: var(--orange); box-shadow: 0 10px 28px -8px rgba(242, 106, 27, .8); animation: decroche 1.4s ease-in-out infinite; }
@keyframes decroche { 50% { transform: translateY(-4px) rotate(-8deg); } }
.rond--raccrocher > span { background: var(--rec); }

/* Mode nuit : la carte « Si réveil cette nuit » garde son relief sur le fond nuit */
.night .card.night { background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ocre) 55%, transparent); }
