/* ============================================================
   Swiss MCS SA — Feuille de style principale
   Police : Arial
   ============================================================ */

/* VARIABLES */
:root {
  --red:      #c52f30;
  --red-dark: #a02526;
  --dark:     #4d5153;
  --navy:     #1a3a5c;
  --navy-mid: #1e4a6b;
  --black:    #111214;
  --white:    #ffffff;
  --gray-50:  #f7f8f9;
  --gray-100: #eef0f2;
  --gray-200: #d8dce0;
  --gray-400: #9aa0a8;
  --gray-600: #6b7280;

  --font-display: Arial, Helvetica, sans-serif;
  --font-body:    Arial, Helvetica, sans-serif;

  --max-w: 1200px;
  --header-h: 72px;
  --radius: 4px;
  --transition: 0.25s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}
#site-header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 var(--gray-200);
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.logo-link { flex-shrink: 0; display: flex; align-items: center; }
.logo-img {
  height: 38px;
  width: auto;
  /* Logo SVG has dark text — invert on transparent header */
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}
#site-header.scrolled .logo-img { filter: none; }

#main-nav { flex: 1; }
#main-nav ul { display: flex; gap: 8px; }
#main-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
#main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.12); }
#site-header.scrolled #main-nav a { color: var(--dark); }
#site-header.scrolled #main-nav a:hover { color: var(--red); background: var(--gray-50); }

.header-right { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* Language switcher */
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-btn {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.75);
  transition: color var(--transition), background var(--transition);
}
.lang-btn:hover, .lang-btn.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
}
#site-header.scrolled .lang-btn { color: var(--gray-600); }
#site-header.scrolled .lang-btn:hover,
#site-header.scrolled .lang-btn.active { color: var(--red); background: var(--gray-50); }
.lang-sep { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
#site-header.scrolled .lang-sep { color: var(--gray-200); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#site-header.scrolled .hamburger span { background: var(--dark); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url('../images/lac_thun.webp') center center / cover no-repeat;
  /* Note: en Grav, l'URL est résolue relativement au CSS dans user/themes/swiss-mcs/css/
     Le chemin ../images/ pointe vers user/themes/swiss-mcs/images/ — correct. */
}

.hero-landscape {
  display: none;
}
.hero-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Hero cinematic overlay system ----
   Three layers create a filmic, depth-rich treatment over the Lake Thun photo.
   The goal: text always readable, photo still gorgeous.
*/

/* Layer 1 — Full-frame base wash (linear, vertical) */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(2,8,20,0.68)   0%,
    rgba(2,8,20,0.45)  18%,
    rgba(2,8,20,0.50)  42%,
    rgba(2,8,20,0.48)  65%,
    rgba(2,8,20,0.62) 100%
  );
}

/* Layer 2 — Radial vignette concentrating darkness on the text zone */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 70% at 50% 50%,
    rgba(2,8,20,0.35) 0%,
    rgba(2,8,20,0.10) 50%,
    rgba(2,8,20,0.30) 100%
  );
}

/* Layer 3 — Header protection band (top 180px, the critical zone)
   This alone guarantees white logo/nav are legible on the bright sky. */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.65)  0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  max-width: 980px;
  animation: heroIn 1.2s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6), 0 0px 2px rgba(0,0,0,0.4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 28px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.45);
}
.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
}
.hero-sub-heading {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 700;
  color: var(--white);
  text-align: left;
  max-width: 820px;
  margin: 0 auto 10px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
}
.hero-sub-list {
  list-style: disc;
  padding: 0 0 0 32px;
  margin: 0 auto 36px;
  max-width: 820px;
  font-size: clamp(0.85rem, 1.05vw, 0.98rem);
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  text-align: left;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
}
.hero-sub-list li {
  padding: 4px 0;
  line-height: 1.45;
}
.hero-sub-list li::marker {
  color: var(--white);
}
.hero-sub-item-title {
  display: block;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}
.hero-sub-item-text {
  display: block;
  color: rgba(255,255,255,0.88);
  font-weight: 300;
}
.hero-sub-item-text strong {
  font-weight: 600;
  color: var(--white);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--red);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
  border: 2px solid var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.5);
  animation: bounce 2s ease infinite;
}
.hero-scroll svg { width: 28px; height: 28px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SECTIONS — COMMON
   ============================================================ */
.section { padding: 100px 0; }
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-intro {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================================
   SERVICES
   ============================================================ */
.section-services { background: var(--gray-50); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.service-card {
  background: var(--white);
  padding: 48px 40px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.08); transform: translateY(-2px); z-index: 1; }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 48px; height: 48px;
  margin-bottom: 28px;
  color: var(--red);
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 12px;
  line-height: 1.25;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================================
   ABOUT
   ============================================================ */
.section-about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.about-block h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}
.about-block p {
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.75;
  margin-bottom: 16px;
}
.philosophy-list { margin-top: 0; }
.philosophy-list li {
  font-size: 0.9rem;
  color: var(--dark);
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
  line-height: 1.5;
}
.philosophy-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}
.about-quote {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--gray-50);
  border-left: 3px solid var(--red);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.5;
}

/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { background: var(--gray-50); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.contact-block h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}
.contact-block address {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--dark);
}
.contact-block a { color: var(--red); transition: opacity var(--transition); }
.contact-block a:hover { opacity: 0.75; }
.map-container {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

/* Form — structure commune (statique legacy + Grav Forms plugin) */
.contact-form-wrapper { display: contents; }
.contact-form,
.contact-form-wrapper .form-wrapper { display: flex; flex-direction: column; gap: 20px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
/* .form-row : utilisé par le markup legacy ET dans le template de form Grav */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* .form-group (legacy) et .form-field (Grav Forms plugin) : même traitement */
.form-group,
.form-field { display: flex; flex-direction: column; gap: 6px; }
/* Supprimer les classes de taille par défaut du plugin qui écrasent la mise en page */
.form-field .form-data { display: contents; }
.form-field .form-input-wrapper { display: contents; }
label,
.form-label label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark);
}
/* Masquer le span required * du plugin — la validation HTML5 suffit */
.form-label .required { display: none; }
input, textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  outline: none;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
input:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}
input:invalid:not(:placeholder-shown), textarea:invalid:not(:placeholder-shown) {
  border-color: var(--red);
}
/* Messages d'erreur inline du plugin Forms */
.form-errors,
.form-field-inline-error { font-size: 0.8rem; color: var(--red); margin-top: 2px; }
/* Masquer les messages flash gérés côté PHP (on affiche via .form-status) */
.form-wrapper > .form-messages { display: none; }
/* Bouton submit */
.btn-submit,
.contact-form .buttons .btn-submit { align-self: flex-start; }
.btn-arrow { width: 16px; height: 16px; flex-shrink: 0; }
/* Messages de succès/erreur */
.form-status {
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: none;
}
.form-status.success,
.grav-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; display: block; border-radius: var(--radius); padding: 12px 16px; font-size: 0.9rem; }
.form-status.error,
.grav-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; display: block; border-radius: var(--radius); padding: 12px 16px; font-size: 0.9rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-logo { height: 32px; width: auto; filter: brightness(0) invert(0.7); }
.footer-brand p { font-size: 0.8rem; letter-spacing: 0.06em; }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 680px)
   ============================================================ */
@media (max-width: 680px) {
  :root { --header-h: 64px; }
  .section { padding: 72px 0; }
  .container { padding: 0 20px; }

  /* Header — fond semi-transparent sombre sur mobile pour garantir
     la visibilité du logo et du hamburger sur le ciel clair */
  #site-header {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  #site-header.scrolled {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .hamburger { display: flex; }
  #main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--white);
    padding: 20px 24px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 99;
    visibility: hidden;
  }
  #main-nav.open { transform: translateY(0); visibility: visible; }
  #main-nav ul { flex-direction: column; gap: 4px; }
  #main-nav a { color: var(--dark); padding: 12px 16px; font-size: 1rem; }
  #main-nav a:hover { color: var(--red); background: var(--gray-50); }

  .services-grid { grid-template-columns: 1fr; gap: 1px; }
  .service-card { padding: 36px 28px; }

  .form-row { grid-template-columns: 1fr; }
  .section-header { margin-bottom: 40px; }

  .footer-nav { gap: 16px; }
  .footer-inner { gap: 20px; }
}

/* ============================================================
   SERVICE CARD — lien "En savoir plus"
   ============================================================ */
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  transition: opacity var(--transition);
}
.service-link:hover { opacity: 0.75; }
.ext-icon { width: 12px; height: 12px; flex-shrink: 0; }

/* Toute la tuile est cliquable (stretched link).
   .service-card est deja position: relative (cf. plus haut) ;
   le ::after du <a> couvre la card et capture les clics. */
.service-card { cursor: pointer; }
.service-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ============================================================
   PAGE PRESTATION — intérieure
   ============================================================ */
.prestation-hero {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 48px;
  background: var(--navy);
  color: var(--white);
}
.prestation-hero .container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.prestation-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  margin-top: 16px;
  margin-bottom: 16px;
}
.prestation-lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 640px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: rgba(255,255,255,0.75); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { color: rgba(255,255,255,0.35); }

/* Prose */
.prose {
  max-width: 720px;
}
.prose p { margin-bottom: 1rem; line-height: 1.8; }
.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.prose ul li {
  margin-bottom: 0.5rem;
  color: var(--dark);
  line-height: 1.7;
  list-style: disc;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--navy);
  margin: 2rem 0 1rem;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  margin: 1.5rem 0 0.75rem;
}

/* Bouton retour */
.prestation-back { margin-top: 48px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline svg { width: 16px; height: 16px; }

/* is-inner : header toujours scrolled (pas de hero) */
body.is-inner #site-header {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 var(--gray-200);
  backdrop-filter: blur(10px);
}
body.is-inner .logo-img { filter: none; }
body.is-inner #main-nav a { color: var(--dark); }
body.is-inner #main-nav a:hover { color: var(--red); background: var(--gray-50); }
body.is-inner .lang-btn { color: var(--gray-600); }
body.is-inner .lang-btn:hover,
body.is-inner .lang-btn.active { color: var(--red); background: var(--gray-50); }
body.is-inner .lang-sep { color: var(--gray-200); }
body.is-inner .hamburger span { background: var(--dark); }

@media (max-width: 680px) {
  .prestation-hero { padding-top: calc(var(--header-h) + 32px); padding-bottom: 32px; }
  .prestation-hero .container { padding: 0 20px; }
}
