/* ==========================================================================
   IC-KC — Base, variables de marque et typographie (inspiré du thème Elevate)
   ========================================================================== */

:root {
    /* Palette officielle IC-KC */
    --brand-blue: #1C36BA;
    --brand-blue-dark: #132585;
    --brand-blue-soft: #EEF2FF;
    --brand-orange: #FF4511;
    --brand-orange-dark: #D63306;
    --brand-orange-text: #C22D04;
    --brand-green: #7AD80B;
    --brand-green-dark: #58A005;
    --brand-green-text: #366603;
    --gradient-brand-dark: linear-gradient(110deg, rgba(12, 14, 20, 0.92) 0%, rgba(28, 54, 186, 0.84) 100%);

    /* Tons neutres ardoise / charbon (direction visuelle Elevate) */
    --ink-950: #0C0E14;
    --ink-900: #141923;
    --ink-800: #1F2633;
    --ink-700: #334155;
    --ink-600: #4B5563;
    --ink-500: #64748B;
    --border-light: #E2E8F0;
    --border-dark: rgba(255, 255, 255, 0.14);
    --surface-white: #FFFFFF;
    --surface-muted: #F4F6F9;
    --surface-subtle: #EAEFF5;

    /* États fonctionnels */
    --state-success-bg: #ECFDF3;
    --state-success-border: #86EFAC;
    --state-success-text: #166534;
    --state-error-bg: #FEF2F2;
    --state-error-border: #FCA5A5;
    --state-error-text: #991B1B;
    --state-info-bg: #EFF6FF;
    --state-info-border: #93C5FD;
    --state-info-text: #1E40AF;

    /* Typographie Elevate (Titillium Web + Archivo) */
    --font-heading: 'Titillium Web', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Échelle de mise en page */
    --container-max: 1220px;
    --container-pad: clamp(1rem, 3vw, 2rem);
    --section-gap: clamp(3.25rem, 6vw, 5.5rem);
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Élévations et transitions */
    --shadow-sm: 0 4px 16px rgba(12, 14, 20, 0.06);
    --shadow-md: 0 12px 32px rgba(12, 14, 20, 0.10);
    --shadow-lg: 0 20px 48px rgba(12, 14, 20, 0.18);
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* Reset léger et sain */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-700);
    background-color: var(--surface-white);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
    overflow: hidden;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--brand-blue);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.2em;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-orange-text);
}

/* Focus clavier clairement visible */
:focus-visible {
    outline: 3px solid var(--brand-orange);
    outline-offset: 3px;
}

/* Hiérarchie typographique (style industriel Elevate) */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.18;
    color: var(--ink-950);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 4.4vw, 3.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1rem;
}

p:last-child {
    margin-bottom: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

/* Lien d'évitement et lecteur d'écran */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--brand-blue);
    color: var(--surface-white);
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-xs);
}

.skip-link:focus {
    top: 1rem;
    color: var(--surface-white);
}

.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;
}

/* Conteneur principal */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Respect de la préférence de réduction des animations */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
