/**
 * Vision Jeunesse Nouvelle — Custom Styles
 * Bootstrap 5 theme customization
 */

:root {
    --color-primary: #0056b3;
    --color-primary-dark: #0d47a1;
    --color-secondary: #6c757d;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-light: #f8f9fa;
    --color-dark: #343a40;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    color: #fff !important;
    border-bottom: 3px solid #fff;
    padding-bottom: 0.25rem;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="dots" x="0" y="0" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect fill="url(%23dots)" width="1200" height="600"/></svg>');
    opacity: 0.5;
}

.hero > * {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--color-success);
    background-color: #f0fdf4;
    color: #166534;
}

.alert-danger {
    border-left-color: var(--color-danger);
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    border-left-color: var(--color-warning);
    background-color: #fffbeb;
    color: #92400e;
}

.alert-info {
    border-left-color: var(--color-info);
    background-color: #f0f9ff;
    color: #0c4a6e;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
    text-decoration: none;
}

.hover-link:hover {
    color: #fff !important;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 4px;
    border: 1px solid #ddd;
    color: var(--color-primary);
}

.page-link:hover {
    color: var(--color-primary-dark);
    background-color: #f8f9fa;
}

.page-link.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
}

.table thead {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Utilities */
.transition {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.min-vh-50 {
    min-height: 50vh;
}

.min-vh-100 {
    min-height: 100vh;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--color-primary);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.95rem;
    }

    .hero .col-lg-6 img {
        margin-top: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .nav-link {
        display: none !important;
    }

    body {
        background: white;
    }

    a {
        color: #0056b3;
        text-decoration: underline;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}

/* ==========================================================================
   Site Footer
   Scoped under .site-footer so it overrides the generic `footer a` rules
   above without touching the admin footer.
   ========================================================================== */

:root {
    --footer-ink: #dbe6f5;
    --footer-ink-dim: #97aac6;
    --footer-accent: #ffc107;
    --footer-hairline: rgba(255, 255, 255, 0.12);
}

html {
    scroll-behavior: smooth;
}

.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 5rem;
    background: linear-gradient(165deg, #071a3a 0%, #092047 45%, #0b2c5e 100%);
    color: var(--footer-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Amber hairline tying the footer to the brand accent */
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--footer-accent) 0%, #0d47a1 45%, #00695c 100%);
}

/* The dot field from the programs hero, so the page reads as one system */
.site-footer__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}

.site-footer__inner {
    position: relative;
    z-index: 1;
    padding-top: 4rem;
    padding-bottom: 1.75rem;
}

.site-footer__main {
    padding-bottom: 3rem;
}

/* --- Brand ------------------------------------------------------------- */

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.125rem;
    text-decoration: none;
}

.site-footer__brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-footer__brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-family: 'Poppins', sans-serif;
}

.site-footer__brand strong {
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-footer__brand em {
    color: var(--footer-accent);
    font-size: 1.0625rem;
    font-weight: 700;
    font-style: normal;
}

.site-footer__tagline {
    max-width: 34ch;
    margin-bottom: 1.125rem;
    color: var(--footer-ink-dim);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.site-footer__since {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--footer-hairline);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-ink);
    font-size: 0.8125rem;
    font-weight: 500;
}

.site-footer__since i {
    color: var(--footer-accent);
}

/* --- Social ------------------------------------------------------------ */

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--footer-hairline);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-ink);
    font-size: 1.0625rem;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease,
                border-color 0.25s ease, color 0.25s ease;
}

.site-footer__social a:hover {
    transform: translateY(-3px);
    border-color: var(--footer-accent);
    background: var(--footer-accent);
    color: #092047;
}

/* --- Column headings --------------------------------------------------- */

.site-footer__heading {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.site-footer__heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--footer-accent);
}

/* --- Link lists -------------------------------------------------------- */

.site-footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links li + li {
    margin-top: 0.7rem;
}

.site-footer__links a {
    display: inline-block;
    color: var(--footer-ink-dim);
    font-size: 0.9375rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer__links a:hover {
    transform: translateX(4px);
    color: #fff;
}

/* --- Contact ----------------------------------------------------------- */

.site-footer__contact {
    margin-bottom: 1.5rem;
    font-style: normal;
}

.site-footer__contact a,
.site-footer__contact-static {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    color: var(--footer-ink-dim);
    font-size: 0.9125rem;
    line-height: 1.55;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.site-footer__contact a:hover {
    color: #fff;
}

.site-footer__chip {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--footer-accent);
    font-size: 0.8125rem;
}

/* --- Get involved ------------------------------------------------------ */

.site-footer__involve {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__involve a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--footer-hairline);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-ink);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease,
                color 0.2s ease, transform 0.2s ease;
}

.site-footer__involve a:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 193, 7, 0.55);
    background: rgba(255, 193, 7, 0.14);
    color: #fff;
}

.site-footer__involve i {
    color: var(--footer-accent);
    font-size: 0.875rem;
}

/* --- Rule & bottom bar ------------------------------------------------- */

.site-footer__rule {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.16) 20%,
        rgba(255, 255, 255, 0.16) 80%,
        transparent 100%);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
}

.site-footer__copy {
    margin: 0;
    color: var(--footer-ink-dim);
    font-size: 0.8438rem;
}

.site-footer__copy strong {
    color: var(--footer-ink);
    font-weight: 600;
}

.site-footer__legal {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8438rem;
}

.site-footer__legal a {
    color: var(--footer-ink-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__legal a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer__legal span {
    color: rgba(255, 255, 255, 0.25);
}

.site-footer__top {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--footer-hairline);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-ink);
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease,
                border-color 0.25s ease, color 0.25s ease;
}

.site-footer__top:hover {
    transform: translateY(-3px);
    border-color: var(--footer-accent);
    background: var(--footer-accent);
    color: #092047;
}

/* --- Focus & motion ---------------------------------------------------- */

.site-footer a:focus-visible {
    outline: 2px solid var(--footer-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site-footer a {
        transition: none;
    }

    .site-footer a:hover {
        transform: none;
    }
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 991.98px) {
    .site-footer__inner {
        padding-top: 3rem;
    }

    .site-footer__main {
        padding-bottom: 2rem;
    }
}

@media (max-width: 575.98px) {
    .site-footer {
        margin-top: 3rem;
        text-align: center;
    }

    .site-footer__brand,
    .site-footer__social,
    .site-footer__involve {
        justify-content: center;
    }

    .site-footer__tagline {
        max-width: none;
    }

    .site-footer__heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .site-footer__contact a,
    .site-footer__contact-static {
        justify-content: center;
        text-align: left;
    }

    .site-footer__links a:hover {
        transform: none;
    }

    .site-footer__bottom {
        justify-content: center;
        text-align: center;
    }
}
