/*
Theme Name: Aina Bauza Roig Sailing Team
Theme URI: https://calistoconsulting.com
Author: Calisto Consulting
Description: Thème custom dark premium pour skippeuse Route du Rhum 2026. Hero vidéo fullscreen, scroll storytelling, univers tech/performance.
Version: 3.1.0
License: GNU General Public License v2 or later
Text Domain: rhum-ocean
Tags: dark, full-width, custom-header, custom-logo, featured-images
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --c-black:    #080a0d;
  --c-dark:     #0d1117;
  --c-dark-2:   #111820;
  --c-panel:    #0a1020;
  --c-border:   rgba(255,255,255,0.07);
  --c-border-2: rgba(255,255,255,0.12);
  --c-blue:     #3a8fff;
  --c-blue-dim: rgba(58,143,255,0.15);
  --c-teal:     rgb(2, 104, 111);       /* couleur vague / titres */
  --c-teal-dim: rgba(2, 104, 111, 0.15);
  --c-white:    #f0f4f8;
  --c-muted:    rgba(160,180,210,0.45);
  --c-muted-2:  rgba(160,180,210,0.25);

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-serif:   'Playfair Display', Georgia, serif;

  /* Spacing */
  --max-w: 1280px;
  --section-pad: clamp(60px, 8vw, 120px);
}

html { scroll-behavior: smooth; }

body {
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; /* Firefox */
  overflow-x: hidden;
  /* Évite le flash blanc sur Safari iOS au scroll */
  background-attachment: fixed;
}

/* Compenser la nav fixe — uniquement sur les pages sans hero fullscreen */
.has-hero { padding-top: 0; }
.no-hero  { padding-top: 90px; }

img {
  max-width: 100%;
  display: block;
  /* Évite le rendu flou sur Safari Retina */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button {
  cursor: pointer;
  /* Reset Safari button styling */
  -webkit-appearance: none;
  appearance: none;
}

/* Firefox : outline visible sur les liens et boutons au focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Safari : les animations sur éléments avec filter créent des artefacts
   sans transform3d (force GPU compositing) */
[style*="animation"],
.reveal,
.stat-item,
.spec-card,
.tl-thumb,
.hero-overlay-bottom,
.hero-overlay-left {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

.section-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5c400;
  margin-bottom: 16px;
  line-height: 1.1;
}
.section-tag::before { content: ''; }

/* ============================================================
   CURSEUR CUSTOM
   ============================================================ */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--c-blue);
  border-radius: 50%;
  pointer-events: none;   /* JAMAIS intercepter les clics */
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  top: 0; left: 0;
  opacity: 0;
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(58,143,255,0.5);
  border-radius: 50%;
  pointer-events: none;   /* JAMAIS intercepter les clics */
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.3s ease, height 0.3s ease;
  top: 0; left: 0;
  opacity: 0;
}
.cursor.visible { opacity: 1; }
.cursor-ring.visible { opacity: 1; }

/* Fade-in au scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
