:root {
    --bg-main: #f7f7f5;
    --bg-card: #ffffff;
    --text-main: #1c1c1c;
    --text-muted: #6b6b6b;
    --accent-primary: #d66853;
    --accent-blue: #63a9d8;
    --accent-peach: #f5c164;
    --accent-pink: #a1429d;
    --accent-teal: #43a295;
    --border-soft: rgba(0, 0, 0, 0.08);
    --transition-smooth: 0.3s ease;
}

/* ========================
   Base & Typography
   ======================== */
html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, sans-serif;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ========================
   Navigation Block
   ======================== */
.navigation {
    background: rgba(247, 247, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #da8250;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.navigation__link {
    color: var(--text-main);
    opacity: 0.75;
    transition: all var(--transition-smooth);
    text-decoration: none;
    display: inline-block;
    padding: 8px 16px;
    position: relative;
    font-weight: 600;
}

.navigation__link:hover,
.navigation__link--active {
    opacity: 1;
    color: #da8250;
}

/* ========================
   Section Block
   ======================== */
.section {
    max-width: 100vw;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}

.section:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ========================
   Image Block
   ======================== */
.image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background-image: url("../pictures/pageHome/img_bibliotheque.jpg");
    background-size: 160%;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-size 0.6s ease;
}

.image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.55),
        rgba(0, 0, 0, 0.1)
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image:hover {
    background-size: 190%;
}

.image:hover::after {
    opacity: 1;
}

.image__label {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    color: white;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
    z-index: 2;
}

.image:hover .image__label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================
   Archive Card Block
   ======================== */
.archive-card {
    overflow: hidden;
    min-height: 280px;
    border-radius: 28px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.archive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

/* Modifieurs de couleur du card */
.archive-card--blue {
    background: #e3f2fd;
    border: solid #bfe1f7 1px;
}

.archive-card--peach {
    background: #f5f3e6;
    border: solid #ebe8d7 1px;
}

.archive-card--teal {
    background: #e8f7f4;
    border: solid #d0efe9 1px;
}

/* Couleurs de texte par modifieur */
.archive-card--blue .archive-card__label,
.archive-card--blue .archive-card__title {
    color: #63a9d8;
}

.archive-card--peach .archive-card__label,
.archive-card--peach .archive-card__title {
    color: #f5c164;
}

.archive-card--teal .archive-card__label,
.archive-card--teal .archive-card__title {
    color: #43a295;
}

/* Éléments du card */
.archive-card__label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.archive-card__title {
    font-weight: 900;
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    line-height: 1.05;
    margin-top: 24px;
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.archive-card__link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.archive-card:hover .archive-card__title,
.archive-card:hover .archive-card__label {
    color: white;
}

.archive-card:hover .archive-card__title {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Image flottante dans le card */
.archive-card__float-image {
    position: absolute;
    top: -20px;
    right: -40px;
    width: 160px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px) rotate(-4deg) scale(0.95);
    transition:
        opacity 0.2s ease,
        transform 0.3s ease;
}

.archive-card:hover .archive-card__float-image {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
}

/* Media dans le card */
.archive-card__media {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    z-index: 1;
}

.archive-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-card:hover .archive-card__media {
    transform: translateY(0);
}

/* Behaviour sur desktop avec AOS */
@media (min-width: 1025px) {
    .archive-card:hover {
        transform: translateY(
            calc(-10px + var(--aos-translate-y, 0px))
        ) !important;
    }
}

/* ========================
   CTA Button Block
   ======================== */
.cta-button {
    background: linear-gradient(135deg, #f5e6d3 0%, #ead5b9 100%);
    border: 2px solid #e0a787;
    border-radius: 12px;
    padding: 16px 40px;
    color: #da8250;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(218, 130, 80, 0.2);
    background: linear-gradient(135deg, #ead5b9 0%, #dfc5a3 100%);
}

/* ========================
   Separator Block
   ======================== */

.separator-line {
    width: 40%;
    border: 1px solid #8d8d8d;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.separator {
    background: #eeeeed;
    padding: 20px 0;
    width: 100vw;
    margin: 0;
}

/* ========================
   Page Title Block
   ======================== */
.archive-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #da8250;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

/* ========================
   Intro Section Block
   ======================== */
.intro__title {
    font-weight: 900;
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    line-height: 1.05;
    margin-top: 24px;
    position: relative;
    z-index: 2;
    color: #da8250;
}

.intro__subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #da8250;
    display: block;
    margin-top: 1.5rem;
}

/* ========================
   Footer Block
   ======================== */
footer {
    background-color: #eeeeee;
    display: flex;
}

.footer {
    display: flex;
    background-color: #f5f5f5;
    border-top: 2px solid #da8250;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 4rem;
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem)
        clamp(1rem, 2vw, 2rem);
}

.footer__container {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 8vw, 10rem);
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.footer__section h3 {
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 700;
    color: #da8250;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer__section p {
    color: #666;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    margin: 0;
}

.footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.footer__nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__nav li {
    margin-bottom: 0.5rem;
}

.footer__nav a {
    color: #666;
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    margin: 0;
    transition: all var(--transition-smooth);
    font-weight: 500;
}

.footer__nav a:hover {
    color: #da8250;
    font-weight: 600;
}

.footer__divider {
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 0 0;
    margin-bottom: 1.5rem;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer__bottom-left p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: clamp(0.7rem, 2vw, 0.875rem);
}

/* ========================
   Navigation Mobile & Offcanvas
   ======================== */
.navbar {
    background-color: #eeeeee;
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.8rem !important;
    letter-spacing: 0.02em;
    color: #da8250 !important;
}

.navbar-toggler {
    border: 2px solid #da8250 !important;
    padding: 8px 12px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(218, 130, 80, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23da8250' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.offcanvas {
    background: linear-gradient(135deg, #1c1c1c 0%, #2a2a2a 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.offcanvas-header {
    border-bottom: 2px solid #da8250;
    padding: 1.5rem;
    background: rgba(218, 130, 80, 0.05);
}

.offcanvas-title {
    color: #da8250 !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-close {
    filter: invert(1) brightness(1.2);
}

.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(218, 130, 80, 0.25);
}

.offcanvas-body {
    padding: 0;
    background: linear-gradient(to bottom, #1c1c1c 0%, #262626 100%);
}

.offcanvas-body .navbar-nav {
    flex-direction: column;
    width: 100%;
}

.offcanvas-body .nav-item {
    border-bottom: 1px solid rgba(218, 130, 80, 0.15);
    transition: background 0.3s ease;
}

.offcanvas-body .nav-item:hover {
    background: rgba(218, 130, 80, 0.08);
}

.offcanvas-body .nav-item:last-child {
    border-bottom: none;
}

.offcanvas-body .navigation__link {
    display: block;
    padding: 18px 24px;
    color: #da8250 !important;
    opacity: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    position: relative;
}

.offcanvas-body .navigation__link::before {
    content: "▸";
    position: absolute;
    left: 12px;
    opacity: 0;
    transition: all 0.3s ease;
}

.offcanvas-body .navigation__link:hover::before {
    opacity: 1;
    left: 8px;
}

.offcanvas-body .navigation__link--active {
    background: rgba(218, 130, 80, 0.15);
    border-left: 3px solid #da8250;
    padding-left: 21px;
}
/* ========================\n   Responsive & Media Queries\n   ======================== */
@media (max-width: 768px) {
    /* Enlève l'animation de soulèvement au clic */
    .archive-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Texte blanc sur mobile */
    .archive-card__title,
    .archive-card__label {
        color: white;
        text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    /* Image flottante cachée sur petit écran */
    .archive-card__float-image {
        display: none;
    }

    .footer__content {
        flex-direction: column;
    }
}

@media (max-width: 1024px) {
    /* Enlève l'animation de soulèvement au clic */
    .archive-card:hover {
        transform: none !important;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12) !important;
    }

    /* Texte blanc en permanence sur tablette */
    .archive-card__title,
    .archive-card__label {
        color: white !important;
        text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    /* Override des couleurs par modifieur */
    .archive-card--blue .archive-card__label,
    .archive-card--blue .archive-card__title,
    .archive-card--peach .archive-card__label,
    .archive-card--peach .archive-card__title,
    .archive-card--teal .archive-card__label,
    .archive-card--teal .archive-card__title {
        color: white !important;
    }

    /* Image flottante toujours visible */
    .archive-card__float-image {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Media visible directement */
    .archive-card__media {
        transform: translateY(0) !important;
    }
}
