/* ==========================================================================
   Les Fables — Style principal
   Site de fables et poésie française
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
    --paper: #f5f0e8;
    --rose: #d4a0a0;
    --rose-light: #e8c4c4;
    --brown: #3d2b1f;
    --brown-light: #6b4c3b;
    --cream: #faf6f0;
    --accent: #8b4513;
    --white: #ffffff;

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Crimson Text', Georgia, serif;

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 20px;

    --transition: 0.2s ease;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--brown);
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)' opacity='0.08'/%3E%3C/svg%3E");
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

ul, ol {
    list-style: none;
}

/* Focus visible — accessibilité */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
}

.reading-container {
    max-width: 750px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--brown);
    text-decoration: none;
    transition: color var(--transition);
}

.header__logo:hover {
    color: var(--accent);
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header__nav a {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--brown-light);
    text-decoration: none;
    transition: color var(--transition);
}

.header__nav a:hover,
.header__nav a.active {
    color: var(--accent);
}

/* Burger — mobile */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--brown);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.header__burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger.is-open span:nth-child(2) {
    opacity: 0;
}

.header__burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    padding: 80px 0;
    background-color: var(--rose-light);
    text-align: center;
}

.hero--split {
    text-align: left;
    padding: 60px 0;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero__text h1 {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: 22px;
    color: var(--brown-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.hero__desc {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--brown-light);
    margin-bottom: 56px;
    line-height: 1.6;
    opacity: 0.8;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.hero__image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--brown-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.section__desc {
    text-align: center;
    font-size: 17px;
    color: var(--brown-light);
    max-width: 600px;
    margin: -16px auto 32px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    padding: 64px 0;
}

.section--alt {
    background-color: var(--cream);
}

.section--rose {
    background-color: var(--rose-light);
}

.section--rose .section__title {
    color: var(--brown);
}

.section--rose .section__desc {
    color: var(--brown-light);
}

.section--rose .quiz__option {
    background-color: var(--white);
    border-color: var(--rose);
}

.section--rose .quiz__option:hover {
    background-color: var(--rose);
    border-color: var(--brown-light);
    color: var(--white);
}

.section--rose .quiz__result-moral {
    background-color: var(--white);
}

.section--rose .btn--primary {
    background-color: var(--brown);
    border-color: var(--brown);
}

.section--rose .btn--outline {
    border-color: var(--brown);
    color: var(--brown);
}

.section--rose .btn--outline:hover {
    background-color: var(--brown);
    color: var(--white);
}

.section__title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--brown);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Grilles
   -------------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--cream);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--brown-light);
    line-height: 1.6;
}

.card__meta {
    font-size: 14px;
    color: var(--brown-light);
    opacity: 0.7;
    margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Texte littéraire (poèmes / fables)
   -------------------------------------------------------------------------- */
.text-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
    color: var(--brown);
}

.text-content p {
    margin-bottom: 12px;
}

.text-content p:last-child {
    margin-bottom: 0;
}

.text-content br {
    content: '';
    display: block;
    margin-bottom: 0;
}

/* Réduire les lignes vides entre strophes */
.text-content {
    word-spacing: normal;
    letter-spacing: normal;
}

.reading-container .text-content {
    padding: 40px;
    background-color: var(--cream);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.text-content .strophe {
    margin-bottom: 24px;
}

.text-content .strophe:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--brown-light);
    margin-bottom: 32px;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: text-decoration var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span.separator {
    margin: 0 6px;
}

.breadcrumbs span.separator::before {
    content: '\203A'; /* › */
}

/* --------------------------------------------------------------------------
   Analyse
   -------------------------------------------------------------------------- */
.analyse-block {
    background-color: var(--cream);
    border-left: 4px solid var(--rose);
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.analyse-block h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 12px;
    line-height: 1.3;
}

.analyse-block p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--brown-light);
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Boutons (CTA)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.4;
}

.btn--primary {
    background-color: var(--brown);
    color: var(--cream);
    border-color: var(--brown);
}

.btn--primary:hover {
    background-color: var(--brown-light);
    border-color: var(--brown-light);
    color: var(--cream);
}

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

.btn--outline:hover {
    background-color: var(--brown);
    color: var(--cream);
}

/* --------------------------------------------------------------------------
   Liens internes (maillage)
   -------------------------------------------------------------------------- */
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-links a {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--cream);
    border-radius: var(--radius-pill);
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}

.related-links a:hover {
    background-color: var(--rose-light);
    color: var(--brown);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--brown);
    color: var(--cream);
    padding: 48px 0 24px;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--rose-light);
    margin-bottom: 16px;
}

.footer a {
    color: var(--cream);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity var(--transition);
}

.footer a:hover {
    opacity: 1;
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__col a {
    font-size: 14px;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Responsive — Tablette (768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Hero split */
    .hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero__text h1 {
        font-size: 36px;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__image img {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Header */
    .header__burger {
        display: flex;
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background-color: rgba(245, 240, 232, 0.98);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid rgba(61, 43, 31, 0.1);
        padding: 16px 24px;
    }

    .header__nav.is-open {
        display: flex;
    }

    .header__nav a {
        padding: 12px 0;
        font-size: 18px;
        border-bottom: 1px solid rgba(61, 43, 31, 0.06);
    }

    .header__nav a:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    /* Sections */
    .section {
        padding: 48px 0;
    }

    .section__title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    /* Grilles */
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    /* Texte littéraire */
    .reading-container .text-content {
        padding: 24px;
    }

    /* Footer */
    .footer__links {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Outils */
    .tool-results {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-search__input {
        font-size: 16px;
        padding: 14px 20px;
    }

    .quiz__question {
        font-size: 22px;
    }

    .quiz__option {
        font-size: 16px;
        padding: 14px 20px;
    }

    .quiz__result-title {
        font-size: 26px;
    }

    .poem-day__card {
        padding: 28px 24px;
    }

    .poem-day__card--with-img {
        flex-direction: column;
        gap: 24px;
    }

    .poem-day__img {
        width: 150px;
        margin: 0 auto;
    }

    .poem-day__img img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .poem-day__title {
        font-size: 24px;
    }

    .poem-day__extract {
        font-size: 16px;
    }

    /* Illustrations */
    .illustration {
        max-width: 100%;
    }

    .hero__img {
        max-width: 280px;
    }

    .hero__img--portrait {
        max-width: 180px;
    }

    .card--with-img .card__img {
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .footer__links {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Filtre auteur (pages thème)
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Outil : Recherche par animal
   -------------------------------------------------------------------------- */
.tool-search {
    max-width: 600px;
    margin: 0 auto 32px;
}

.tool-search__input {
    width: 100%;
    padding: 16px 24px;
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--brown);
    background-color: var(--white);
    border: 2px solid var(--rose-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.tool-search__input::placeholder {
    color: var(--brown-light);
    opacity: 0.5;
}

.tool-search__input:focus {
    border-color: var(--rose);
    box-shadow: 0 4px 20px rgba(212, 160, 160, 0.25);
}

.tool-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

@media (min-width: 769px) {
    .tool-results {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tool-results__card {
    display: block;
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    border-left: 3px solid var(--rose);
}

.tool-results__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-results__card h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 4px;
    line-height: 1.3;
}

.tool-results__card span {
    font-size: 14px;
    color: var(--brown-light);
    opacity: 0.7;
}

.tool-results__empty {
    text-align: center;
    font-style: italic;
    color: var(--brown-light);
    padding: 24px 0;
    grid-column: 1 / -1;
}

.tool-results__count {
    text-align: center;
    font-size: 14px;
    color: var(--brown-light);
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Outil : Quiz « Quelle fable êtes-vous ? »
   -------------------------------------------------------------------------- */
.quiz {
    max-width: 650px;
    margin: 0 auto;
}

.quiz__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.quiz__progress-bar {
    flex: 1;
    max-width: 300px;
    height: 6px;
    background-color: var(--white);
    border-radius: 3px;
    overflow: hidden;
}

.quiz__progress-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.quiz__progress-text {
    font-size: 14px;
    color: var(--brown-light);
    min-width: 40px;
}

.quiz__question {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--brown);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.3;
    animation: quizFadeIn 0.4s ease;
}

.quiz__options {
    display: grid;
    gap: 12px;
    animation: quizFadeIn 0.4s ease;
}

.quiz__option {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--brown);
    background-color: var(--white);
    border: 2px solid var(--rose-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
    text-align: left;
    line-height: 1.4;
}

.quiz__option:hover {
    background-color: var(--rose-light);
    border-color: var(--rose);
    transform: translateX(4px);
}

.quiz__result {
    text-align: center;
    animation: quizFadeIn 0.5s ease;
}

.quiz__result-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}

.quiz__result-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 16px;
    line-height: 1.2;
}

.quiz__result-moral {
    font-family: var(--font-body);
    font-size: 18px;
    font-style: italic;
    color: var(--brown-light);
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 16px 24px;
    background-color: var(--white);
    border-left: 3px solid var(--rose);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.quiz__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Outil : Poème du jour
   -------------------------------------------------------------------------- */
.poem-day {
    max-width: 700px;
    margin: 0 auto;
}

.poem-day__card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.poem-day__card--with-img {
    display: flex;
    align-items: center;
    gap: 40px;
}

.poem-day__content {
    flex: 1;
}

.poem-day__img {
    flex-shrink: 0;
    width: 200px;
}

.poem-day__img img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.poem-day__card::before {
    content: '\201C';
    font-family: var(--font-heading);
    font-size: 120px;
    color: var(--rose-light);
    position: absolute;
    top: -10px;
    left: 16px;
    line-height: 1;
    opacity: 0.5;
    pointer-events: none;
}

.poem-day__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.poem-day__icon {
    font-size: 24px;
    opacity: 0.7;
}

.poem-day__label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
}

.poem-day__title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 8px;
    line-height: 1.3;
}

.poem-day__author {
    font-size: 16px;
    color: var(--brown-light);
    margin-bottom: 24px;
}

.poem-day__extract {
    font-family: var(--font-body);
    font-size: 18px;
    font-style: italic;
    line-height: 1.8;
    color: var(--brown);
    padding: 20px 0;
    margin-bottom: 24px;
    white-space: pre-line;
}

.poem-day__extract:empty {
    display: none;
}

.poem-day__link {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    transition: color var(--transition);
}

.poem-day__link:hover {
    color: var(--brown);
}

/* --------------------------------------------------------------------------
   Illustrations fables
   -------------------------------------------------------------------------- */
.illustration {
    text-align: center;
    margin: 24px auto 32px;
    max-width: 500px;
}

.illustration__img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background-color: var(--white);
    padding: 8px;
}

/* --------------------------------------------------------------------------
   Cards avec image
   -------------------------------------------------------------------------- */
.card--with-img {
    padding: 0;
    overflow: hidden;
}

.card--with-img .card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card--with-img h3,
.card--with-img p {
    padding: 0 24px;
}

.card--with-img h3 {
    padding-top: 16px;
}

.card--with-img p:last-child {
    padding-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Hero avec image
   -------------------------------------------------------------------------- */
.hero__img {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin: 0 auto 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero__img--portrait {
    max-width: 250px;
    border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Page 404
   -------------------------------------------------------------------------- */
.section-404 {
    padding: 100px 0;
    text-align: center;
    background-color: var(--rose-light);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.section-404__code {
    font-family: var(--font-heading);
    font-size: 120px;
    font-weight: 700;
    color: var(--brown);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.15;
}

.section-404 h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 32px;
}

.section-404__quote {
    max-width: 500px;
    margin: 0 auto 32px;
    padding: 24px 32px;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--rose);
}

.section-404__quote p {
    font-family: var(--font-body);
    font-size: 20px;
    font-style: italic;
    color: var(--brown);
    line-height: 1.6;
    margin-bottom: 8px;
}

.section-404__quote cite {
    font-size: 14px;
    color: var(--brown-light);
    font-style: normal;
}

.section-404__text {
    font-size: 17px;
    color: var(--brown-light);
    margin-bottom: 32px;
}

.section-404__links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Responsive — Tablette paysage (entre 769px et 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
