/* Shared navigation and footer for the public site */

/* ==========================================================================
   RESET UNIVERSEL TACTILE & CONTOURS (Neutralisation des traces bleues mobiles)
   ========================================================================== */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent !important;
}

button,
a,
input,
select,
textarea,
summary,
[role="button"],
[tabindex] {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}

/* Élimination définitive de l'anneau / contour bleu natif lors du clic ou du tap */
button:focus,
a:focus,
summary:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
[role="button"]:focus {
  outline: none !important;
}

/* Aucun contour lors d'une interaction souris ou tactile */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

/* Accessibilité au clavier seul (touche Tab) : anneau terracotta au lieu du bleu natif */
button:focus-visible,
a:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent, #c1693c) !important;
  outline-offset: 2px !important;
}

:root {
  --ink: #2b2420;
  --paper: #f0e8dc;
  --accent: #c1693c;
  --muted-light: rgba(250, 246, 239, 0.68);
  --line-dark: rgba(250, 246, 239, 0.14);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: #2b2420;
  view-transition-name: site-nav;
  min-height: 114px; /* Hauteur initiale augmentée de 1 cm (~38px) */
  padding-block: 14px !important;
  padding-inline: clamp(20px, 5vw, 64px) !important;
  border-bottom: 1px solid rgba(250, 246, 239, 0.1);
  box-shadow: 0 8px 24px rgba(43, 36, 32, 0.12);
  box-sizing: border-box;
}

/* Transitions actives UNIQUEMENT lors du scroll (évite tout saut/animation au chargement de page) */
nav.is-scroll-ready {
  transition: box-shadow 0.3s ease;
}

/* Navbar dynamique au scroll : taille réduite vers le bas */
nav.nav-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.logo-img {
  width: auto;
  height: clamp(68px, 7.5vw, 98px) !important;
  max-width: 100%;
  aspect-ratio: 629 / 397;
  object-fit: contain;
  cursor: pointer;
  transform-origin: left center;
}

nav.is-scroll-ready .logo-img {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.logo-img:hover {
  transform: translateY(-2px);
  opacity: 0.95;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.logo-img:active {
  transform: translateY(0);
}

/* Logo dynamique au scroll : format compact */
/* Logo figé : taille constante au scroll */

/* Desktop: alignement parfait du logo et de la navigation avec la grille de contenu (1200px)
   La boucle du S de « Sarah's Art » est alignée verticalement au pixel près avec le « D » de « Dessin » */
@media (min-width: 1200px) {
  nav {
    padding-left: calc((100% - 1200px) / 2 + 34.3px) !important;
    padding-right: calc((100% - 1200px) / 2 + 40px) !important;
  }

  .logo-img {
    margin-left: 0 !important;
  }

  .nav-right {
    margin-right: 0 !important;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  nav {
    padding-left: 34.3px !important;
    padding-right: 40px !important;
  }

  .logo-img {
    margin-left: 0 !important;
  }

  .nav-right {
    margin-right: 0 !important;
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px) !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-links a {
  color: #faf6ef;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.7;
  letter-spacing: 0.5px;
  margin-left: 0 !important;
  padding: 8px 0;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  transition: color 0.25s ease;
  text-transform: none !important;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 0;
  height: 1px;
  background: var(--accent, #c1693c);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a[aria-current="page"] {
  color: #ffffff !important;
  font-weight: 500 !important;
}

.nav-links a[aria-current="page"]::after {
  width: 100% !important;
  height: 1px !important;
  background: var(--accent, #c1693c) !important;
  bottom: 0px !important;
  box-shadow: none !important;
}

.lang-switcher {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  margin-left: 10px;
}

.lang-switcher-menu {
  display: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  border-radius: 3px;
  transition: background 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #faf6ef;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger:hover,
.hamburger:focus,
.hamburger:focus-visible,
.hamburger:active {
  background: rgba(193, 105, 60, 0.18);
  outline: none;
  box-shadow: none;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   FOOTER (Harmonisé 1200px / 40px - Alignement parfait avec le 'S' et le 'EN')
   ========================================================================== */
footer {
  margin-top: 80px;
  background: var(--ink);
  border-top: 3px solid var(--accent);
  padding: 60px 0 30px !important;
  color: rgba(250, 246, 239, 0.7);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto 40px !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(240px, 1.7fr) minmax(140px, 0.8fr) minmax(220px, 1fr) !important;
  gap: clamp(28px, 6vw, 80px) !important;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 12px;
  text-decoration: none;
}

.footer-logo-img {
  width: auto;
  height: clamp(67px, 7.8vw, 91px);
  max-width: 100%;
  aspect-ratio: 629 / 397;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-logo-link:hover .footer-logo-img {
  opacity: 0.88;
  transform: translateY(-2px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.footer-col h4 {
  color: var(--accent);
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 20px;
}

.footer-col p {
  color: rgba(250, 246, 239, 0.6);
  margin-bottom: 12px;
  text-align: justify;
  max-width: 42ch;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(250, 246, 239, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-col:last-child {
  display: flex;
  flex-direction: column;
}

.footer-artwork {
  margin-top: auto;
  margin-bottom: auto;
  padding: 8px 0;
}

.footer-artwork-link {
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(250, 246, 239, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  line-height: 0;
}

.footer-artwork-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 10px rgba(193, 105, 60, 0.25);
}

.footer-artwork-img {
  width: 156px;
  height: auto;
  max-width: 100%;
  aspect-ratio: 977 / 732;
  display: block;
  object-fit: cover;
}

.footer-bottom {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box !important;
  border-top: 1px solid var(--line-dark) !important;
  padding-top: 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 15px !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-legal a {
  color: rgba(250, 246, 239, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--accent);
}

.footer-legal span {
  color: rgba(250, 246, 239, 0.3);
}

.footer-col a:focus-visible,
.footer-bottom a:focus-visible,
.footer-legal a:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  nav {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background-color: #2b2420 !important;
    min-height: 80px;
    padding-block: 10px !important;
    padding-inline: 18px !important;
  }

  nav.nav-scrolled {
    min-height: 80px;
    padding-block: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }

  .logo-img {
    height: 60px !important;
    margin-left: 0 !important;
  }

  nav.nav-scrolled .logo-img {
    height: 60px !important;
  }

  .nav-right {
    margin-right: 0 !important;
    gap: 12px !important;
    display: flex !important;
    align-items: center !important;
  }

  .lang-switcher {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 0 !important;
  }

  .hamburger {
    display: flex !important;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #2b2420 !important;
    flex-direction: column;
    align-items: center;
    gap: 0 !important;
    padding: 10px 0 20px;
    border-top: 1px solid var(--accent, #c1693c) !important;
    box-shadow: 0 18px 30px rgba(43, 36, 32, 0.2);
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    margin: 0 !important;
  }

  .nav-links a:hover {
    color: var(--accent, #c1693c);
    background: rgba(193, 105, 60, 0.08);
  }
  .nav-links a[aria-current="page"] {
    color: var(--accent, #c1693c) !important;
    background: rgba(193, 105, 60, 0.12) !important;
    border-left: 2px solid var(--accent, #c1693c) !important;
    font-weight: 500 !important;
  }

  .nav-links a::after {
    display: none !important;
  }

  .lang-switcher-menu {
    display: none !important;
  }

  footer {
    margin-top: 56px;
  }

  .footer-container {
    padding-left: 18px !important;
    padding-right: 18px !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 30px !important;
  }
  .footer-logo-img {
    height: 60px;
  }
  .footer-artwork {
    margin-top: 14px;
    margin-bottom: 0;
    padding: 0;
  }
  .footer-bottom {
    padding-left: 18px !important;
    padding-right: 18px !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Transitions inter-pages : la navbar reste 100% fixe, sans saut, sans cross-fade, sans mouvement */
::view-transition-group(site-nav) {
  animation: none !important;
  z-index: 1000;
}

::view-transition-old(site-nav) {
  animation: none !important;
  opacity: 0 !important;
}

::view-transition-new(site-nav) {
  animation: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

/* Transition douce et fluide pour le contenu de la page (évite tout saut ou superposition prolongée) */
::view-transition-old(root) {
  animation: 0.15s cubic-bezier(0.4, 0, 1, 1) both vt-fade-out;
}

::view-transition-new(root) {
  animation: 0.22s cubic-bezier(0, 0, 0.2, 1) both vt-fade-in;
}

@keyframes vt-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes vt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-img,
  .hamburger,
  .nav-links a,
  .footer-col a {
    transition: none;
  }
}

/* ==========================================================================
   UNIFORMISATION DES SOULIGNEMENTS DE TITRES SUR L'ENSEMBLE DU SITE
   (Trait couleur terracotta #c1693c pour tous les titres)
   ========================================================================== */
@keyframes drawLine {
  to {
    width: 60px;
  }
}

/* Ne pas appliquer de trait sous le titre dynamique h1 de l'accueil */
.hero h1::after {
  display: none !important;
}

/* Titres terracotta soulignés harmonisés (Référence : "Œuvres en vedette" - réduits de 5 points) */
.section-title,
.recommendation-title {
  font-family: 'Arial', sans-serif !important;
  font-weight: 700 !important;
  color: #c1693c !important;
  font-size: calc(2rem - 5pt) !important;
  margin-top: 0;
  margin-bottom: 42px !important;
  position: relative !important;
  display: inline-block !important;
  line-height: 1.25 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

@media (max-width: 768px) {
  .section-title,
  .recommendation-title {
    font-family: 'Arial', sans-serif !important;
    font-weight: 700 !important;
    color: #c1693c !important;
    font-size: calc(1.5rem - 3pt) !important;
    margin-top: 0 !important;
    margin-bottom: 36px !important;
    line-height: 1.25 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }
}

@media (max-width: 600px) {
  .section-title,
  .recommendation-title {
    font-family: 'Arial', sans-serif !important;
    font-weight: 700 !important;
    color: #c1693c !important;
    font-size: calc(1.5rem - 3pt) !important;
    margin-top: 0 !important;
    margin-bottom: 36px !important;
    line-height: 1.25 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }
}

/* Titres terracotta soulignés harmonisés sur desktop (Référence exacte : « Recommandation d’encadrement » — 2px d'épaisseur, bottom -11px) */
h1::after,
.section-title::after,
.recommendation-title::after,
.process-hero h1::after,
.contact-intro h1::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  bottom: -11px !important;
  width: 0;
  height: 2px !important;
  background: #c1693c !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  transform: none !important;
  will-change: auto !important;
  animation: drawLine 0.8s ease forwards !important;
  animation-delay: 0.4s !important;
}

@media (max-width: 768px) {
  h1::after,
  .section-title::after,
  .recommendation-title::after,
  .process-hero h1::after,
  .contact-intro h1::after {
    bottom: -10px !important;
    height: 2px !important;
    background: #c1693c !important;
    border-radius: 2px !important;
  }
}

@media (max-width: 600px) {
  h1::after,
  .section-title::after,
  .recommendation-title::after,
  .process-hero h1::after,
  .contact-intro h1::after {
    bottom: -10px !important;
    height: 2px !important;
    background: #c1693c !important;
    border-radius: 2px !important;
  }
}
