/* Portail d'acepia.fr : connexion, accueil des coins, pages de choix des maquettes, gestion des accès.
   Une page en retrait, sombre et sans matière, qui laisse parler les aperçus des maquettes. */
:root {
  --fond: #20262b; --fond-2: #181d21; --texte: #eef0ec; --texte-2: #b7bfc4; --trait: #3a434a; --champ: #14181c;
  --lien: #f2c46b; --lien-clair: #f7d48d; --erreur: #ff9b8f; --ok: #9fd8b4;
  color-scheme: dark;
}
html { background: var(--fond); }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.5; color: var(--texte); background: var(--fond); }
::selection { background: var(--lien); color: var(--fond); }
:focus-visible { outline: 3px solid var(--lien); outline-offset: 4px; border-radius: 6px; }
a { color: var(--lien); text-underline-offset: 3px; }
a:hover { color: var(--lien-clair); }
[hidden] { display: none !important; }

main { max-width: 1120px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) 16px 64px; }
header.intro { max-width: 62ch; margin-bottom: clamp(28px, 5vw, 48px); }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance; }
h2 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 10px; text-wrap: balance; }
header.intro p { margin: 0 0 10px; font-size: 1.08rem; color: var(--texte-2); }
.mention { font-size: .95rem; color: var(--texte-2); }

/* ——— Barre du haut (accueil, coins, accès) ——— */
.barre-portail {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px;
  max-width: 1120px; margin: 0 auto; padding: 10px 16px; border-bottom: 1px solid var(--trait);
}
.barre-portail .qui { margin: 0 auto 0 0; color: var(--texte-2); font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.barre-portail .qui strong { color: var(--texte); font-weight: 650; }
.barre-portail a, .lien-bouton {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  font: inherit; font-size: .95rem; color: var(--lien); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.barre-portail a:hover, .lien-bouton:hover { color: var(--lien-clair); text-decoration: underline; }
.barre-portail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ——— Aperçus des maquettes ——— */
.maquettes { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.maquettes a { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.maquettes img {
  width: 100%; max-width: 300px; aspect-ratio: 1 / 2; object-fit: cover; object-position: top;
  border-radius: 26px; border: 8px solid #0d1013; box-shadow: 0 18px 40px -16px #000; transition: translate .25s cubic-bezier(.16, 1, .3, 1);
}
.maquettes a:hover img { translate: 0 -6px; }
.nom { font-size: 1.4rem; font-weight: 750; margin-top: 8px; }
.maquettes a:hover .nom { color: var(--lien); }
.desc { color: var(--texte-2); max-width: 34ch; }

.gerant { margin-top: clamp(44px, 7vw, 80px); padding-top: 28px; border-top: 1px solid var(--trait); max-width: 62ch; }
.gerant ul { margin: 0 0 22px; padding-left: 1.2em; color: var(--texte-2); }
.gerant li { margin-bottom: 6px; }

/* ——— Boutons et champs ——— */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px;
  border: 0; border-radius: 8px; background: var(--lien); color: var(--fond);
  font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--lien-clair); color: var(--fond); }
.bouton:disabled { opacity: .65; cursor: progress; }
.bouton.second { background: transparent; color: var(--texte); border: 1.5px solid #56616a; font-weight: 650; min-height: 44px; padding: 8px 16px; }
.bouton.second:hover { border-color: var(--texte-2); background: #283037; }
.bouton.danger { background: transparent; color: var(--erreur); border: 1.5px solid #7a3d38; font-weight: 650; min-height: 44px; padding: 8px 16px; }
.bouton.danger:hover { background: #3a2422; }

.champ { display: grid; gap: 6px; }
.champ > span:first-child, .champ > label { font-size: .95rem; font-weight: 600; color: var(--texte); }
.champ .aide { font-weight: 400; color: var(--texte-2); }
input[type='text'], input[type='password'], input:not([type]) {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #4a555e; border-radius: 8px;
  background: var(--champ); color: var(--texte); font: inherit; font-size: 1.0625rem; caret-color: var(--lien);
}
input:hover { border-color: #66727b; }
input:focus-visible { outline: 3px solid var(--lien); outline-offset: 1px; border-color: var(--lien); }
.erreur { margin: 0; color: var(--erreur); font-weight: 600; }
.erreur:empty { display: none; }

/* Mot de passe avec bouton « Afficher » dans le champ. */
.mdp { position: relative; display: block; }
.mdp input { padding-right: 96px; }
.mdp button {
  position: absolute; inset: 2px 2px 2px auto; min-width: 84px; border: 0; border-radius: 6px;
  background: transparent; color: var(--lien); font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer;
}
.mdp button:hover { background: #222a30; }

/* ——— Connexion ——— */
.page-connexion { min-height: 100dvh; display: grid; align-content: center; padding: clamp(28px, 8vh, 96px) 16px; }
.connexion { width: min(100%, 400px); margin: 0 auto; }
.connexion .site { margin: 0 0 clamp(28px, 6vh, 56px); color: var(--texte-2); font-size: .95rem; letter-spacing: .02em; }
.connexion h1 { margin-bottom: 10px; }
.connexion .chapeau { margin: 0 0 28px; color: var(--texte-2); font-size: 1.08rem; }
.connexion form { display: grid; gap: 18px; }
.connexion .bouton { width: 100%; margin-top: 4px; }
.connexion .note { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--trait); color: var(--texte-2); font-size: .95rem; }

/* ——— Accueil : les coins ouverts à ce compte ——— */
.coins { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(28px, 4vw, 40px); }
.coin a { display: grid; gap: 14px; color: inherit; text-decoration: none; }
.coin .vignettes { display: flex; gap: 10px; overflow: hidden; }
.coin .vignettes img {
  flex: 0 0 auto; width: clamp(96px, 22vw, 132px); aspect-ratio: 1 / 2; object-fit: cover; object-position: top;
  border-radius: 16px; border: 5px solid #0d1013; box-shadow: 0 12px 26px -14px #000; background: var(--fond-2);
  transition: translate .25s cubic-bezier(.16, 1, .3, 1);
}
.coin a:hover .vignettes img { translate: 0 -4px; }
.coin a:hover .vignettes img:nth-child(2) { transition-delay: .03s; }
.coin a:hover .vignettes img:nth-child(3) { transition-delay: .06s; }
.coin a:hover .vignettes img:nth-child(4) { transition-delay: .09s; }
.coin .titre-coin { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 1.4rem; font-weight: 750; }
.coin .titre-coin small { font-size: 1rem; font-weight: 400; color: var(--texte-2); }
.coin a:hover .titre-coin > span { color: var(--lien); }
.vide { color: var(--texte-2); max-width: 52ch; }

.mon-compte { margin-top: clamp(44px, 7vw, 80px); padding-top: 22px; border-top: 1px solid var(--trait); max-width: 460px; }
.mon-compte summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; color: var(--lien); }
.mon-compte summary:hover { color: var(--lien-clair); }
.mon-compte form { display: grid; gap: 16px; margin-top: 12px; }
.ok { margin: 0; color: var(--ok); font-weight: 600; }
.ok:empty { display: none; }

/* ——— Accès (admin) ——— */
.acces-page { max-width: 860px; }
.bloc { padding: 22px 0 26px; border-top: 1px solid var(--trait); }
.bloc:first-of-type { border-top: 0; padding-top: 0; }
.nouveau { display: grid; gap: 16px; }
.nouveau .deux { display: grid; gap: 16px; }
@media (min-width: 640px) { .nouveau .deux { grid-template-columns: 1fr 1fr; } }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: .95rem; font-weight: 600; }
.cases { display: flex; flex-wrap: wrap; gap: 8px; }
.case { position: relative; display: inline-flex; }
.case input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.case span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px 8px 10px;
  border: 1.5px solid #4a555e; border-radius: 999px; color: var(--texte-2); font-size: .95rem; font-weight: 600; cursor: pointer;
}
.case span::before {
  content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid currentColor;
  background: transparent center / 12px no-repeat;
}
.case input:checked + span { color: var(--fond); background: var(--lien); border-color: var(--lien); }
.case input:checked + span::before {
  border-color: var(--fond); background-color: var(--fond);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23f2c46b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.case input:focus-visible + span { outline: 3px solid var(--lien); outline-offset: 2px; }
.case input:disabled + span { opacity: .55; cursor: default; }
.case:hover input:not(:checked) + span { border-color: var(--texte-2); color: var(--texte); }

.comptes { list-style: none; margin: 0; padding: 0; }
.compte { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--trait); }
.compte .tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.compte .tete strong { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.compte .tete code { font: inherit; color: var(--texte-2); overflow-wrap: anywhere; }
.compte .infos { margin: 0; color: var(--texte-2); font-size: .92rem; }
.compte .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.compte.admin .infos { color: var(--texte); }

/* Identifiants à transmettre : affichés une seule fois. */
.identifiants {
  display: grid; gap: 12px; padding: 18px; border-radius: 10px; background: var(--fond-2); border: 1.5px solid var(--lien);
}
.identifiants p { margin: 0; }
.identifiants dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.identifiants dt { color: var(--texte-2); }
.identifiants dd { margin: 0; font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.identifiants .rappel { color: var(--texte-2); font-size: .92rem; }

.toast {
  position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 10; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--texte); color: var(--fond); font-weight: 650;
  box-shadow: 0 10px 24px -10px #000; animation: monter .25s cubic-bezier(.16, 1, .3, 1);
}
.toast.erreur-toast { background: #ffd9d4; color: #5a1610; }
@keyframes monter { from { translate: -50% 12px; opacity: 0; } }
.compte .tete, .compte .infos, .compte .actions { margin: 0; }
