/* ==========================================================================
   Sitarti — éléments communs à tous les sites d'exemple
   (bandeau du haut, bloc « Ce site vous plaît ? », essai « votre nom »)

   Pour l'utiliser dans un site d'exemple (dossier public/exemples/xxx/) :
     <link rel="stylesheet" href="../commun/sitarti-demo.css">
     <script src="../commun/sitarti-demo.js" defer></script>
     <body data-nom-defaut="Nom de l'entreprise fictive" data-pack="pro">
       (data-pack="essentiel" ou "pro" : formule montrée par l'exemple,
        cochée d'office dans le formulaire quand on clique sur « Je veux le même »)
     Tout en haut du body :
       <div data-sitarti="bandeau"><p class="sd-repli">Site d’exemple créé par Sitarti · entreprise fictive</p></div>
     Tout en bas du body :
       <div data-sitarti="bloc"></div>
     Partout où le nom de l'entreprise apparaît :
       <span data-nom>Nom de l'entreprise</span>
     Dans le <head> (évite d'afficher le nom fictif une fraction de seconde
     quand on ouvre un lien personnalisé) :
       <script>document.documentElement.classList.add('js');if(/[?&]nom=[^&]/.test(location.search))document.documentElement.classList.add('sd-attente')</script>

   Lien personnalisé pour un artisan : ajouter ?nom= suivi du nom à l'adresse
   de l'exemple, avec des + à la place des espaces. Exemple :
     sitarti.fr/exemples/menuiserie/?nom=Menuiserie+Dupont
   Le nom est affiché comme du texte uniquement, 40 caractères maximum.
   ========================================================================== */

@font-face {
  font-family: "Sitarti Inter";
  src: url("../../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sitarti Serif";
  src: url("../../fonts/caladea-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Bandeau du haut ---------- */
[data-sitarti="bandeau"] {
  position: relative;
  z-index: 80;
  min-height: 44px;
  background: #0F1622;
  color: #C9D5E5;
  font: 500 13px/1.3 "Sitarti Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sd-repli {
  margin: 0;
  padding: 13px 16px;
  text-align: center;
}
.sd-in {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1280px;
  min-height: 44px;
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 48px);
}
.sd-in a { text-decoration: none; }
.sd-in :focus-visible,
.sd-bloc :focus-visible { outline: 2px solid #BFD6F1; outline-offset: 2px; }

.sd-marque {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
}
.sd-marque img { flex: none; width: 20px; height: 20px; }
.sd-marque b { font-weight: 700; }
.sd-fictif { color: #A9B5C8; }
.sd-court { display: none; }

.sd-retour {
  margin-left: auto;
  padding: 10px 4px;
  color: #C9D5E5;
  white-space: nowrap;
}
.sd-retour:hover { color: #fff; }

.sd-essai {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid #ffffff1f;
}
.sd-essai label { color: #A9B5C8; white-space: nowrap; }
.sd-essai input {
  width: 200px;
  height: 30px;
  padding: 0 10px;
  background: #16243A;
  border: 1px solid #2E405C;
  border-radius: 0;
  color: #fff;
  font: 500 14px "Sitarti Inter", system-ui, sans-serif;
}
.sd-essai input::placeholder { color: #7F8CA2; }
.sd-essai input:focus { outline: none; border-color: #BFD6F1; }
.sd-aide { display: none; }

.sd-essai-btn {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid #ffffff2e;
  color: #fff;
  font: 500 13px "Sitarti Inter", system-ui, sans-serif;
  cursor: pointer;
}
.sd-essai-btn svg { width: 14px; height: 14px; }

.sd-cta {
  flex: none;
  padding: 8px 14px;
  background: #fff;
  color: #0F1622;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.sd-cta:hover { background: #BFD6F1; }

.sd-r-court { display: none; }

/* Téléphone : bandeau discret sur une ligne, le champ « votre nom » s'ouvre à la demande */
@media (max-width: 899px) {
  .sd-in { flex-wrap: wrap; gap: 0 8px; }
  .sd-marque { display: none; }
  .sd-retour { display: flex; align-items: center; gap: 8px; margin-left: 0; padding: 10px 0; color: #fff; }
  .sd-r-long { display: none; }
  .sd-r-court { display: inline-flex; align-items: center; gap: 8px; }
  .sd-r-court img { width: 18px; height: 18px; }
  .sd-r-court b { display: none; }
  .sd-essai-btn { display: inline-flex; margin-left: auto; padding: 0 6px; border: 0; }
  .sd-cta { padding: 7px 10px; font-size: 13px; }
  .sd-essai {
    display: none;
    order: 10;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 2px 0 12px;
    border: 0;
  }
  .sd-ouvert .sd-essai { display: flex; }
  .sd-essai label { width: 100%; }
  .sd-essai input { flex: 1; width: auto; height: 40px; font-size: 16px; }
  .sd-aide { display: block; width: 100%; color: #7F8CA2; font-size: 12px; }
}
@media (max-width: 379px) {
  .sd-in { gap: 0 6px; }
  .sd-essai-btn, .sd-cta { font-size: 12.5px; }
  .sd-essai-btn { padding: 0 4px; }
}

/* ---------- Bloc final « Ce site vous plaît ? » ---------- */
.sd-bloc {
  background: #0F1622;
  color: #C9D5E5;
  font: 400 16px/1.6 "Sitarti Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sd-bloc-in {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px 64px;
  align-items: end;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px) 40px;
}
.sd-bloc-logo { display: block; width: auto; height: 30px; margin-bottom: 28px; }
.sd-bloc h2 {
  margin: 0;
  color: #fff;
  font: 600 clamp(30px, 4.2vw, 52px)/1.05 "Sitarti Inter", system-ui, sans-serif;
  font-variation-settings: "opsz" 32;
  letter-spacing: -.035em;
}
.sd-bloc h2 em {
  display: block;
  font-family: "Sitarti Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  color: #BFD6F1;
}
.sd-bloc-sous { margin: 20px 0 0; max-width: 520px; }
.sd-bloc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.sd-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  background: #fff;
  color: #0F1622;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .2s ease;
}
.sd-btn:hover { background: #BFD6F1; }
.sd-lien { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid #BFD6F1; padding-bottom: 2px; }
.sd-lien:hover { color: #BFD6F1; }
.sd-note {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 48px) 32px;
  border-top: 1px solid #ffffff14;
  color: #8D9AB0;
  font-size: 13px;
}
@media (max-width: 759px) {
  .sd-bloc-in { grid-template-columns: 1fr; }
  .sd-btn { width: 100%; justify-content: center; }
}

/* ---------- Lien personnalisé (…/?nom=…) ---------- */
.sd-marque-txt { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sd-apercu, .sd-apercu-ligne { display: none; }
.sd-mode-apercu .sd-long,
.sd-mode-apercu .sd-marque-txt > .sd-fictif { display: none; }
.sd-mode-apercu .sd-apercu { display: inline; }
.sd-apercu b, .sd-apercu-ligne b { color: #fff; font-weight: 700; }
/* Sur ordinateur, l'étiquette du champ laisse la place à la phrase (elle reste lue par les lecteurs d'écran) */
@media (min-width: 900px) {
  .sd-mode-apercu .sd-essai label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (max-width: 899px) {
  .sd-mode-apercu .sd-apercu-ligne {
    display: block;
    order: 5;
    flex-basis: 100%;
    margin: 0;
    padding: 0 0 11px;
    color: #C9D5E5;
    font-size: 12.5px;
    line-height: 1.45;
  }
}
/* En attendant que le nom du lien soit appliqué : pas de « flash » du nom fictif */
.sd-attente [data-nom] { visibility: hidden; animation: sd-montre 0s linear 1.5s forwards; }
@keyframes sd-montre { to { visibility: visible; } }
.sd-apercu-ligne .sd-fictif { white-space: nowrap; }
.sd-apercu-ligne .sd-apercu-nom { overflow-wrap: anywhere; }

/* ---------- Formule de l'exemple (bloc final) ---------- */
.sd-formule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  color: #BFD6F1;
  font: 600 12px/1.4 "Sitarti Inter", system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sd-formule::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.sd-formule b { color: #fff; font-weight: 700; }
/* La ligne de formule reste sur une seule ligne logique (pas de colonnes sur téléphone) */
.sd-formule { display: block; }
.sd-formule::before { display: inline-block; margin-right: 10px; vertical-align: middle; }
