/* ============================================
   KRONOTEK — extra.css
   Styles complémentaires pour les pages internes
   ============================================ */

/* ---- FOUNDER BLOCK (historique) ---- */
.founder-intro {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0 0;
}
.founder-text .section-title { margin-bottom: 1.5rem; }
.founder-text p {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.founder-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2.5rem;
}
.fc-year {
  font-family: var(--font-title);
  font-size: 3.5rem;
  color: var(--white);
  line-height: 1;
}
.fc-year.red { color: var(--red); text-shadow: 0 0 20px var(--red-glow); }
.fc-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--grey-dark);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}
.fc-line {
  width: 2px; height: 30px;
  background: linear-gradient(to bottom, var(--red), transparent);
  margin-bottom: 1rem;
}

/* ---- RALLYES SECTION ---- */
.rallyes-section { padding: 6rem 0; border-top: 1px solid var(--border); }
.rallyes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.rallye-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem 1rem;
  border-radius: 4px;
  text-align: center;
  transition: all 0.2s;
}
.rallye-item:hover { border-color: var(--red); background: var(--red-faint); }
.rallye-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.rallye-logo {
  display: block;
  height: 60px;
  width: 100%;
  object-fit: contain;
  object-position: center;
  margin-bottom: 0.75rem;
  transition: filter 0.2s, opacity 0.2s;
  opacity: 0.85;
}
.rallye-item:hover .rallye-logo { opacity: 1; }
.rallye-logo.logo-invert { filter: invert(1); }
.rallye-item:hover .rallye-logo.logo-invert { filter: invert(1) brightness(1.15); }
.rallye-logo.logo-badge {
  background: #fff;
  border-radius: 3px;
  padding: 4px 8px;
  object-fit: contain;
}
.rallye-item h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 0.25rem;
}
.rallye-item p { font-size: 0.75rem; color: var(--grey); line-height: 1.4; }

/* ---- PRESTATIONS: DESC ---- */
.prest-desc {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}
.prest-desc p {
  font-size: 1rem;
  color: var(--grey);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

/* ---- RALLYE TYPES GRID ---- */
.rallye-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}
.rallye-type-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2.5rem;
  transition: border-color 0.3s;
}
.rallye-type-card:hover { border-color: var(--red); }
.rtc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.rtc-icon { width: 50px; height: 50px; flex-shrink: 0; }
.rtc-icon svg { width: 100%; height: 100%; }
.rtc-header h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  letter-spacing: 2px;
}
.rallye-type-card > p {
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ---- TERRAIN BLOCK ---- */
.terrain-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3rem;
  margin-top: 2rem;
}
.terrain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.terrain-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg3);
}
.t-num {
  font-family: var(--font-title);
  font-size: 3rem;
  color: rgba(232,28,28,0.3);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.terrain-item h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.terrain-item p { font-size: 0.8rem; color: var(--grey); line-height: 1.6; }

/* ---- CONTACT MAP ---- */
.contact-map { margin-top: 2rem; }
.map-placeholder {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,28,28,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,28,28,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}
.map-placeholder span {
  display: block;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: var(--white);
  position: relative;
  z-index: 1;
}
.map-placeholder small {
  font-size: 0.75rem;
  color: var(--grey);
  position: relative;
  z-index: 1;
}

/* ---- CAPTCHA MATH ---- */
.captcha-math {
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  color: var(--grey);
}
.captcha-math input {
  background: var(--bg3);
  border: 1px solid var(--grey-dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  outline: none;
}
.captcha-math input:focus { border-color: var(--red); }

/* ---- RESPONSIVE EXTRAS ---- */
@media (max-width: 900px) {
  .founder-intro { grid-template-columns: 1fr; }
  .rallye-types  { grid-template-columns: 1fr; }
  .terrain-grid  { grid-template-columns: 1fr 1fr; }
  .rallyes-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .terrain-grid  { grid-template-columns: 1fr; }
  .rallyes-grid  { grid-template-columns: 1fr; }
}

/* ============================================
   PHOTOS & IMAGES RÉELLES
   ============================================ */

/* --- Nav Logo image --- */
.nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
  /* logo blanc sur fond sombre — parfait */
}

/* --- Footer Logo image --- */
.footer-logo-img {
  height: 40px;
  width: auto;
  display: block;
  margin-bottom: 0.75rem;
  filter: brightness(1);
}

/* --- Dev block photo visual --- */
.dev-photo-visual {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}
.dev-photo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85) saturate(0.9);
  transition: filter 0.3s, transform 0.4s;
}
.dev-photo-visual:hover img {
  filter: brightness(1) saturate(1);
  transform: scale(1.03);
}
.dev-photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(5,5,7,0.92), transparent);
  padding: 1.5rem 1.2rem 0.9rem;
  font-size: 0.8rem;
  color: var(--grey);
  line-height: 1.4;
}
.dev-photo-caption small {
  font-size: 0.7rem;
  color: var(--grey-dark);
}

/* --- Dev gallery visual --- */
.dev-gallery-visual {
  padding: 0 !important;
  align-items: stretch;
  justify-content: stretch;
}
.dev-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
}
.dev-gallery-item {
  overflow: hidden;
  position: relative;
}
.dev-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(0.85);
  transition: filter 0.3s, transform 0.4s;
  display: block;
}
.dev-gallery-item:hover img {
  filter: brightness(1) saturate(1);
  transform: scale(1.06);
}

/* --- Adventure photo grid (index) --- */
.adventure-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
}
.apg-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.apg-item.apg-main {
  grid-column: 1 / -1;
  max-height: 200px;
}
.apg-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.75) saturate(0.85);
  transition: filter 0.3s, transform 0.4s;
}
.apg-item:hover img {
  filter: brightness(0.9) saturate(1);
  transform: scale(1.04);
}
.apg-item:not(.apg-main) { height: 130px; }
.apg-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(5,5,7,0.9), transparent);
  padding: 0.8rem 0.75rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--grey);
  text-transform: uppercase;
}

/* --- Founder photos (historique) --- */
.founder-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.founder-photo-main {
  position: relative;
  border: 2px solid var(--red);
  border-radius: 4px;
  overflow: hidden;
  grid-row: span 2;
}
.founder-photo-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(20%) brightness(0.9);
}
.fp-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(5,5,7,0.95), transparent);
  padding: 1.5rem 1rem 0.75rem;
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--white);
  text-transform: uppercase;
}
.fp-label span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--red);
  margin-top: 0.2rem;
  text-transform: uppercase;
}
.founder-photo-side {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  height: 140px;
}
.founder-photo-side img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: grayscale(30%) brightness(0.8);
}
.fp-label-side {
  position: absolute;
  bottom: 0.5rem; left: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
}

/* --- Founder milestones --- */
.founder-milestones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.milestone { text-align: center; }
.milestone-arrow {
  font-size: 1.5rem;
  color: var(--red);
  opacity: 0.6;
}

/* --- Rally gallery (historique) --- */
.rally-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  border-radius: 4px;
  overflow: hidden;
}
.rg-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rg-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.rg-item.rg-large { height: 320px; }
.rg-col .rg-item { flex: 1; min-height: 150px; }
.rg-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75) saturate(0.85);
  transition: filter 0.4s, transform 0.4s;
}
.rg-item:hover img {
  filter: brightness(0.95) saturate(1);
  transform: scale(1.04);
}
.rg-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(5,5,7,0.9), transparent);
  padding: 1.5rem 1rem 0.75rem;
}
.rg-overlay span {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .adventure-photo-grid { grid-template-columns: 1fr; }
  .apg-item.apg-main { max-height: 160px; grid-column: 1; }
  .apg-item:not(.apg-main) { height: 120px; }
  .founder-photos { grid-template-columns: 1fr; }
  .founder-photo-side { display: none; }
  .rally-gallery { grid-template-columns: 1fr; }
  .rg-item.rg-large { height: 220px; }
  .rg-col { flex-direction: row; }
  .rg-col .rg-item { min-height: 120px; }
  .founder-milestones { gap: 1rem; flex-wrap: wrap; }
  .milestone-arrow { display: none; }
}

/* --- Rallye banner photo (prestations) --- */
.rallye-banner-photo {
  position: relative;
  height: 320px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 3rem;
  border: 1px solid var(--border);
}
.rallye-banner-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.5) saturate(0.8);
  transition: filter 0.4s;
}
.rallye-banner-photo:hover img { filter: brightness(0.65) saturate(1); }
.rbp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(5,5,7,0.85) 0%, transparent 60%);
}
.rbp-text h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  letter-spacing: 2px;
  color: var(--white);
  margin: 0.4rem 0 0.5rem;
}
.rbp-text p {
  font-size: 0.85rem;
  color: var(--grey);
}

/* --- adventure photo grid responsive desktop fix --- */
@media (min-width: 901px) {
  .adventure-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .rallye-banner-photo { height: 200px; }
  .rbp-overlay { padding: 1.5rem; }
}

/* --- Contact Marc photo --- */
.contact-marc-photo {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  --height: 200px;
  border: 2px solid var(--border);
  transition: border-color 0.3s;
}
.contact-marc-photo:hover { border-color: var(--red); }
.contact-marc-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(20%) brightness(0.85);
  transition: filter 0.3s;
}
.contact-marc-photo:hover img { filter: grayscale(0%) brightness(1); }
.cmp-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(5,5,7,0.95), transparent);
  padding: 1.5rem 1rem 0.75rem;
}
.cmp-badge strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--white);
}
.cmp-badge span {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--red);
  text-transform: uppercase;
}

/* ============================================
   SECTION "ILS NOUS FONT CONFIANCE"
   Carousel infini de logos
   ============================================ */

.trust-section {
  padding: 3.5rem 0 3rem;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Titre centré avec lignes latérales */
.trust-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 40px;
}
.trust-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}
.trust-header .trust-line:last-child {
  background: linear-gradient(to left, transparent, var(--border));
}
.trust-title {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  letter-spacing: 4px;
  color: var(--white);
  white-space: nowrap;
  text-align: center;
}
.trust-title em {
  font-style: normal;
  color: var(--red);
}

/* ---- Wrapper avec masques fondu ---- */
.logos-track-wrapper {
  position: relative;
  overflow: hidden;
}

/* Fondu gauche et droite */
.logos-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 160px;
  z-index: 2;
  pointer-events: none;
}
.logos-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--bg2) 0%, transparent 100%);
}
.logos-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--bg2) 0%, transparent 100%);
}

/* ---- Piste défilante ---- */
.logos-track {
  display: flex;
  width: max-content;
  animation: logoScroll 40s linear infinite;
  gap: 0;
}
.logos-track:hover {
  animation-play-state: paused;
}

.logos-row {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ---- Item logo individuel ---- */
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.5rem;
  border-right: 1px solid rgba(232,28,28,0.1);
  position: relative;
  cursor: default;
  transition: background 0.3s;
  height: 90px;
}
.logo-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.3s;
  border-radius: 2px;
}
.logo-item:hover {
  background: rgba(232,28,28,0.06);
}
.logo-item:hover::before {
  transform: scaleX(1);
}

.logo-item img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5) brightness(1.1);
  transition: filter 0.35s ease, transform 0.3s ease;
  display: block;
}
.logo-item:hover img {
  filter: grayscale(0) opacity(1) brightness(1) drop-shadow(0 0 6px rgba(232,28,28,0.25));
  transform: scale(1.1);
}

/* ---- Animation défilement ---- */
@keyframes logoScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 768px) {
  .logos-fade { width: 60px; }
  .logo-item  { padding: 0.5rem 1.5rem; height: 70px; }
  .logo-item img { height: 36px; }
  .trust-header { padding: 0 20px; gap: 1rem; }
  .logos-track { animation-duration: 28s; }
}
