/* ==========================================================================
   QR Informatique - Base : reset, typographie, layout, utilitaires
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--cyan-600);
}

ul {
    list-style: none;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ink-2);
    margin-bottom: 0.6rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-soft);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--ink-2);
    font-weight: 600;
}

::selection {
    background: rgba(37, 99, 235, 0.18);
    color: var(--ink);
}

/* Focus accessibilité */
:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--space-section) 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section--ink {
    background: var(--ink);
    color: #e2e8f0;
}

/* En-tête de section */
.section-head {
    max-width: 720px;
    margin: 0 auto clamp(2.2rem, 4vw, 3.4rem);
    text-align: center;
}

.section-head--left {
    margin-left: 0;
    text-align: left;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-600);
    background: var(--brand-gradient-soft);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

/* Texte en dégradé */
.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Utilitaires */
.text-center { text-align: center; }
.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;
}

/* Reveal au scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
