﻿/* ═══════════════════════════════════════════════════════
   cap-metiers.css  –  Charte graphique Cap Métiers NA
   Basé sur la palette officielle du site cap-metiers.fr
   ═══════════════════════════════════════════════════════ */

/* ── 1. Variables de design ─────────────────────────── */
:root {
    /* Couleurs principales (charte Cap Métiers) */
    --color-navy: #1a013b; /* fond header/footer */
    --color-navy-mid: #122440; /* variante plus claire */
    --color-blue-mid: #1a3d6e; /* bleu intermédiaire  */
    --color-red: #d4001e; /* rouge accent officiel */
    --color-red-hover: #b00018; /* rouge foncé au survol */
    --color-violet: #3a0088;
    --color-white: #ffffff;
    --color-off-white: #f4f5f7;
    --color-text: #1a1a2e;
    --color-text-muted: #4a5568;
    /* Typographie */
    --font-display: 'Marianne', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Marianne', 'Segoe UI', system-ui, sans-serif;
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
    /* Transitions */
    --transition: 200ms ease;
    /* Focus visible */
    --focus-ring: 3px solid var(--color-red);
    --focus-offset: 3px;
}

/* ── 2. Reset minimal ───────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-off-white);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul[role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
}

section {
    margin: var(--space-2xl);
}
.block-api-infos {
    background: var(--color-white);
    padding: var(--space-lg);
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

    .block-api-infos h1 {
        font-family: var(--font-display);
        color: var(--color-navy);
        margin-top: 0;
    }
    /* ── 3. Accessibilité ───────────────────────────────── */
    /* Lien d'évitement */
    .skip-link {
        position: absolute;
        top: -9999px;
        left: 1rem;
        z-index: 9999;
        padding: 0.75rem 1.25rem;
        background: var(--color-red);
        color: var(--color-white);
        font-weight: 700;
        text-decoration: none;
        border-radius: 0 0 0.5rem 0.5rem;
        transition: top var(--transition);
    }

    .skip-link:focus {
        top: 0;
    }

/* Focus visible universel */
:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
    border-radius: 2px;
}

/* Classe utilitaire lecteur d'écran */
.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;
}

/* ── 4. BANDEAU / HEADER ────────────────────────────── */
.site-header {
    background-color: var(--color-navy);
    color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: 0.75rem var(--space-xl);
    max-width: 1280px;
    margin: 0 auto;
}

/* Logo */
.header-logo {
    display: flex;
    flex-shrink: 0;
    border-radius: 4px;
}

    .header-logo img {
        height: 52px;
        width: auto;
    }


/* ── 6. BOUTONS ─────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

    .btn:active {
        transform: scale(0.97);
    }

.btn--primary {
    background: var(--color-red);
    color: var(--color-white);
}

    .btn--primary:hover,
    .btn--primary:focus-visible {
        background: var(--color-red-hover);
        box-shadow: 0 4px 18px rgba(212, 0, 30, 0.45);
    }

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.6);
}

    .btn--outline:hover,
    .btn--outline:focus-visible {
        background: rgba(255,255,255,0.12);
        border-color: var(--color-white);
    }

/* ── 8. FOOTER ──────────────────────────────────────── */
.site-footer {
    background: var(--color-navy);
    color: rgba(255,255,255,0.7);
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-copy {
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

    .footer-links a {
        color: rgba(255,255,255,0.65);
        text-decoration: none;
        font-size: 0.85rem;
    }

        .footer-links a:hover,
        .footer-links a:focus-visible {
            color: var(--color-white);
            text-decoration: underline;
        }

/* ── 9. RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
    .hero-content {
        margin-left: var(--space-xl);
        padding: var(--space-xl) var(--space-xl);
    }
}

@media (max-width: 700px) {
    .header-inner {
        padding: 0.75rem var(--space-md);
        gap: var(--space-sm);
    }



    .btn {
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ── 10. Préférence mouvement réduit ────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
