/* ==========================================================================
   SWISS.CSS — Design System Swiss Charity
   Base : typographie, variables CSS, layout, utilitaires
   ========================================================================== */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
    --red:         #E30613;
    --red-dark:    #B5040F;
    --white:       #FFFFFF;
    --dark:        #1A1A1A;
    --grey:        #333333;
    --grey-mid:    #666666;
    --grey-light:  #AAAAAA;
    --grey-bg:     #F5F5F5;
    --grey-border: #DDDDDD;

    --font-base:   'Inter', Helvetica, Arial, sans-serif;

    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 96px;

    --radius:  4px;
    --border:  2px;
    --shadow:  0 2px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.12);

    --transition: 0.25s cubic-bezier(.4,0,.2,1);

    --header-h: 72px;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-base);
    font-weight: 400;
    color: var(--grey);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    cursor: none; /* custom cursor */
}

/* ── Custom cursor (Croix suisse) ──────────────────────────────────────────── */
body::after {
    content: '✚';
    position: fixed;
    top: 0; left: 0;
    width: 24px; height: 24px;
    color: var(--red);
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform .15s ease;
    will-change: transform;
    /* moved by JS */
    --cx: 0px; --cy: 0px;
    transform: translate(var(--cx), var(--cy)) translate(-50%, -50%);
}

/* ── Scroll Progress Bar ───────────────────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 4px;
    background: var(--red);
    z-index: 10000;
    transition: width .1s linear;
}

/* ── Loader Screen ─────────────────────────────────────────────────────────── */
.loader-screen {
    position: fixed;
    inset: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: opacity .4s ease, visibility .4s ease;
}
.loader-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-cross {
    position: relative;
    width: 48px; height: 48px;
    animation: rotateCross 1s linear infinite;
}
.loader-cross .cross-v,
.loader-cross .cross-h {
    position: absolute;
    background: var(--red);
    border-radius: 2px;
}
.loader-cross .cross-v { width: 12px; height: 48px; top: 0; left: 18px; }
.loader-cross .cross-h { width: 48px; height: 12px; top: 18px; left: 0; }
@keyframes rotateCross { to { transform: rotate(360deg); } }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-base);
    font-weight: 800;
    line-height: 1.1;
    color: var(--dark);
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

p { margin-bottom: var(--space-2); color: var(--grey-mid); line-height: 1.7; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── HEADER ────────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.12); }

.navbar-swiss { padding: 0; }

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: var(--space-3);
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}
.brand-cross {
    color: var(--red);
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 1rem; color: var(--dark); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small  { font-size: .65rem; color: var(--grey-mid); font-weight: 400; white-space: nowrap; display: none; }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}
.nav-links .nav-link {
    padding: var(--space-1) var(--space-2);
    font-size: .875rem;
    font-weight: 500;
    color: var(--grey);
    text-decoration: none;
    letter-spacing: .02em;
    border-bottom: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.nav-links .nav-link:hover,
.nav-links .nav-link.active {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

/* Burger */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.burger-btn span {
    display: block;
    width: 22px; height: 2px;
    background: var(--dark);
    transition: transform var(--transition), opacity var(--transition);
}
.burger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    background: var(--white);
    border-top: 3px solid var(--red);
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s ease, padding .35s ease;
}
.mobile-menu.open {
    max-height: 600px;
    padding: var(--space-2) 0 var(--space-3);
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--space-3); }
.mobile-menu ul a {
    display: block;
    padding: 12px var(--space-2);
    font-weight: 500;
    font-size: .95rem;
    color: var(--grey);
    border-left: 3px solid transparent;
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: all var(--transition);
    text-decoration: none;
}
.mobile-menu ul a:hover,
.mobile-menu ul a.active {
    color: var(--red);
    border-left-color: var(--red);
    background: rgba(227,6,19,.04);
    padding-left: var(--space-3);
}
.mobile-menu ul li:last-child {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--grey-border);
}

/* Header red line */
.header-line {
    height: 4px;
    background: var(--red);
}

/* ── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn-swiss {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--red);
    color: var(--white) !important;
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 2px solid var(--red);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn-swiss:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227,6,19,.3);
}
.btn-swiss.btn-outline {
    background: transparent;
    color: var(--red) !important;
}
.btn-swiss.btn-outline:hover { background: var(--red); color: var(--white) !important; }

.btn-swiss.btn-white {
    background: var(--white);
    color: var(--red) !important;
    border-color: var(--white);
}
.btn-swiss.btn-white:hover {
    background: var(--grey-bg);
    border-color: var(--grey-bg);
    transform: translateY(-2px);
}
.btn-swiss.btn-sm { padding: 8px 18px; font-size: .8rem; }

/* ── SECTION utilities ─────────────────────────────────────────────────────── */
.section { padding: var(--space-7) 0; }
.section-sm { padding: var(--space-5) 0; }
.section-bg { background: var(--grey-bg); }
.section-red { background: var(--red); }
.section-dark { background: var(--dark); }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: var(--space-2);
}
.section-label::before {
    content: '';
    display: block;
    width: 24px; height: 2px;
    background: var(--red);
}

/* ── CARDS ─────────────────────────────────────────────────────────────────── */
.swiss-card {
    background: var(--white);
    border: var(--border) solid var(--grey-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.swiss-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.swiss-card .card-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: rgba(227,6,19,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}
.swiss-card .card-icon i { font-size: 1.5rem; color: var(--red); }
.swiss-card .card-title { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: var(--space-1); }
.swiss-card .card-body  { flex: 1; }
.swiss-card .card-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--red);
    margin-top: var(--space-3);
    transition: gap var(--transition);
}
.swiss-card .card-footer-link:hover { gap: 12px; }

/* ── SECTION CTA (pleine largeur rouge) ────────────────────────────────────── */
.cta-section {
    background: var(--red);
    padding: var(--space-6) 0;
    text-align: center;
}
.cta-section h2, .cta-section p { color: var(--white); }
.cta-section p { opacity: .9; }

/* ── QUOTE BLOCK ───────────────────────────────────────────────────────────── */
.quote-block {
    border-left: 4px solid var(--red);
    padding-left: var(--space-4);
    margin: var(--space-5) 0;
}
.quote-block blockquote {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    letter-spacing: -.01em;
}
.quote-block cite {
    display: block;
    margin-top: var(--space-2);
    font-size: .875rem;
    color: var(--grey-mid);
    font-style: normal;
    font-weight: 500;
}

/* ── STATS ─────────────────────────────────────────────────────────────────── */
.stat-item { text-align: center; padding: var(--space-3); }
.stat-value {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    color: var(--red);
    display: block;
    letter-spacing: -.03em;
    line-height: 1;
}
.stat-label {
    font-size: .875rem;
    color: var(--grey-mid);
    font-weight: 500;
    margin-top: 6px;
    display: block;
}
.stat-icon { font-size: 1.5rem; color: var(--red); margin-bottom: var(--space-1); opacity: .5; }

/* ── NEWSLETTER ────────────────────────────────────────────────────────────── */
.newsletter-section {
    background: var(--dark);
    padding: var(--space-6) 0;
}
.newsletter-section .swiss-cross-sm { font-size: 1.5rem; color: var(--red); display: block; margin-bottom: var(--space-1); }
.newsletter-title { color: var(--white); font-size: 1.5rem; margin-bottom: var(--space-1); }
.newsletter-sub { color: var(--grey-light); font-size: .9rem; margin: 0; }

.newsletter-input-group {
    display: flex;
    gap: 0;
    margin-top: var(--space-3);
}
.newsletter-input-group input {
    flex: 1;
    padding: 14px var(--space-3);
    border: 2px solid var(--grey);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font-base);
    font-size: .875rem;
    background: rgba(255,255,255,.07);
    color: var(--white);
    outline: none;
    transition: border-color var(--transition);
}
.newsletter-input-group input::placeholder { color: var(--grey-light); }
.newsletter-input-group input:focus { border-color: var(--red); }
.newsletter-input-group .btn-swiss { border-radius: 0 var(--radius) var(--radius) 0; }
.newsletter-msg { margin-top: var(--space-1); font-size: .8rem; color: var(--grey-light); min-height: 20px; }

/* ── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--grey-bg);
    padding: var(--space-7) 0 0;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}
.footer-brand .brand-cross { font-size: 2rem; color: var(--red); }
.footer-brand strong { font-size: 1.1rem; color: var(--dark); font-weight: 800; }
.footer-desc { font-size: .875rem; color: var(--grey-mid); max-width: 300px; }

.footer-heading {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: var(--space-3);
}
.footer-links li + li { margin-top: var(--space-1); }
.footer-links a { font-size: .875rem; color: var(--grey-mid); }
.footer-links a:hover { color: var(--red); }

.footer-contact { font-style: normal; }
.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: var(--space-1);
    font-size: .875rem;
    color: var(--grey-mid);
    margin-bottom: var(--space-1);
}
.footer-contact p i { color: var(--red); flex-shrink: 0; margin-top: 3px; }
.footer-contact a { color: var(--grey-mid); }
.footer-contact a:hover { color: var(--red); }

.footer-social { display: flex; gap: var(--space-1); }
.footer-social a {
    width: 36px; height: 36px;
    border: 2px solid var(--grey-border);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--grey-mid);
    font-size: .875rem;
    transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--red); color: var(--red); }

.footer-divider { height: 1px; background: var(--grey-border); margin: var(--space-4) 0 var(--space-3); }

.footer-bottom { padding-bottom: var(--space-4); }
.copyright { font-size: .8rem; color: var(--grey-mid); margin: 0; }
.footer-legal {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
    flex-wrap: wrap;
}
.footer-legal a { font-size: .8rem; color: var(--grey-mid); }
.footer-legal a:hover { color: var(--red); }

/* ── BACK TO TOP ───────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    width: 44px; height: 44px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    box-shadow: var(--shadow-lg);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); background: var(--red-dark); }

/* ── ANIMATIONS (fade-in / slide) ──────────────────────────────────────────── */
[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
[data-animate].animated { opacity: 1; transform: none; }
[data-animate][data-delay="1"] { transition-delay: .1s; }
[data-animate][data-delay="2"] { transition-delay: .2s; }
[data-animate][data-delay="3"] { transition-delay: .3s; }
[data-animate][data-delay="4"] { transition-delay: .4s; }

/* ── BREADCRUMB ────────────────────────────────────────────────────────────── */
.breadcrumb-swiss {
    padding: var(--space-2) 0;
    font-size: .8rem;
    color: var(--grey-mid);
}
.breadcrumb-swiss a { color: var(--grey-mid); }
.breadcrumb-swiss a:hover { color: var(--red); }
.breadcrumb-swiss span { color: var(--red); margin: 0 6px; }

/* ── PAGE HERO (intérieure) ────────────────────────────────────────────────── */
.page-hero {
    background: var(--dark);
    padding: var(--space-6) 0;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '✚';
    position: absolute;
    right: -40px; top: -40px;
    font-size: 300px;
    color: rgba(227,6,19,.07);
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}
.page-hero h1 { color: var(--white); }
.page-hero .page-hero-desc { color: rgba(255,255,255,.75); font-size: 1.1rem; }

/* ── SEPARATORS ────────────────────────────────────────────────────────────── */
.sep { display: block; width: 48px; height: 4px; background: var(--red); margin: var(--space-2) 0 var(--space-3); }
.sep-wide { width: 100%; }

/* ── FLASH MESSAGES ────────────────────────────────────────────────────────── */
.alert-swiss {
    padding: var(--space-2) var(--space-3);
    border-left: 4px solid;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: var(--space-3);
}
.alert-swiss.success { background: #F0FFF4; border-color: #38A169; color: #276749; }
.alert-swiss.error   { background: #FFF5F5; border-color: var(--red); color: var(--red-dark); }
.alert-swiss.info    { background: #EBF8FF; border-color: #3182CE; color: #2B6CB0; }
