/* Les Habits Valleyfield - Styles principaux */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Fjalla+One&family=Montserrat:wght@400;700&display=swap');

:root {
  --color-bg-dark: #161616;
  --color-bg-black: #000000;
  --color-text-light: #f7f7f7;
  --color-text-muted: #7f8080;
  --color-text-gray: #919191;
  --color-text-dark: #2a2a2a;
  --color-primary: #2a2a2a;
  --color-primary-hover: #404040;
  --color-white: #ffffff;
  --font-heading: 'Archivo Black', 'Fjalla One', sans-serif;
  --font-body: 'Montserrat', arial, sans-serif;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Phone browser: safe areas for notched devices */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-tap-highlight-color: rgba(255, 200, 80, 0.2);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-text-muted);
}

/* Liens téléphone et courriel */
a[href^="tel:"] {
  color: #22c55e;
}

a[href^="tel:"]:hover {
  color: #4ade80;
}

a[href^="mailto:"] {
  color: gold;
}

a[href^="mailto:"]:hover {
  color: #ffd700;
  opacity: 0.9;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background-color: var(--color-bg-dark);
  padding: 56px 0;
  position: relative;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.header-logo {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.header-logo img {
  max-height: 80px;
  width: auto;
  margin: 0 auto;
}

.header-logo-link {
  display: inline-block;
}

.header-logo-link:hover {
  color: inherit;
  opacity: 0.9;
}

/* Navigation */
.nav-desktop {
  display: none;
}

.nav-desktop ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-desktop a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-light);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-text-muted);
  border-bottom-color: currentColor;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 8px;
}

.menu-toggle:hover {
  color: var(--color-text-muted);
}

.menu-toggle svg {
  width: 40px;
  height: 40px;
}

/* Mobile navigation */
.nav-mobile {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-dark);
  z-index: 10002;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

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

.nav-mobile-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  font-size: 28px;
  padding: 8px;
}

.nav-mobile ul {
  list-style: none;
  margin-top: 48px;
}

.nav-mobile li {
  border-bottom: 1px solid rgba(76, 76, 76, 0.5);
}

.nav-mobile li:last-child {
  border-bottom: none;
}

.nav-mobile a {
  display: block;
  padding: 16px 24px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-light);
}

.nav-mobile a:hover {
  color: var(--color-text-muted);
}

/* Hero section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.54) 0%, rgba(0, 0, 0, 0.54) 100%),
    url('../images/hero-banner.jpg') center/cover no-repeat;
  padding: 64px 48px;
}

.hero-content {
  max-width: 60%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(35px, 5vw, 56px);
  font-weight: 400;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.2;
  text-align: center;
}

.hero-subtitle {
  font-size: clamp(25px, 3vw, 42px);
  color: var(--color-text-light);
  margin-bottom: 24px;
  text-align: center;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  min-height: 56px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-facebook {
  background-color: #083d7a;
  color: #ffffff;
}

.btn-facebook:hover {
  background-color: #062d5a;
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-text-dark);
}

.btn-light:hover {
  background-color: #f0f0f0;
}

/* Section Contact */
.section-contact {
  background-color: var(--color-bg-dark);
  padding: 48px 24px;
  text-align: center;
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
}

.contact-info .container {
  text-align: center;
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.contact-info h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.contact-info a {
  color: var(--color-text-muted);
}

.contact-info a:hover {
  color: var(--color-text-light);
}

.contact-info a[href^="tel:"] {
  color: #22c55e;
}

.contact-info a[href^="tel:"]:hover {
  color: #4ade80;
}

.contact-info a[href^="mailto:"] {
  color: gold;
}

.contact-info a[href^="mailto:"]:hover {
  color: #ffd700;
}

/* Adresse → Google Maps : texte bleu lisible (accueil + contact) */
#site-address.btn {
  display: inline;
  white-space: normal;
  max-width: 100%;
  line-height: 1.5;
  min-height: unset;
  padding: 0;
  margin: 0;
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 700;
  background: none;
  background-color: transparent;
  color: #60a5fa;
  border: none;
  box-shadow: none;
}

#site-address.btn:hover {
  background: none;
  background-color: transparent;
  color: #93c5fd;
  border: none;
  text-decoration: underline;
}

.hours-table {
  margin-top: 16px;
}

.hours-table p {
  margin-bottom: 8px;
}

.hours-status {
  margin-bottom: 16px;
  font-size: 1.05em;
}

.hours-status.hours-open {
  color: #22c55e;
}

.hours-status.hours-closing-soon {
  color: #f97316;
}

.hours-status.hours-closed {
  color: #ef4444;
}

.hours-closed-info {
  margin-top: -8px;
  margin-bottom: 16px;
  color: #3b82f6;
  font-weight: 600;
}

.hours-day-note {
  color: #60a5fa;
  font-weight: 600;
}

.hours-day-ferme-rouge {
  color: #ef4444;
  font-weight: 700;
}

/* Hero banner slider (homepage) */
.hero-banner-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #1a1a1a;
}
.hero-slider-track {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
}
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.hero-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 64px 48px;
  text-align: center;
}
.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}
.hero-slide-title {
  font-family: var(--font-heading);
  font-size: clamp(35px, 5vw, 56px);
  font-weight: 400;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  text-align: center;
}
.hero-slide-subtitle {
  font-size: clamp(18px, 2.5vw, 28px);
  color: var(--color-text-light);
  margin-bottom: 24px;
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  text-align: center;
}
.hero-slide-buttons {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.hero-slide-btn {
  display: inline-flex;
  padding: 12px 32px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-radius: 4px;
  transition: var(--transition);
}
.hero-slide-btn:hover {
  background-color: var(--color-primary-hover);
}
.hero-slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 12px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot:hover,
.hero-dot.active {
  background: rgba(255,255,255,0.95);
}

/* Section Social */
.section-social {
  background-color: var(--color-bg-black);
  padding: 56px 24px;
  text-align: center;
}

.section-social h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--color-text-gray);
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-links a {
  color: var(--color-text-muted);
}

.social-links a:hover {
  color: var(--color-text-light);
}

/* Logo Facebook avec le même bleu que le bouton Suivez-nous */
.social-links a[href*="facebook"] {
  color: #083d7a;
}

.social-links a[href*="facebook"]:hover {
  color: #0a4a92;
}

.social-links svg {
  width: 40px;
  height: 40px;
}

/* Page content */
.page-content {
  padding: 48px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  color: var(--color-text-light);
  margin-bottom: 24px;
  text-align: center;
}

.page-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--color-text-light);
  margin: 32px 0 16px;
  text-align: center;
}

.page-content p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.page-content ul {
  margin: 16px 0 16px 24px;
  color: var(--color-text-muted);
}

/* Form Postuler */
.apply-form {
  max-width: 600px;
  margin: 32px auto 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.form-group input,
.form-group input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--color-bg-dark);
  border: 1px solid var(--color-text-muted);
  color: var(--color-text-light);
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-text-light);
}

.form-note {
  font-size: 12px;
  color: var(--color-text-gray);
  margin-top: 8px;
}

/* Footer */
.footer {
  background-color: var(--color-bg-dark);
  padding: 56px 24px;
  text-align: center;
  position: relative;
}

.footer-logo {
  position: absolute;
  bottom: 16px;
  right: 24px;
  display: block;
  line-height: 0;
}

.footer-logo img {
  height: 32px;
  width: auto;
  opacity: 0.9;
}

.footer-logo:hover img {
  opacity: 1;
}

.footer p {
  color: var(--color-text-gray);
  font-size: 14px;
}

.footer-hosting {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.footer-hosting .hosting-name {
  color: gold;
}

.footer hr {
  border: none;
  border-top: 1px solid var(--color-primary);
  width: 50px;
  margin: 24px auto;
}

/* Liquidation */
.liquidation-empty {
  color: var(--color-text-muted);
  font-size: 1.1em;
  text-align: center;
  margin: 24px 0;
}
.liquidation-text {
  color: var(--color-text-muted);
  white-space: pre-wrap;
}
.liquidation-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  margin-top: 24px;
}
.liquidation-annonce {
  flex: 1;
  min-width: 250px;
}
.liquidation-annonce h2 {
  text-align: left;
  margin-top: 0;
}
.liquidation-image {
  flex: 0 0 auto;
  max-width: 100%;
}
.liquidation-image img {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
}
.liquidation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.liquidation-card {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.liquidation-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.liquidation-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.liquidation-card-body { padding: 20px; }
.liquidation-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin: 0 0 12px 0;
}
.liquidation-card-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
@media (min-width: 768px) {
  .liquidation-layout {
    flex-direction: row;
  }
  .liquidation-annonce { order: 1; }
  .liquidation-image { order: 2; }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  padding: 24px 24px;
  z-index: 10000;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 1s ease-in;
}

.cookie-banner.hidden {
  transform: translateY(100%);
}

.cookie-banner h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.cookie-banner p {
  color: var(--color-text-gray);
  font-size: 14px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.cookie-banner .btn {
  background-color: var(--color-white);
  color: var(--color-text-dark);
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-mobile {
    display: none;
  }

  .header-nav {
    flex-direction: row;
    justify-content: space-between;
  }

  .hero {
    min-height: 700px;
    padding: 64px 48px;
  }
}

@media (max-width: 767px) {
  .header {
    padding: 40px 0;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 35px;
  }

  .hero-buttons {
    flex-direction: row;
  }
}

/* Phone browser (small screens) */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header { padding: 24px 0; }
  .hero { min-height: 60vh; padding: 32px 16px; }
  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 18px; }
  .hero-buttons { flex-direction: column; gap: 12px; }
  .hero-buttons .btn { width: 100%; min-height: 48px; }
  .section-contact { padding: 32px 16px; }
  .btn { min-height: 48px; padding: 14px 24px; }
  /* Hero banner slider on phone */
  .hero-banner-slider { min-height: 50vh; }
  .hero-slider-track { height: 50vh; min-height: 300px; }
  .hero-slide-content { min-height: 50vh; padding: 32px 16px; }
  .hero-slide-title { font-size: 24px; }
  .hero-slide-subtitle { font-size: 16px; }
  .hero-slider-dots { bottom: 16px; }
  /* Prevent iOS zoom on input focus */
  input, select, textarea { font-size: 16px !important; }
  .cookie-banner { padding: 20px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Tel links: tap-to-call styling on touch devices */
@media (hover: none) {
  a[href^="tel:"] {
    display: inline-block;
    padding: 4px 0;
    min-height: 44px;
    line-height: 36px;
  }
}

/* --- Popup d'accueil --- */
.site-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: site-popup-fade 0.3s ease;
}
.site-popup {
  background: var(--color-bg-dark);
  border: 1px solid rgba(127, 128, 128, 0.3);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: site-popup-scale 0.3s ease;
}
.site-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(127, 128, 128, 0.2);
  color: var(--color-text-light);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.site-popup-close:hover {
  background: rgba(127, 128, 128, 0.35);
}
.site-popup-image {
  margin: -28px -28px 16px -28px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  max-height: 50vh;
}
.site-popup-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 50vh;
}
.site-popup h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 12px;
  padding-right: 36px;
}
.site-popup p {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
}
.site-popup .site-popup-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-primary);
  color: var(--color-text-light);
  border-radius: 8px;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
}
.site-popup .site-popup-btn:hover {
  background: var(--color-primary-hover);
}
@keyframes site-popup-fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes site-popup-scale {
  from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); }
}
