/* DESIGN MAGAZINE, part 1 (01/10): the header of the validated Inspiration mockup, on every page.
   White bar, « quel·canapé » wordmark, navigation on the LEFT right after the logo, search field + Mon projet + heart
   on the right. Scoped by .entete--mag (header.php), loaded after main.css and aides.css: removing the class or this
   file gives back the previous header. Phone logic of 01/10 kept: no magnifier under 600 px, search atop the menu. */

.entete.entete--mag {
  background: color-mix(in srgb, var(--blanc) 94%, transparent);
  border-bottom: 1px solid var(--trait);
}

/* Wordmark: Familjen Grotesk 700, the middle dot in bronze (the mockup's logo, preferred by Romain). */
.entete--mag .marque-site { flex-direction: row; align-items: baseline; gap: 0; font: 700 1.4rem/1 var(--sans); letter-spacing: -0.03em; }
.entete--mag .marque-site .cote { display: none; }
.marque-site__point { color: var(--bleu); padding-inline: 0.04em; }
.entete--mag .marque-site:hover .marque-site__point, .entete--mag .marque-site:focus-visible .marque-site__point { color: var(--moutarde); }

@media (min-width: 1101px) {
  .entete--mag .entete__barre { gap: 0.6rem; min-height: 68px; }
  /* Navigation on the left, right after the logo; the right group is pushed by the search field. */
  .entete--mag .nav-principale { margin-left: clamp(1.2rem, 2.6vw, 2.6rem); margin-right: auto; }
  .entete--mag .nav-principale__liste { gap: clamp(0.1rem, 0.8vw, 0.7rem); }
  .entete--mag .nav-lien, .entete--mag .nav-groupe__bouton {
    padding: 0.6rem 0.45rem; border-radius: 0; background: none; color: var(--anthracite);
    font: 500 0.95rem/1 var(--sans);
    text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 8px;
    transition: text-decoration-color 0.18s ease, color 0.18s ease;
  }
  .entete--mag .nav-lien:hover, .entete--mag .nav-lien:focus-visible, .entete--mag .nav-groupe__bouton:hover,
  .entete--mag .nav-groupe.est-ouvert > .nav-groupe__bouton { background: none; color: var(--anthracite); text-decoration-color: var(--trait); }
  .entete--mag .nav-lien[aria-current] { background: none; text-decoration-color: var(--moutarde); }
  /* « Meilleurs canapés »: the ranking icon in gold, the same underline language (the moutarde one for good). */
  .entete--mag .nav-lien.nav-lien--phare { padding: 0.6rem 0.45rem; gap: 0.4rem; border: 0; background: none; color: var(--anthracite); font: 600 0.95rem/1 var(--sans); }
  .entete--mag .nav-lien.nav-lien--phare .nav-phare__texte { text-decoration: underline; text-decoration-color: var(--moutarde); text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .entete--mag .nav-lien.nav-lien--phare:hover, .entete--mag .nav-lien.nav-lien--phare:focus-visible { background: none; color: var(--bleu-2); }
  .entete--mag .nav-lien--phare .nav-phare__icone { stroke: var(--bleu); }
  .entete--mag .nav-lien--phare .nav-phare__etoile { fill: var(--moutarde); }

  /* Search drawn as a field (same instant search: data-recherche-ouvrir opens the dialog). */
  .entete--mag .bouton-recherche {
    flex: 0 1 19rem; min-width: 0; justify-content: flex-start; gap: 0.55rem; min-height: 40px; padding: 0 1rem 0 0.85rem;
    border: 1px solid var(--trait); border-radius: 999px; background: var(--blanc); color: var(--feutre);
    font: 400 0.9rem/1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: border-color 0.18s ease, color 0.18s ease;
  }
  .entete--mag .bouton-recherche svg { flex: none; width: 17px; height: 17px; color: var(--anthracite); }
  .entete--mag .bouton-recherche > span { overflow: hidden; text-overflow: ellipsis; }
  .entete--mag .bouton-recherche:hover, .entete--mag .bouton-recherche:focus-visible { border-color: var(--anthracite); color: var(--anthracite); }
  /* « Mon projet » keeps its words on every computer width (main.css made it a 40 px circle under 1280 px). */
  .entete--mag .entete-projet { width: auto; min-width: 0; margin-left: 0.15rem; padding: 0 0.95rem 0 0.8rem; white-space: nowrap; }
  .entete--mag .entete-projet .entete-projet__texte { display: inline; }
}
/* Narrow computers: the field keeps « Rechercher » only, then becomes a round magnifier. */
@media (min-width: 1101px) and (max-width: 1339px) { .entete--mag .bouton-recherche__suite { display: none; } .entete--mag .bouton-recherche { flex: 0 0 auto; } }
@media (min-width: 1101px) and (max-width: 1219px) {
  .entete--mag .bouton-recherche { width: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .entete--mag .bouton-recherche > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ================= PHONES AND TABLETS (Romain 01/10 21 h 55: « sur mobile, ça fait cheap ») =================
   White bar, the wordmark at a real size, then only icons drawn alike (Mon projet, heart and its count, magnifier
   from 600 px, menu): no pill, no frame, 44 px touch areas. « Meilleurs canapés » opens the menu. */
@media (max-width: 1100px) {
  .entete--mag .bouton-recherche__suite { display: none; }
  .entete.entete--mag { background: var(--blanc); border-bottom: 1px solid var(--trait); }
  .entete--mag .entete__barre { min-height: 60px; gap: 2px; }
  .entete--mag .marque-site { margin-right: auto; font-size: 1.5rem; color: var(--anthracite); }
  .entete--mag .phare-mobile { display: none; }
  .entete--mag .bouton-recherche, .entete--mag .entete-projet, .entete--mag .entete-selection, .entete--mag .bouton-menu {
    position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; min-width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
    border: 0; border-radius: 50%; background: none; color: var(--anthracite); box-shadow: none;
  }
  .entete--mag .bouton-recherche::after, .entete--mag .entete-projet::after, .entete--mag .entete-selection::after { display: none; }
  .entete--mag .bouton-recherche svg, .entete--mag .entete-projet .icone, .entete--mag .entete-selection .icone { width: 23px; height: 23px; }
  .entete--mag .entete-projet .icone { color: var(--anthracite); }
  .entete--mag .entete-projet .entete-projet__texte, .entete--mag .entete-projet .entete-projet__resume { display: none; }
  .entete--mag .entete-projet__point { top: 8px; right: 7px; width: 10px; height: 10px; background: var(--moutarde); border-color: var(--blanc); }
  .entete--mag .entete-selection__n { top: 4px; right: 1px; min-width: 18px; height: 18px; font-size: 0.66rem; line-height: 18px; }
  .entete--mag .bouton-recherche:hover, .entete--mag .entete-projet:hover, .entete--mag .entete-selection:hover, .entete--mag .bouton-menu:hover { background: var(--platre); }
  .entete--mag .bouton-menu { margin-left: 2px; }
  .entete--mag .bouton-menu__icone { width: 24px; height: 16px; stroke-width: 1.7; }
  /* With the dark and yellow drawer (main.css), the open bar turns dark like before: light logo, gold dot, yellow menu button */
  body.menu-ouvert .entete.entete--mag { background: var(--foret); border-color: transparent; }
  body.menu-ouvert .entete--mag .marque-site, body.menu-ouvert .entete--mag .entete-projet, body.menu-ouvert .entete--mag .entete-projet .icone, body.menu-ouvert .entete--mag .entete-selection { color: var(--platre); }
  body.menu-ouvert .entete--mag .marque-site__point { color: var(--moutarde); }
  body.menu-ouvert .entete--mag .bouton-menu { background: var(--moutarde); color: var(--anthracite); }
  .entete--mag .bouton-recherche { order: 1; }

}
@media (max-width: 440px) { .entete--mag .marque-site { font-size: 1.38rem; } .entete--mag .bouton-recherche, .entete--mag .entete-projet, .entete--mag .entete-selection, .entete--mag .bouton-menu { width: 42px; min-width: 42px; } }
@media (max-width: 340px) { .entete--mag .marque-site { font-size: 1.15rem; } }
/* Under 600 px no magnifier in the bar (01/10, validated): the search is the first line of the open menu. */
@media (max-width: 599px) { .entete.entete--mag .bouton-recherche { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .entete--mag .nav-lien, .entete--mag .nav-groupe__bouton, .entete--mag .bouton-recherche, .entete--mag .nav-principale { transition: none; }
  .entete--mag .nav-principale { transform: none; }
}

/* Footer: the same wordmark. */
.pied__point { color: var(--moutarde); }
