/* ---------- Variables ---------- */
:root {
    --color-navy: #001f3d;
    --color-navy-dark: #001529;
    --color-connecter: #e73e14;
    --color-explorer: #fab919;
    --color-agir: #69a517;
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f8;
    --color-ink: #12233a;
    --color-muted: #55606f;
    --color-border: #e2e6ea;
    --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1150px;
    --gap: 10px;
    --radius: 10px;
}

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

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

ul {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-bg);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--color-navy);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.1rem, 5vw + 1rem, 3.5rem);
}

h2 {
    font-size: clamp(1.65rem, 2.6vw + 1rem, 2.35rem);
    margin-bottom: 18px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

p {
    margin-bottom: 16px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    color: var(--color-muted);
    margin-bottom: 10px;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--seam-color, var(--color-muted));
    flex-shrink: 0;
}

.section {
    position: relative;
    padding: 64px 22px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-note {
    color: var(--color-muted);
    font-style: italic;
}

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

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--color-navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
}

:focus-visible {
    outline: 3px solid var(--color-explorer);
    outline-offset: 2px;
}

/* ---------- The seam: the connecting thread through the programming journey ----------
   Concept (navy) -> Connecter (orange) -> Explorer (gold) -> Agir (green).
   Sections sit flush against one another with no vertical gap, so each
   section's own colored segment reads as one continuous line down the page. */
.seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 3px;
    background: var(--seam-color, var(--color-border));
    pointer-events: none;
}

.seam::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--seam-color, var(--color-border));
    box-shadow: 0 0 0 4px var(--seam-ring, var(--color-bg));
}

.section-concept { --seam-color: var(--color-navy); --seam-ring: var(--color-bg-alt); }
.section-program { --seam-color: var(--color-navy); --seam-ring: var(--color-bg); }
.section-connecter { --seam-color: var(--color-connecter); --seam-ring: var(--color-bg-alt); }
.section-explorer { --seam-color: var(--color-explorer); --seam-ring: var(--color-bg); }
.section-agir { --seam-color: var(--color-agir); --seam-ring: var(--color-bg-alt); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: var(--color-connecter);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(0, 31, 61, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
    .btn:hover, .btn:focus-visible { transform: none; }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-alt);
    color: var(--color-navy);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 16px 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--seam-color, var(--color-explorer));
    flex-shrink: 0;
}

.badge:hover,
.badge:focus-within {
    background: #fff;
    border-color: var(--color-navy);
    box-shadow: 0 8px 18px -10px rgba(0, 31, 61, 0.4);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .badge { transition: none; }
    .badge:hover, .badge:focus-within { transform: none; }
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(6px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--gap);
}

.logo img {
    width: 210px;
    height: auto;
}

/* ---------- Nav toggle (hamburger) ---------- */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-navy);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
    .nav-toggle-bar { transition: none; }
}

/* ---------- Nav panel ---------- */
.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.site-nav.is-open {
    max-height: 320px;
}

@media (prefers-reduced-motion: reduce) {
    .site-nav { transition: none; }
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 22px 20px;
    text-transform: uppercase;
}

.nav-list a {
    position: relative;
    display: block;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-navy);
    padding: 12px 2px;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 6px;
    height: 2px;
    background: var(--color-connecter);
    transition: right 0.2s ease;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
    right: 0;
}

.nav-list a.nav-connecter::after { background: var(--color-connecter); }
.nav-list a.nav-explorer::after { background: var(--color-explorer); }
.nav-list a.nav-agir::after { background: var(--color-agir); }

@media (prefers-reduced-motion: reduce) {
    .nav-list a::after { transition: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--color-navy);
    color: #fff;
    padding: 64px 22px 72px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 75%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 75%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    /*max-width: 720px;*/
    margin: 0 auto;
}

.hero h1 {
    color: #fff;
}

.tagline {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.6vw + 0.8rem, 1.6rem);
    margin: 16px 0 22px;
    letter-spacing: 0.01em;
}

.tagline-word {
    font-weight: 700;
}

.tagline-connecter { color: var(--color-connecter); }
.tagline-explorer { color: var(--color-explorer); }
.tagline-agir { color: var(--color-agir); }

.tagline-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 10px 2px;
    vertical-align: middle;
}

.tagline-dot-connecter { background: var(--color-explorer); }
.tagline-dot-explorer { background: var(--color-agir); }

.hero-text {
    color: #fff;
    font-size: 1.05rem;
}

.hero-credit {
    font-size: 0.9rem;
    color: #c3cdd8;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-top: 28px;
}

.hero-actions .btn-secondary {
    color: #fff;
    border-color: #fff;
}

/* ---------- Format cards (Connecter / Explorer / Agir) ---------- */
.format-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px 0 44px;
}

.format-card {
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-navy);
    border-radius: var(--radius);
    padding: 26px;
    background: var(--color-bg-alt);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.format-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -18px rgba(0, 31, 61, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    .format-card { transition: none; }
    .format-card:hover { transform: none; }
}

.format-mark {
    width: 100%;
    height: auto;
    margin-bottom: 18px;
}

.format-connecter { border-top-color: var(--color-connecter); --seam-color: var(--color-connecter); }
.format-explorer { border-top-color: var(--color-explorer); --seam-color: var(--color-explorer); }
.format-agir { border-top-color: var(--color-agir); --seam-color: var(--color-agir); }

.format-name {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.format-connecter .format-name { color: var(--color-connecter); }
.format-explorer .format-name { color: var(--color-explorer); }
.format-agir .format-name { color: var(--color-agir); }

.format-link {
    display: inline-block;
    font-weight: 600;
    color: var(--color-navy);
    text-underline-offset: 3px;
}

.benefits-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}

.benefits-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-connecter);
}

/* ---------- Journey sections background rhythm ---------- */
.section-connecter,
.section-explorer,
.section-agir {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--seam-color, var(--color-navy));
    border-radius: var(--radius);
    margin: 24px auto;
}

.section-partenaires {
    margin-top: 40px;
}

/* Full-bleed background: reaches both screen edges regardless of the
   section's own max-width container. */
.section-concept::before,
.section-partenaires::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--color-bg-alt);
    z-index: -1;
}

/* ---------- Rendez-vous list (Connecter / Explorer / Agir) ---------- */
.rdv-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.rdv-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
}

.rdv-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px 20px;
}

.rdv-item p,
.rdv-item .badge {
    margin-top: 16px;
}

.rdv-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--seam-color, var(--color-navy));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.section-explorer .rdv-num {
    color: var(--color-navy);
}

.rdv-title {
    flex: 1 1 240px;
    margin-bottom: 0;
}

.rdv-subtitle {
    color: var(--color-muted);
    font-style: italic;
    margin: 8px 0 0;
}

.rdv-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rdv-meta div {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
}

.rdv-meta dt {
    font-weight: 700;
    color: var(--color-navy);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rdv-meta dd {
    color: var(--color-muted);
}

/* ---------- Partenaires ---------- */
.partner-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.partner-list li {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 20px;
}

.partner-link {
    display: block;
}

.partner-logo {
    height: auto;
}

.partner-link,
.partner-list li {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.partner-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -14px rgba(0, 31, 61, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .partner-list li,
    .partner-list li:hover {
        transition: none;
        transform: none;
    }
}

/* ---------- Contact ---------- */
.section-contact {
    text-align: center;
}

.section-contact p {
    max-width: none;
}

.pre-footer-logo {
    margin-bottom: 0;
    z-index: -1;
    position: relative;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-navy-dark);
    color: #c3cdd8;
    text-transform: uppercase;
    text-align: center;
    padding: 40px 20px;
}

.footer-quebec-logo {
    max-width: 280px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    width: 200px;
    background: #fff;
    padding: 14px 18px;
    border-radius: var(--radius);
}

.site-footer p {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    margin-bottom: 0;
    max-width: none;
}

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 640px) {
    .format-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .partner-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .pre-footer-logo {
        margin-bottom: -10px;
    }
}

@media (max-width: 639px) {

    
}

@media (min-width: 960px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        max-height: none;
        overflow: visible;
        background: none;
        border-bottom: none;
    }

    .nav-list {
        flex-direction: row;
        overflow-x: visible;
        padding: 0;
        gap: 20px;
    }

    .nav-list a {
        padding: 6px 2px;
    }

    .nav-list a::after {
        bottom: 0;
    }

    .hero {
        padding: 100px 22px 108px;
    }

    .section {
        padding: 84px 35px;
    }
}
