/* ===================================================================
   Forges Escalade — feuille de style
   Charte graphique reprise du site actuel (bleu vif, fond marine, pilules)
   =================================================================== */

:root {
  --navy-900:  #16213E;   /* fond hero, logo, footer */
  --slate-700: #3A4356;   /* titres de section */
  --gray-600:  #6B7280;   /* texte courant */
  --gray-100:  #F3F4F6;   /* fond des sections alternées */
  --blue-600:  #1857D6;   /* accent principal */
  --blue-700:  #123F9E;   /* accent, hover */
  --blue-100:  #E7EEFC;   /* fond clair teinté bleu */
  --white:     #FFFFFF;
  --card-bg:     #F6F8FD; /* blanc légèrement teinté bleu, pour les cartes */
  --card-border: #E2E8F5; /* bordure assortie, un peu plus marquée que le fond */

  /* Identité de couleur dérivée du logo (accueil) : noir, bleu vif, blanc */
  --brand-blue:       #5D96FF;
  --brand-blue-dark:  #2F5FD9;
  --brand-blue-light: #EAF1FF;
  --brand-ink:         #0B0E14;

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--gray-600);
  background-color: var(--white);
  line-height: 1.6;
}

/* Accueil : texte non sélectionnable, sauf le pied de page (pour copier l'email) */
.page-accueil {
  user-select: none;
  cursor: default;
}

.page-accueil .site-footer {
  user-select: text;
  cursor: auto;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--slate-700);
  line-height: 1.15;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

a { color: var(--blue-600); }
a:hover { color: var(--blue-700); }

/* ---------- Bandeau d'en-tête ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  position: fixed;
  background-color: var(--white);
  box-shadow: 0 2px 12px rgba(22, 33, 62, 0.12);
}

.site-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.25s ease;
}

.site-header.is-scrolled .navbar-brand {
  color: var(--navy-900);
}

.navbar-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.site-header .nav-link {
  color: var(--blue-100);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1rem !important;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: #fff;
  border-bottom-color: var(--blue-600);
}

.site-header.is-scrolled .nav-link {
  color: var(--slate-700);
}

.site-header.is-scrolled .nav-link:hover,
.site-header.is-scrolled .nav-link.active {
  color: var(--navy-900);
  border-bottom-color: var(--blue-600);
}

.site-header.is-scrolled .navbar-toggler {
  border-color: rgba(58, 67, 86, 0.25);
}

.site-header.is-scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(58,67,86,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Menu mobile déplié : fond plein pour rester lisible, même header transparent */
@media (max-width: 991.98px) {
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    background-color: var(--navy-900);
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
  }

  .navbar-collapse.show .nav-link,
  .navbar-collapse.collapsing .nav-link {
    color: var(--blue-100) !important;
  }

  .navbar-collapse.show .nav-link:hover,
  .navbar-collapse.show .nav-link.active,
  .navbar-collapse.collapsing .nav-link:hover,
  .navbar-collapse.collapsing .nav-link.active {
    color: #fff !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  padding: 5rem 0 6rem;
}

.hero-accueil {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero-accueil::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: url('../img/accueil/fond_accueil.jpg') center 80%/cover no-repeat;
  transform: scale(1.12) translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.2s ease-out;
  z-index: 0;
}

.hero-accueil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 33, 78, 0.75) 0%, rgba(24, 87, 214, 0.45) 55%, rgba(24, 87, 214, 0.2) 100%);
  z-index: 1;
}

.hero-accueil .container {
  position: relative;
  z-index: 2;
}

.hero-info {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 4rem;
}

.hero-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/information/bannière.jpg') center/cover no-repeat;
  z-index: 0;
}

.hero-info::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 33, 78, 0.75) 0%, rgba(24, 87, 214, 0.45) 55%, rgba(24, 87, 214, 0.2) 100%);
  z-index: 1;
}

.hero-info .container {
  position: relative;
  z-index: 2;
}

.hero .eyebrow-word {
  color: var(--blue-100);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.hero h1 {
  color: var(--white);
}

.hero h1 span {
  display: block;
}

.hero p.lead {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--blue-100);
  font-weight: 600;
}

.hero .btn-forge {
  display: inline-block;
}

/* ---------- Identité de couleur de l'accueil (déclinaisons du bleu du logo) ---------- */
.page-accueil .section-title-rule::after {
  background: linear-gradient(90deg, var(--brand-blue), transparent);
  opacity: 0.7;
}

.page-accueil .hold-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-accueil .hold-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -16px rgba(93, 150, 255, 0.5);
}

.page-accueil .btn-forge:hover {
  box-shadow: 0 10px 26px -6px rgba(93, 150, 255, 0.55);
}

.equip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-blue);
  color: #fff;
  margin-bottom: 1.1rem;
}

.equip-icon svg {
  width: 26px;
  height: 26px;
}

.actu-tag {
  display: inline-block;
  background: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Boutons ---------- */
.btn-forge {
  background-color: var(--blue-600);
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: background-color 0.15s ease;
}

.btn-forge:hover {
  background-color: var(--blue-700);
  color: #fff;
}

.btn-forge-outline {
  background-color: transparent;
  border: 2px solid var(--blue-600);
  color: var(--blue-600);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-forge-outline:hover {
  background-color: var(--blue-600);
  color: #fff;
}

/* ---------- Cartes ---------- */
.hold-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.75rem;
  height: 100%;
  box-shadow: 0 10px 20px -12px rgba(22, 33, 62, 0.25);
}

.hold-card h3 {
  margin-bottom: 0.75rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: var(--gray-100);
}

.section-title-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-title-rule::after {
  content: "";
  flex: 1;
  height: 3px;
  background: var(--slate-700);
  opacity: 0.15;
}

/* ---------- Tableaux (tarifs) ---------- */
.table-forge thead {
  background-color: var(--navy-900);
  color: #fff;
}

.table-forge td, .table-forge th {
  vertical-align: middle;
}

/* ---------- Galerie ---------- */
.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--gray-100);
}

/* Mot-clé mis en avant : gras + bleu d'accent (comme les horaires) */
.txt-accent {
  color: var(--blue-600);
  font-weight: 600;
}

/* ---------- Liste des horaires ---------- */
.horaires-list {
  margin-top: 1rem;
}

.horaires-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--card-border);
}

.horaires-list li:first-child {
  padding-top: 0;
}

.horaires-list li:last-child {
  border-bottom: none;
}

.horaires-list li strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--blue-600);
}

/* ---------- PDF affiché dans la page (RIB) ---------- */
.pdf-embed {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--gray-100);
  margin-top: 1.25rem;
  /* proportions exactes de la page (US Letter 612 × 792 pt) : le RIB tient en entier, sans scroll */
  max-width: 640px;
  aspect-ratio: 612 / 792;
}

.pdf-embed object {
  display: block;
  width: 100%;
  height: 100%;
}

.pdf-embed p {
  padding: 1.25rem;
}

/* ---------- Carte de localisation ---------- */
.map-embed {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  margin-top: 1.25rem;
}

.map-embed iframe {
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ---------- Fiches sécurité (images) ---------- */
.fiche-secu {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px -12px rgba(22, 33, 62, 0.25);
}

.fiche-secu img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.fiche-secu a:hover img {
  transform: scale(1.02);
}

.fiche-secu figcaption {
  padding: 0.85rem 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--slate-700);
  border-top: 1px solid var(--card-border);
}

/* ---------- Documents à télécharger ---------- */
.doc-list .doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

/* ---------- Pied de page ---------- */
.site-footer {
  background-color: var(--slate-700);
  color: var(--blue-100);
  padding: 3rem 0 2rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--blue-100);
  opacity: 0.7;
}

/* ---------- Accessibilité : focus clavier visible ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
