/* ==========================================================================
   Base Styles - GEWEL
   ========================================================================== */

/* Import tokens */
@import url('./tokens.css');

/* Google Fonts - Optimized with font-display: swap */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600;700&display=swap');

/* Preload critical fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/manrope/v15/xn7gYHE41ni1AdIRggexSuXd.woff2') format('woff2');
}

/* ==========================================================================
   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;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-900);
    background: #fff;
    overflow-x: hidden;
}

/* Account for fixed top-band only */
main:not(.home-main) {
    padding-top: var(--top-band-height);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: 1.2;
    color: var(--ink-900);
}

h1 {
    font-size: clamp(36px, 4.5vw, 48px);
    margin-bottom: var(--g-sm);
}

h2 {
    font-size: clamp(28px, 3.5vw, 36px);
    margin-bottom: var(--g-sm);
}

h3 {
    font-size: clamp(22px, 2.8vw, 26px);
    margin-bottom: var(--g-xs);
}

p {
    margin-bottom: var(--g-xs);
}

.lead {
    font-size: 20px;
    line-height: 1.7;
    color: var(--ink-700);
}

.overline {
    display: inline-block;
    font-size: 12px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold-text-dark); /* Couleur accessible */
    margin-bottom: var(--g-xs);
}

/* Variante pour fonds sombres */
.overline-light {
    color: var(--gold-text-light);
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
    color: var(--gold-600);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

/* Focus States - Optimisés pour l'accessibilité */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--gold-800); /* Couleur plus foncée pour meilleur contraste */
    outline-offset: 2px;
    border-radius: var(--r-xs);
    box-shadow: 0 0 0 4px rgba(139, 105, 64, 0.15); /* Halo subtil */
}

/* Focus states spécifiques pour les boutons */
.btn:focus-visible {
    outline: 2px solid var(--gold-800);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(139, 105, 64, 0.25);
}


/* ==========================================================================
   Lists
   ========================================================================== */

ul, ol {
    margin-bottom: var(--g-sm);
    padding-left: var(--g-sm);
}

li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Images & Media
   ========================================================================== */

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

figure {
    margin: 0;
}

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

/* ==========================================================================
   Sections
   ========================================================================== */

section {
    padding: var(--g-xl) 0;
}

.section-hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

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

.skip-link {
    position: fixed;
    top: var(--top-band-height);
    left: 24px;
    padding: 12px 24px;
    background: var(--gold-500);
    color: #111;
    text-decoration: none;
    font-weight: var(--font-medium);
    border-radius: var(--r-md);
    transform: translateY(-100px);
    transition: transform var(--transition-base);
    z-index: var(--z-tooltip);
}

.skip-link:focus {
    transform: translateY(16px);
}

/* ==========================================================================
   Animations
   ========================================================================== */

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].in {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.mt-sm { margin-top: var(--g-sm); }
.mt-md { margin-top: var(--g-md); }
.mt-lg { margin-top: var(--g-lg); }

.mb-sm { margin-bottom: var(--g-sm); }
.mb-md { margin-bottom: var(--g-md); }
.mb-lg { margin-bottom: var(--g-lg); }

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .top-band,
    .skip-link {
        display: none;
    }
    
    main {
        padding-top: 0;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
}