/* ============================================================================
   Démo « Le site qu'on met à jour soi-même » — styles propres à cette démo.

   La scène est un navigateur : la barre d'adresse n'est pas un ornement, c'est
   elle qui porte le moment fort (l'adresse de l'article s'écrit toute seule à
   partir du titre). Le reste imite un site public sobre — jamais l'imitation
   d'un site réel existant.
   ========================================================================== */

.demo__scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: var(--sp-2); align-items: start; }

/* ------------------------------------------------------ Le navigateur --- */
.fenetre {
  border-radius: var(--r-xl);
  background: var(--blanc);
  box-shadow: var(--ombre-l);
  overflow: hidden;
  border: 1px solid var(--ligne);
}
.fenetre__chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--brume);
  border-bottom: 1px solid var(--ligne);
}
.fenetre__pastilles { display: flex; gap: 6px; flex: 0 0 auto; }
.fenetre__pastilles i { width: 10px; height: 10px; border-radius: 50%; background: var(--ligne); }
.fenetre__adresse {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--r-pill);
  font-family: var(--mono); font-size: var(--t-sm); color: var(--ardoise);
  overflow: hidden;
}
.fenetre__cadenas { font-size: 10px; flex: 0 0 auto; opacity: .55; }
.fenetre__url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le fragment que le titre vient de fabriquer, mis en évidence. */
.fenetre__url b { color: var(--bleu); font-weight: 600; }
.fenetre__url.vient-de-changer { animation: sj-surligne 1.1s var(--sortie); }
@keyframes sj-surligne {
  0%   { background: var(--bleu-ciel); box-shadow: 0 0 0 4px var(--bleu-ciel); }
  100% { background: transparent;      box-shadow: 0 0 0 4px transparent; }
}
.fenetre__note {
  flex: 0 0 auto;
  font-size: var(--t-xs); font-weight: 600; color: var(--valide);
  background: var(--valide-fond); padding: 4px 9px; border-radius: var(--r-pill);
  animation: kit-entre .3s var(--sortie) both;
}

/* --------------------------------------------------- Bandeau publication -- */
.bandeau-pub {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--bleu-nuit); color: var(--texte-nuit);
  animation: kit-entre .4s var(--sortie) both;
}
.bandeau-pub__pastille {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--bleu); color: #fff; padding: 5px 10px; border-radius: var(--r-pill);
}
.bandeau-pub__liens { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.bandeau-pub__liens button {
  padding: 5px 10px; border-radius: var(--r-sm);
  font-size: var(--t-sm); color: var(--texte-nuit-doux);
  transition: background var(--vite) linear, color var(--vite) linear;
}
.bandeau-pub__liens button:hover { background: rgba(255,255,255,.08); color: #fff; }
.bandeau-pub__liens button.est-courant { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.bandeau-pub__sortir {
  flex: 0 0 auto;
  padding: 6px 12px; border: 1px solid var(--ligne-nuit); border-radius: var(--r-md);
  font-size: var(--t-sm); color: var(--texte-nuit-doux);
}
.bandeau-pub__sortir:hover { background: rgba(255,255,255,.10); color: #fff; }

/* ------------------------------------------------------------- Le site --- */
.site { display: flex; flex-direction: column; min-height: 520px; }
.site__entete {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--ligne);
}
.site__marque { display: flex; align-items: center; gap: 11px; }
.site__logo {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-nuit) 100%);
}
.site__nom { display: block; font-family: var(--titre); font-size: var(--t-lg); font-weight: 700; color: var(--encre); }
.site__sous { display: block; font-size: var(--t-xs); color: var(--acier); }
.site__nav { margin-left: auto; display: flex; gap: 3px; flex-wrap: wrap; }
.site__nav button {
  padding: 7px 12px; border-radius: var(--r-md);
  font-size: var(--t-md); color: var(--ardoise);
  transition: background var(--vite) linear, color var(--vite) linear;
}
.site__nav button:hover { background: var(--voile); color: var(--bleu-fonce); }
.site__nav button.est-courant { background: var(--bleu-ciel); color: var(--bleu-fonce); font-weight: 600; }

.site__page { flex: 1 1 auto; padding: var(--sp-3); max-height: 560px; overflow-y: auto; }
.site__pied {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 13px var(--sp-3);
  border-top: 1px solid var(--ligne); background: var(--voile);
  font-size: var(--t-xs); color: var(--acier);
}
.site__lien-espace {
  font-size: var(--t-xs); color: var(--acier); text-decoration: underline;
  text-underline-offset: 3px; padding: 4px 6px; border-radius: var(--r-xs);
}
.site__lien-espace:hover { color: var(--bleu); background: var(--bleu-ciel); }

/* ------------------------------------------------------- Pages du site --- */
.page__titre { font-family: var(--titre); font-size: var(--t-2xl); font-weight: 700; color: var(--encre); }
.page__chapo { margin-top: 6px; font-size: var(--t-lg); color: var(--ardoise); line-height: 1.5; max-width: 62ch; }
.page__section { margin-top: var(--sp-3); }
.page__section > h3 {
  display: flex; align-items: baseline; gap: 9px;
  font-family: var(--titre); font-size: var(--t-lg); font-weight: 700; color: var(--encre);
  padding-bottom: 8px; border-bottom: 1px solid var(--ligne); margin-bottom: var(--sp-2);
}
.page__compte { font-size: var(--t-xs); font-weight: 500; color: var(--acier); font-family: var(--mono); }
.page__repli {
  padding: 14px 16px; background: var(--voile); border-radius: var(--r-md);
  font-size: var(--t-md); color: var(--acier); font-style: italic;
}

/* Cartes d'actualité */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: var(--sp-2); }
.carte-actu {
  border: 1px solid var(--ligne); border-radius: var(--r-lg); overflow: hidden;
  background: var(--blanc); text-align: left; display: flex; flex-direction: column;
  transition: box-shadow var(--moyen) linear, transform var(--moyen) var(--sortie);
}
.carte-actu:hover { box-shadow: var(--ombre-m); transform: translateY(-2px); }
.carte-actu.vient-de-naitre { animation: sj-nait .6s var(--ressort) both; }
@keyframes sj-nait {
  0%   { opacity: 0; transform: scale(.92) translateY(10px); }
  100% { opacity: 1; transform: none; }
}
.carte-actu__image { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--brume); }
.carte-actu__image svg { display: block; width: 100%; height: 100%; }
.carte-actu__vide {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; background: var(--brume); color: var(--acier); font-size: var(--t-xs);
}
.carte-actu__corps { padding: 13px 14px; display: grid; gap: 5px; }
.carte-actu__date { font-size: var(--t-xs); color: var(--acier); }
.carte-actu__titre { font-family: var(--titre); font-size: var(--t-md); font-weight: 700; color: var(--encre); line-height: 1.3; }
.carte-actu__extrait { font-size: var(--t-sm); color: var(--ardoise); line-height: 1.5; }
.carte-actu__lire { font-size: var(--t-xs); font-weight: 600; color: var(--bleu); margin-top: 3px; }

/* Article */
.article { max-width: 68ch; }
.article__date {
  display: inline-block; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--bleu-ciel); color: var(--bleu-fonce);
  font-size: var(--t-xs); font-weight: 600;
}
.article__titre { margin-top: 10px; font-family: var(--titre); font-size: var(--t-2xl); font-weight: 700; color: var(--encre); line-height: 1.2; }
.article__couverture { margin-top: var(--sp-2); border-radius: var(--r-lg); overflow: hidden; }
.article__couverture svg { display: block; width: 100%; height: auto; }
.article__texte { margin-top: var(--sp-2); display: grid; gap: 12px; }
.article__texte p { font-size: var(--t-lg); color: var(--ardoise); line-height: 1.62; }
.article__texte p.vient-de-changer { animation: sj-corrige 1.4s var(--sortie); }
@keyframes sj-corrige {
  0%, 60% { background: var(--valide-fond); box-shadow: 0 0 0 6px var(--valide-fond); border-radius: 4px; }
  100%    { background: transparent;        box-shadow: 0 0 0 6px transparent; }
}
.article__galerie { margin-top: var(--sp-2); display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.article__galerie svg { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.article__retour { display: inline-block; margin-top: var(--sp-3); font-size: var(--t-sm); color: var(--bleu); }

/* Lignes de documents */
.doc-ligne {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 11px 12px; border-bottom: 1px solid var(--ligne);
}
.doc-ligne.vient-de-naitre { animation: kit-entre .5s var(--sortie) both; background: var(--valide-fond); }
.doc-ligne__ext {
  font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  text-align: center; padding: 5px 0; border-radius: var(--r-xs);
  background: var(--bleu-ciel); color: var(--bleu-fonce);
}
.doc-ligne__nom { font-size: var(--t-md); font-weight: 500; color: var(--encre); }
.doc-ligne__meta { font-size: var(--t-xs); color: var(--acier); font-family: var(--mono); }
.doc-ligne__tel {
  flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--ligne); border-radius: var(--r-md);
  font-size: var(--t-sm); color: var(--ardoise); background: var(--blanc); white-space: nowrap;
}
.doc-ligne__tel:hover { border-color: var(--bleu); color: var(--bleu-fonce); }

/* Fiche « louer la salle » */
.salle__details { margin-top: var(--sp-2); display: grid; gap: 8px; max-width: 62ch; }
.salle__details div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; font-size: var(--t-md); }
.salle__details dt, .salle__details .cle { color: var(--acier); }
.salle__details .valeur { color: var(--ardoise); }
.salle__explication {
  margin-top: var(--sp-2); padding: 11px 13px;
  background: var(--bleu-ciel); border-radius: var(--r-md);
  font-size: var(--t-sm); color: var(--bleu-fonce); line-height: 1.55;
}

/* ------------------------------------------------- Panneaux de rédaction -- */
.panneau {
  margin-bottom: var(--sp-3);
  border: 1px solid var(--bleu); border-radius: var(--r-lg);
  background: var(--bleu-ciel);
  animation: kit-entre .4s var(--sortie) both;
}
.panneau__tete {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 15px; text-align: left;
  font-family: var(--titre); font-size: var(--t-md); font-weight: 700; color: var(--bleu-fonce);
}
.panneau__chevron { transition: transform var(--moyen) var(--sortie); flex: 0 0 auto; }
.panneau.est-ouvert .panneau__chevron { transform: rotate(90deg); }
.panneau__corps { padding: 0 15px 15px; display: grid; gap: 11px; }
.panneau__aide { font-size: var(--t-xs); color: var(--bleu-fonce); opacity: .85; }

.propositions { display: grid; gap: 6px; }
.proposition {
  text-align: left; padding: 9px 12px;
  border: 1px dashed var(--bleu); border-radius: var(--r-md);
  background: rgba(255,255,255,.6); font-size: var(--t-sm); color: var(--bleu-fonce);
}
.proposition:hover { background: #fff; border-style: solid; }
.proposition small { display: block; margin-top: 2px; font-size: var(--t-xs); color: var(--ardoise); }

.champ--titre { font-family: var(--titre); font-size: var(--t-lg); font-weight: 600; }
textarea.champ { min-height: 96px; resize: vertical; line-height: 1.55; font-family: var(--texte); }

.apercu-adresse {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: var(--r-md); background: var(--blanc);
  font-family: var(--mono); font-size: var(--t-sm); color: var(--acier);
}
.apercu-adresse b { color: var(--bleu); font-weight: 600; word-break: break-all; }
.apercu-adresse em { font-style: normal; color: var(--attention); font-size: var(--t-xs); }

.photos-depot {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  padding: 11px; border: 1px dashed var(--acier); border-radius: var(--r-md);
  background: rgba(255,255,255,.55);
}
.photos-depot__vide { font-size: var(--t-sm); color: var(--acier); }
.vignette { position: relative; width: 74px; border-radius: var(--r-sm); overflow: hidden; animation: kit-entre .35s var(--sortie) both; }
.vignette svg { display: block; width: 100%; height: auto; }
.vignette__badge {
  position: absolute; left: 3px; bottom: 3px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bleu); color: #fff; padding: 2px 5px; border-radius: 4px;
}
.photos-depot__ajouter {
  width: 74px; aspect-ratio: 4 / 3; border: 1px solid var(--ligne); border-radius: var(--r-sm);
  background: var(--blanc); color: var(--bleu); font-size: var(--t-xl);
}
.photos-depot__ajouter:hover { border-color: var(--bleu); background: var(--bleu-ciel); }

/* ------------------------------------------------------------ Coulisse --- */
.coulisse__liste { display: grid; gap: 9px; max-height: 620px; overflow-y: auto; }
.coulisse__liste li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px;
  font-size: var(--t-sm); color: var(--ardoise); line-height: 1.5;
  animation: kit-entre .4s var(--sortie) both;
}
.coulisse__liste li::before { content: "✓"; color: var(--valide); font-weight: 700; }
.coulisse__liste li > span { min-width: 0; }
.coulisse__liste strong { color: var(--encre); font-weight: 600; }
.coulisse__liste code {
  font-family: var(--mono); font-size: var(--t-xs);
  background: var(--brume); padding: 1px 5px; border-radius: 4px; color: var(--bleu-fonce);
  word-break: break-all;
}

/* -------------------------------------------------------------- Modale --- */
.ecran-modale {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(14, 35, 72, .55);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-2);
  animation: kit-entre .25s var(--sortie) both;
}
.modale {
  background: var(--blanc); border-radius: var(--r-xl); box-shadow: var(--ombre-l);
  width: min(430px, 100%);
}
.modale__entete { padding: var(--sp-3) var(--sp-3) 10px; }
.modale__entete h2 { font-family: var(--titre); font-size: var(--t-xl); font-weight: 700; }
.modale__entete p { margin-top: 5px; font-size: var(--t-md); color: var(--ardoise); }
.modale__corps { padding: 0 var(--sp-3); display: grid; gap: 7px; }
.modale__aide { font-size: var(--t-xs); color: var(--acier); line-height: 1.5; }
.modale__pied { display: flex; gap: 8px; justify-content: flex-end; padding: var(--sp-2) var(--sp-3) var(--sp-3); }

/* ---------------------------------------------------------- Responsive --- */
@media (max-width: 1080px) {
  .demo__scene { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .site__entete { flex-direction: column; align-items: flex-start; }
  .site__nav { margin-left: 0; }
  .site__page { padding: var(--sp-2); }
  .cartes { grid-template-columns: minmax(0, 1fr); }
  .doc-ligne { grid-template-columns: 40px minmax(0, 1fr); }
  .doc-ligne__tel { grid-column: 2; justify-self: start; }
  .salle__details div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
