/* Compte et accès (#/securite) : prototype Securite.dc.html.
   Styles propres à cet écran (refonte du prototype v73) : un fichier par écran, chargé par index.html après
   shell.css. Téléphone : @media (max-width: 767px), comme la coque. Classes « cpt- » ; les anciennes règles
   .people / .field d'app.css sont reprises ici, à l'intérieur de .cpt seulement. */

.cpt [hidden] { display: none !important; }
.cpt p { margin: 0; }
.cpt .page-head { margin-bottom: 24px; }

/* Messages verts en haut, fermables */
.cpt-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px;
  padding: 12px 16px; border-radius: 12px; background: var(--app-ok-bg); color: var(--app-ok-ink); font-size: 14px; font-weight: 600; }
.cpt-note--bad { background: var(--app-bad-bg); color: var(--app-bad-ink); }
.cpt-note__close { flex: none; min-width: 32px; min-height: 32px; border: 0; border-radius: 8px; background: transparent;
  color: inherit; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.cpt-note__close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Deux blocs : un titre, une carte */
.cpt-block { margin-bottom: 32px; }
.cpt-block > h2 { margin: 0 0 12px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.cpt-card { padding: 24px; border: 1px solid var(--app-line); border-radius: 16px; background: var(--app-surface); }
.cpt-part h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.cpt-card .cpt-part, .cpt-card .cpt-setting { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--app-line); }
.cpt-card > .cpt-parts:first-child > .cpt-part:first-child,
.cpt-card > .cpt-setting:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.cpt-card > .cpt-parts:first-child > .cpt-part:first-child h3 { margin-bottom: 8px; }
.cpt-muted, .cpt-sub { font-size: 14px; color: var(--fr-muted); }
.cpt-sub { margin: -8px 0 12px !important; }

/* Mon compte */
.cpt-facts { margin: 0; padding: 0; max-width: 560px; }
.cpt-facts > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 10px 0; }
.cpt-facts > div + div { border-top: 1px solid var(--fr-line); }
.cpt-facts dt { font-size: 14px; color: var(--fr-muted); }
.cpt-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Formulaires : mot de passe (520 px), invitation (640 px, champs de 520 px) */
.cpt-form { display: flex; flex-direction: column; gap: 16px; }
.cpt-form--pwd { max-width: 520px; }
.cpt-form--invite { max-width: 640px; }
.cpt-form--invite > .field { max-width: 520px; }
.cpt .field { gap: 6px; }
.cpt .field__label { font-size: 14px; font-weight: 600; }
.cpt .field__hint, .cpt-hint { margin: 0; font-size: 13px; color: var(--app-muted); }
.cpt .field__error, .cpt-error { margin: 0; font-size: 13px; font-weight: 600; color: var(--fr-danger); }
.cpt .input, .cpt .select { min-height: 44px; padding-top: 0; padding-bottom: 0; border: 1px solid var(--app-line-strong);
  border-radius: 8px; background-color: var(--app-surface); color: var(--app-ink); font-size: 16px; }
.cpt .input { padding-left: 12px; padding-right: 12px; }
.cpt .select { padding-left: 12px; }
.cpt .btn--primary, .cpt-panel .btn { min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 700; }

/* Qui a accès */
.cpt-people { margin: 0; padding: 0; list-style: none; border: 1px solid var(--app-line); border-radius: 16px;
  background: var(--app-surface); overflow: hidden; }
.cpt-people .cpt-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 16px 20px; }
.cpt-people .cpt-person + .cpt-person { border-top: 1px solid var(--app-line); }
.cpt-person .people__who { flex: 1 1 360px; }
.cpt-person__email { font-weight: 700; }
.cpt-person__meta { margin-top: 2px !important; font-size: 14px; color: var(--app-muted); }
.cpt-person__attn { margin-top: 4px !important; font-size: 14px; font-weight: 600; color: var(--app-warn-ink); }
.cpt-person .people__actions { flex: none; gap: 4px 8px; }
.cpt-see, .cpt-remove { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.cpt-see { padding: 0 14px; border: 1px solid var(--app-line); background: var(--app-surface); color: var(--fr-ink); }
.cpt-see:hover { background: var(--fr-surface-2); }
.cpt-see--attn { border-color: transparent; background: var(--app-primary); color: var(--app-on-primary); }
.cpt-see--attn:hover { background: var(--app-primary-hover); }
.cpt-remove { padding: 0 10px; border: 0; background: transparent; color: var(--fr-danger); }
.cpt-remove:hover { background: var(--fr-danger-soft); }
.cpt-see:focus-visible, .cpt-remove:focus-visible { outline: 2px solid var(--fr-primary); outline-offset: 2px; }
/* Le lien « Équipe » dans une phrase de Compte et accès : même dessin, touché sur 41 px au doigt (audit EC-13) */
.cpt-link { position: relative; }
@media (max-width: 1199px) { .cpt-link::before { content: ""; position: absolute; inset: -12px -2px; } }
@media (min-width: 768px) and (max-width: 1199px) { .cpt-see, .cpt-remove { min-height: 40px; } }   /* tablette, le doigt */

/* Ce que voit un membre : « Tout l'espace » / « Seulement certains restaurants », puis un bloc par restaurant */
.cpt-scope { display: flex; flex-direction: column; gap: 10px; }
.cpt-scope__title { font-size: 14px; font-weight: 600; }
.cpt-modes { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cpt-mode { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--app-line);
  border-radius: 10px; background: var(--app-surface); cursor: pointer; }
.cpt-mode span { font-weight: 600; }
.cpt-mode input, .cpt-resto input { width: 18px; height: 18px; }
.cpt-mode input { margin: 2px 0 0; }
.cpt-restos { display: flex; flex-direction: column; gap: 10px; }
.cpt-resto { margin: 0; padding: 10px 12px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); min-width: 0; }
.cpt-resto legend { padding: 0 4px; font-weight: 700; }
.cpt-resto__all, .cpt-resto__cell { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.cpt-resto__all span { font-weight: 600; }
.cpt-resto__cells { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.cpt-resto__cell { font-size: 14px; }

/* Comportement de l'app : une case (titre, phrase dessous), la règle de la semaine en deux choix */
.cpt-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
.cpt-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
.cpt-check__text { display: flex; flex-direction: column; }
.cpt-check__title { font-weight: 600; }
.cpt-check__sub { font-size: 14px; color: var(--fr-muted); }
.cpt-modes--row { flex-direction: row; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.cpt-modes--row .cpt-mode { flex: 0 0 auto; min-width: 220px; }
.cpt-setting .notice { margin-top: 10px; }

/* Panneau « Ce que voit … » (520 px) */
.slideover.cpt-panel { width: min(520px, 94vw); border-left: 0; box-shadow: -8px 0 32px rgb(0 0 0 / 0.25); }
.cpt-panel .slideover__head { padding: 20px 24px; border-bottom-color: var(--app-line); }
.cpt-panel .slideover__head h2 { margin: 0; font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.cpt-panel .slideover__head .btn--icon { flex: none; width: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 10px;
  background: var(--fr-surface-2); color: var(--app-ink); }
.cpt-panel .slideover__head .btn--icon svg { flex: none; width: 16px; height: 16px; }
.cpt-panel .slideover__body { padding: 20px 24px; gap: 12px; }
.cpt-panel .slideover__foot { padding: 16px 24px; gap: 8px 12px; border-top-color: var(--app-line); }
.cpt-panel .btn--secondary { border-color: var(--app-line); color: var(--fr-ink); }
.cpt-panel p { margin: 0; }
.cpt-panel__sub { font-size: 14px; color: var(--app-muted); }
.cpt-panel__err { padding: 10px 12px; border-radius: 10px; background: var(--app-bad-bg); color: var(--app-bad-ink); font-size: 14px; font-weight: 600; }
.cpt-panel .cpt-mode, .cpt-panel .cpt-resto { background: transparent; }

/* Téléphone : pas de maquette ; rien ne déborde à 375 px */
@media (max-width: 767px) {
  .cpt-resto__all, .cpt-resto__cell, .cpt-see, .cpt-remove { min-height: 44px; }   /* doigt : 44 px (fos-slow-9) */
  .cpt-block > h2 { font-size: 20px; }
  .cpt-card { padding: 16px; }
  .cpt-facts > div { grid-template-columns: 104px 1fr; gap: 12px; }
  .cpt-people .cpt-person { padding: 14px 16px; }
  .cpt-person .people__who { flex-basis: 100%; }
  .cpt-person .people__actions { margin-left: 0; }
  .cpt-modes--row { flex-direction: column; }
  .cpt-modes--row .cpt-mode { flex: none; }
  .slideover.cpt-panel { width: 100vw; max-width: 100vw; }
  .cpt-panel .slideover__head, .cpt-panel .slideover__body, .cpt-panel .slideover__foot { padding-left: 16px; padding-right: 16px; }
}
