/*
Theme Name:  Ala12
Theme URI:   https://ala12.fr
Description: Thème sur mesure pour À la 12 — Hôtel-Restaurant Gastronomique en Moselle. Compatible Elementor. Optimisé SEO.
Author:      DCB Technologies
Author URI:  https://dcb-technologies.fr
Version:     1.0.0
Requires at least: 6.4
Requires PHP:      8.1
License:     Proprietary
Text Domain: ala12
*/

/* ============================================================
   VARIABLES
   ============================================================ */

:root {
  --color-primary:    #1a1a1a;
  --color-accent:     #c9a25a;
  --color-cream:      #f7f4ef;
  --color-text:       #2d2d2d;
  --color-text-light: #6b6b6b;
  --color-border:     #e5dfd6;
  --color-white:      #ffffff;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --text-sm:   clamp(0.875rem, 1.5vw, 1rem);
  --text-base: clamp(1rem, 1.8vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 2vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 3vw, 2rem);
  --text-2xl:  clamp(1.875rem, 4vw, 2.75rem);
  --text-3xl:  clamp(2.25rem, 5vw, 3.5rem);

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);

  --transition: .25s ease;
  --container:  1280px;
  --header-h:   76px;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* Elementor pages — no body padding (hero sections start behind header) */
body.elementor-page { padding-top: 0; }

/* ============================================================
   ADMIN BAR COMPATIBILITY
   WP ajoute html { margin-top: 32px } quand la barre admin est visible.
   On décale le header fixed et on compense le padding du body.
   ============================================================ */

.admin-bar .site-header             { top: 32px; }
.admin-bar .mobile-nav              { top: calc(var(--header-h) + 32px); }
.admin-bar body                     { padding-top: calc(var(--header-h) + 32px); }
.admin-bar body.elementor-page      { padding-top: 0; }

@media screen and (max-width: 782px) {
  .admin-bar .site-header           { top: 46px; }
  .admin-bar .mobile-nav            { top: calc(var(--header-h) + 46px); }
  .admin-bar body                   { padding-top: calc(var(--header-h) + 46px); }
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: .03em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover { background: #333; border-color: #333; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline-white:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-accent { background: var(--color-accent); color: var(--color-white); border-color: var(--color-accent); }
.btn-accent:hover { filter: brightness(.9); }

.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .75rem;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-h);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img,
.header-logo .custom-logo {
  height: 48px;
  width: auto;
}

/* Nav principale */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav ul.menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav ul.menu > li > a {
  display: block;
  padding: .5rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav ul.menu > li > a:hover,
.main-nav ul.menu > li.current-menu-item > a,
.main-nav ul.menu > li.current-menu-ancestor > a {
  color: var(--color-primary);
  background: var(--color-cream);
}

/* Dropdowns */
.main-nav ul.menu li.menu-item-has-children { position: relative; }

.main-nav ul.menu li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: .4rem;
  vertical-align: middle;
  transition: transform var(--transition);
}

.main-nav ul.menu li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

.main-nav ul.menu .sub-menu {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  list-style: none;
  margin: 0;
}

.main-nav ul.menu li.menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav ul.menu .sub-menu li a {
  display: block;
  padding: .6rem 1.25rem;
  font-size: .875rem;
  color: var(--color-text);
  transition: var(--transition);
}

.main-nav ul.menu .sub-menu li a:hover {
  background: var(--color-cream);
  color: var(--color-primary);
}

/* CTA header */
.header-cta {
  flex-shrink: 0;
  margin-left: auto;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav mobile */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--color-white);
  z-index: 999;
  overflow-y: auto;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform .3s ease;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav ul.menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav ul.menu > li > a {
  display: block;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav ul.menu .sub-menu {
  display: block;
  list-style: none;
  margin: .5rem 0 .5rem 1rem;
  padding: 0;
}

.mobile-nav ul.menu .sub-menu li a {
  display: block;
  padding: .5rem 0;
  font-size: .95rem;
  color: var(--color-text-light);
}

.mobile-nav .mobile-nav-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================================
   MAIN CONTENT — aucune contrainte pour laisser Elementor
   gérer la mise en page complète
   ============================================================ */

.site-main {
  display: block;
  width: 100%;
  min-height: 50vh;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  width: 100%;
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  padding-top: clamp(3rem, 6vw, 5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand .footer-logo {
  display: block;
  margin-bottom: 1.25rem;
}

.footer-brand .footer-logo img,
.footer-brand .footer-logo .custom-logo {
  height: 44px;
  width: auto;
  filter: brightness(10);
}

.footer-brand p {
  font-size: .875rem;
  line-height: 1.7;
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.footer-social { display: flex; gap: .75rem; }

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--color-white);
  font-size: .9rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.footer-col h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-col ul,
.footer-col .footer-menu {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li a,
.footer-col .footer-menu li a {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  transition: var(--transition);
}

.footer-col ul li a:hover,
.footer-col .footer-menu li a:hover { color: var(--color-white); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .875rem;
  margin-bottom: .75rem;
}

.footer-contact-item i {
  color: var(--color-accent);
  margin-top: .2rem;
  flex-shrink: 0;
  width: 16px;
}

.footer-contact-item a:hover { color: var(--color-white); }

.footer-distinctions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.footer-distinctions span {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

.footer-distinctions span::before { content: '—  '; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
}

.footer-bottom-links { display: flex; gap: 1.5rem; }

.footer-bottom-links a {
  color: rgba(255,255,255,.4);
  transition: var(--transition);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* ============================================================
   PAGE CONTENU (pages sans Elementor, articles de blog)
   ============================================================ */

.page-wrap {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem);
}

.entry-header { margin-bottom: 2rem; }

.entry-meta {
  font-size: .875rem;
  color: var(--color-text-light);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.entry-content {
  font-size: var(--text-base);
  line-height: 1.8;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  margin-top: 2em;
  margin-bottom: .75em;
}

.entry-content ul, .entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-cream);
  font-style: italic;
}

/* ============================================================
   PAGE 404
   ============================================================ */

.error-404 {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 1rem;
}

.error-404 .error-code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 10rem);
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

/* ============================================================
   RESPONSIVE — HEADER & FOOTER
   ============================================================ */

@media (max-width: 1024px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle  { display: flex; }
  .mobile-nav   { display: block; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
