/**
 * HBC Grandvillars - Main Stylesheet
 * Architecture: Mobile-first, BEM naming
 */

@import '_fonts.css';

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    /* Palette Royal */
    --color-royal-50: #eff6ff;
    --color-royal-100: #dbeafe;
    --color-royal-200: #bfdbfe;
    --color-royal-300: #93c5fd;
    --color-royal-400: #60a5fa;
    --color-royal-500: #3b82f6;
    --color-royal-600: #2563eb;
    --color-royal-700: #1d4ed8;
    --color-royal-800: #1e40af;
    --color-royal-900: #1e3a8a;
    --color-royal-950: #0f172a;

    /* Accents chaleureux */
    --color-accent-warm: #f59e0b;
    --color-accent-warm-light: #fbbf24;
    --color-accent-coral: #f97316;
    --color-accent-coral-light: #fb923c;

    /* Neutres */
    --color-white: #ffffff;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Typographie — Clash Display partout */
    --font-heading: 'Clash Display', 'Red Hat Display', system-ui, sans-serif;
    --font-body: 'Clash Display', 'Red Hat Display', system-ui, sans-serif;

    /* Futura PT Medium — réservée aux textes longs (paragraphes) */
    --font-body-long: 'Futura PT', 'Red Hat Display', system-ui, sans-serif;

    /* Poids — bornés par l'axe de Clash Display (200→700).
       Toute valeur > 700 est plafonnée par le navigateur. */
    --fw-display: 700;   /* Clash Bold     — h1, h2 */
    --fw-heading: 600;   /* Clash Semibold — h3..h6, labels */
    --fw-medium: 500;    /* Clash Medium   — péritexte, méta */
    --fw-body: 500;      /* Clash Medium   — corps de texte */

    /* Compense l'approche négative des titres capitales (voir h2/h3). */
    --ws-display: 0.06em;

    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Rayons */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-royal: 0 4px 12px rgba(30, 58, 138, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Aucune des deux fontes ne monte au-dessus de 700 (Clash plafonne à 700,
       Inter n'est chargé que jusqu'à 700). Sans ça le navigateur fabrique un
       faux-gras baveux sur les ~56 déclarations en 800/900 encore présentes ;
       avec ça il retombe proprement sur le 700 réel. */
    font-synthesis-weight: none;
}

body {
    font-family: var(--font-body);
    font-weight: var(--fw-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
}

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

a {
    color: var(--color-royal-700);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-royal-800);
}

/* Clash Display a une chasse large et une approche généreuse par défaut :
   sans letter-spacing négatif, un titre paraît délavé et perd sa masse.
   Plus le corps est gros, plus on resserre. La casse haute, elle, a besoin
   de moins de correction — les capitales ont déjà leur propre rythme. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-gray-900);
}

h1 {
    font-weight: var(--fw-display);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

/* letter-spacing retire aussi de la chasse au caractère espace, et celui de
   Clash est déjà plus étroit que celui de Red Hat. Sur les titres capitales
   très resserrés de home.css (-0.04em), les mots se soudaient : « LES MATCHS
   DU CLUB » se lisait « LESMATCHSDUCLUB ». word-spacing rend l'espace au mot
   sans relâcher l'approche entre les lettres — les deux réglages sont
   indépendants, c'est ce qui permet de garder le bloc compact ET lisible. */
h2 {
    font-weight: var(--fw-display);
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.015em;
    word-spacing: var(--ws-display);
}

h3 {
    font-weight: var(--fw-heading);
    text-transform: uppercase;
    letter-spacing: -0.005em;
    word-spacing: var(--ws-display);
}

/* ========================================
   UTILITIES
   ======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--space-2xl);
        padding-right: var(--space-2xl);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

/* Background gradients */
.bg-gradient-royal {
    background: linear-gradient(135deg, var(--color-royal-900) 0%, var(--color-royal-800) 100%);
}

.bg-gradient-royal-light {
    background: linear-gradient(135deg, var(--color-royal-800) 0%, var(--color-royal-600) 100%);
}

/* Offset for pages without hero (compensates for fixed transparent navbar) */
.page-hero {
    padding-top: calc(4.5rem + var(--space-3xl));
}

/* Section spacing */
.section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
    .section {
        padding-top: var(--space-4xl);
        padding-bottom: var(--space-4xl);
    }
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-2xl);
}

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-royal-600);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: 1.875rem;
    font-weight: var(--fw-display);
    letter-spacing: -0.025em;
    color: var(--color-gray-900);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    margin-top: var(--space-md);
    color: var(--color-gray-500);
    font-size: 1.125rem;
}

/* Grids */
.grid-2 {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4 {
    display: grid;
    gap: var(--space-lg);
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   PAGE HERO (shared across inner pages)
   ======================================== */
.bg-gradient-royal {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
}
.page-hero.section {
    padding-top: 7rem;
    padding-bottom: 4rem;
}
.page-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    margin-bottom: 1rem;
}
.page-hero__title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: var(--fw-display);
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    line-height: 1.1;
}
.page-hero__subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.75;
    max-width: 650px;
    margin: 0 auto;
}
.page-hero__subtitle strong { color: #fbbf24; }

/* btn sizes */
.btn--sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}
