/* ============================================================
VARIABLES
============================================================ */

:root {
--bg: #f7faf8;
--card: #ffffff;


--text: #1f2d26;
--muted: #68766f;

--border: #dce8e1;

--green: #16875a;
--green-dark: #0f6845;
--green-light: #e7f5ee;

--accent: #5fba8b;

--shadow:
    0 10px 30px
    rgba(22, 80, 55, 0.07);


}

/* ============================================================
RESET
============================================================ */

* {
  box-sizing: border-box;
  }

html {
scroll-behavior: smooth;
}

body {
margin: 0;


background: var(--bg);

color: var(--text);

font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;


}

/* ============================================================
CONTENEUR PRINCIPAL
============================================================ */

.site {
width:
min(
calc(100% - 40px),
1180px
);


margin: 0 auto;


}

/* ============================================================
HEADER
============================================================ */

header {
padding: 22px 0 30px;
}

.topbar {
display: flex;


justify-content: space-between;

align-items: center;


}

/* ============================================================
LOGO
============================================================ */

.logo {
display: flex;


align-items: center;

color: var(--text);

text-decoration: none;

font-size: 1.25rem;

font-weight: 750;


}

.logo-mark {
display: inline-flex;


width: 34px;
height: 34px;

align-items: center;
justify-content: center;

margin-right: 8px;

border-radius: 9px;

background: var(--green);

color: white;

box-shadow:
    0 4px 10px
    rgba(22, 135, 90, 0.18);


}

/* ============================================================
NAVIGATION
============================================================ */

.main-nav {
display: flex;


gap: 5px;


}

.main-nav a {
padding: 8px 12px;


border-radius: 7px;

color: var(--muted);

text-decoration: none;

font-size: 0.85rem;

transition:
    background 0.2s ease,
    color 0.2s ease;


}

.main-nav a:hover {
background: var(--green-light);


color: var(--green);


}

/* ============================================================
INTRODUCTION
============================================================ */

.intro {
max-width: 760px;


margin: 30px auto 0;

text-align: center;


}

.intro h1 {
margin: 0;


font-size:
    clamp(
        2rem,
        4vw,
        3rem
    );

line-height: 1.15;

letter-spacing: -1.5px;


}

.intro h1 span {
color: var(--green);
}

.intro p {
max-width: 650px;


margin: 10px auto 0;

color: var(--muted);

line-height: 1.5;


}

/* ============================================================
MOTEUR DE RECHERCHE
============================================================ */

.search-panel {
max-width: 900px;


margin: 22px auto 0;


}

.search-form {
display: grid;


grid-template-columns:
    minmax(200px, 1fr)
    230px
    125px;

gap: 8px;


}

.search-input,
.category-select {
width: 100%;


height: 50px;

padding: 0 15px;

border:
    1px solid
    var(--border);

border-radius: 9px;

outline: none;

background: var(--card);

color: var(--text);

font-family: inherit;

font-size: 0.9rem;

transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;


}

.search-input:focus,
.category-select:focus {
border-color: var(--accent);


box-shadow:
    0 0 0 3px
    rgba(95, 186, 139, 0.14);


}

/* ============================================================
BOUTON RECHERCHE
============================================================ */

.search-button {
height: 50px;


border: none;

border-radius: 9px;

background: var(--green);

color: white;

font-family: inherit;

font-weight: 700;

cursor: pointer;

transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;


}

.search-button:hover {
background: var(--green-dark);


transform: translateY(-1px);

box-shadow:
    0 5px 14px
    rgba(22, 135, 90, 0.18);


}

/* ============================================================
EFFACER LA RECHERCHE
============================================================ */

.reset-search {
display: inline-block;


margin-top: 10px;

color: var(--muted);

text-decoration: none;

font-size: 0.78rem;

transition:
    color 0.2s ease;


}

.reset-search:hover {
color: var(--green);
}

/* ============================================================
EN-TÊTE DES RÉSULTATS
============================================================ */

.results-header {
display: flex;


justify-content: space-between;

align-items: center;

margin: 28px 0 20px;


}

.results-title {
margin: 0;


font-size: 1.15rem;


}

.results-count {
color: var(--muted);


font-size: 0.8rem;


}

/* ============================================================
GRILLE DES QUESTIONS
============================================================ */

.quiz-container {
display: grid;


grid-template-columns:
    repeat(3, 1fr);

gap: 20px;


}

/* ============================================================
CARTE DE QUESTION
============================================================ */

.quiz-card {
display: flex;


flex-direction: column;

min-height: 350px;

padding: 26px;

border:
    1px solid
    var(--border);

border-radius: 14px;

background: var(--card);

box-shadow: var(--shadow);

transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;


}

.quiz-card:hover {
border-color: #cfe0d6;


box-shadow:
    0 15px 35px
    rgba(22, 80, 55, 0.10);


}

/* ============================================================
CATÉGORIE
============================================================ */

.badge {
margin-bottom: 20px;


color: var(--green);

font-size: 0.68rem;

font-weight: 750;

text-transform: uppercase;

letter-spacing: 0.8px;


}

/* ============================================================
QUESTION
============================================================ */

.question-text {
margin: 0 0 25px;


font-size: 1.2rem;

font-weight: 650;

line-height: 1.5;


}

/* ============================================================
RÉPONSE
============================================================ */

.reponse-box {
display: none;


margin-bottom: 20px;

padding: 16px;

border-radius: 9px;

background: var(--green-light);

color: #46554d;

font-size: 0.9rem;

line-height: 1.6;


}

.reponse-box strong {
display: block;


margin-bottom: 5px;

color: var(--green-dark);

font-size: 0.7rem;

text-transform: uppercase;

letter-spacing: 0.7px;


}

/* ============================================================
BOUTONS
============================================================ */

.btn {
width: 100%;


margin-top: auto;

padding: 12px;

border:
    1px solid
    var(--green);

border-radius: 8px;

background: transparent;

color: var(--green);

font-family: inherit;

font-size: 1rem;

font-weight: 700;

line-height: normal;

text-align: center;

text-decoration: none;

cursor: pointer;

transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;


}

.btn:hover {
background: var(--green);


color: white;

box-shadow:
    0 4px 12px
    rgba(22, 135, 90, 0.15);


}

/* ============================================================
EN SAVOIR PLUS
============================================================ */

.en-savoir-plus {
width: 100%;


margin-top: 10px;


}

.en-savoir-plus-link {
display: block;


width: 100%;

padding: 12px;

border:
    1px solid
    var(--green);

border-radius: 8px;

background: transparent;

color: var(--green);

font-family: inherit;

font-size: 1rem;

font-weight: 700;

line-height: normal;

text-align: center;

text-decoration: none;

cursor: pointer;

transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;


}

.en-savoir-plus-link:hover {
background: var(--green);


color: white;

box-shadow:
    0 4px 12px
    rgba(22, 135, 90, 0.15);


}

/* ============================================================
AUCUN RÉSULTAT
============================================================ */

.no-results {
grid-column: 1 / -1;


padding: 70px 20px;

color: var(--muted);

text-align: center;


}

.no-results strong {
display: block;


margin-bottom: 8px;

color: var(--text);

font-size: 1.1rem;


}

/* ============================================================
PAGINATION
============================================================ */

.pagination {
display: flex;


justify-content: center;

flex-wrap: wrap;

gap: 6px;

margin: 40px 0;


}

.pagination a {
display: flex;


min-width: 38px;

height: 38px;

align-items: center;

justify-content: center;

padding: 0 10px;

border:
    1px solid
    var(--border);

border-radius: 7px;

background: var(--card);

color: var(--text);

text-decoration: none;

font-size: 0.85rem;

transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;


}

.pagination a:hover {
border-color: var(--accent);


color: var(--green);

background: var(--green-light);


}

.pagination a.active {
border-color: var(--green);


background: var(--green);

color: white;


}

/* ============================================================
BOUTON NOUVELLES QUESTIONS
============================================================ */

.reload-area {
display: flex;


justify-content: center;

padding: 50px 0 75px;


}

.btn-reload {
width: auto;


padding: 13px 25px;

background: var(--green);

color: white;

box-shadow:
    0 5px 15px
    rgba(22, 135, 90, 0.12);


}

.btn-reload:hover {
background: var(--green-dark);
}

/* ============================================================
PAGE QUESTION
DESIGN ÉDITORIAL
============================================================ */

.question-page {
max-width: 850px;


margin: 25px auto 70px;

padding: 0 10px;


}

/* ============================================================
FIL D'ARIANE
============================================================ */

.breadcrumb {
display: flex;


align-items: center;

flex-wrap: wrap;

gap: 8px;

margin: 10px 0 28px;

color: var(--muted);

font-size: 0.82rem;


}

.breadcrumb a {
color: var(--green);


text-decoration: none;

font-weight: 600;

transition:
    color 0.2s ease,
    opacity 0.2s ease;


}

.breadcrumb a:hover {
color: var(--green-dark);


text-decoration: underline;


}

.breadcrumb span:not(:last-child) {
color: var(--muted);
}

.breadcrumb span:last-child {
color: var(--text);


font-weight: 500;


}

/* ============================================================
BADGE / CATÉGORIE
============================================================ */

.question-page > .badge {
display: inline-block;


margin: 0 0 14px;

padding: 6px 11px;

border-radius: 6px;

background: var(--green-light);

color: var(--green-dark);

font-size: 0.7rem;

font-weight: 750;

letter-spacing: 0.7px;

text-transform: uppercase;


}

/* ============================================================
TITRE PRINCIPAL
============================================================ */

.question-page h1 {
margin: 0 0 22px;


color: var(--text);

font-size:
    clamp(
        1.9rem,
        4vw,
        2.7rem
    );

font-weight: 750;

line-height: 1.25;

letter-spacing: -0.8px;


}

/* ============================================================
INTRODUCTION PRINCIPALE
============================================================ */

.question-introduction {
margin: 0 0 35px;


padding: 20px 22px;

border-left:
    4px solid
    var(--accent);

border-radius: 0 9px 9px 0;

background: var(--green-light);

color: #46554d;

font-size: 1rem;

line-height: 1.75;


}

/* ============================================================
BLOCS ÉDITORIAUX
============================================================ */

.question-answer,
.editorial-content {
margin: 0 0 30px;


padding: 30px;

border:
    1px solid
    var(--border);

border-radius: 14px;

background: var(--card);

box-shadow: var(--shadow);


}

/* ============================================================
TITRES H2
============================================================ */

.question-answer h2,
.editorial-content h2 {
margin: 0 0 22px;


padding-bottom: 13px;

border-bottom:
    1px solid
    var(--border);

color: var(--text);

font-size: 1.35rem;

font-weight: 750;

line-height: 1.35;


}

/* ============================================================
CONTENU DE LA RÉPONSE
============================================================ */

.answer-content {
color: #46554d;


font-size: 1rem;

line-height: 1.8;


}

/* ============================================================
CONTENU ÉDITORIAL
============================================================ */

.editorial-text {
color: #46554d;


font-size: 0.98rem;

line-height: 1.8;


}

/* ============================================================
INTRODUCTION ÉDITORIALE
============================================================ */

.editorial-text .editorial-intro {
margin: 0 0 28px;


padding: 18px 20px;

border-left:
    3px solid
    var(--accent);

border-radius: 0 8px 8px 0;

background:
    #f4faf7;

color: #46554d;

font-size: 1rem;

line-height: 1.8;


}

/* ============================================================
TITRES H3 DU CONTENU ÉDITORIAL
============================================================ */

.editorial-text h3 {
margin: 32px 0 12px;


color: var(--text);

font-size: 1.12rem;

font-weight: 700;

line-height: 1.45;


}

.editorial-text h3:first-child {
margin-top: 0;
}

/* ============================================================
PARAGRAPHES DU CONTENU ÉDITORIAL
============================================================ */

.editorial-text p {
margin: 0 0 20px;


color: #46554d;

font-size: 0.98rem;

line-height: 1.8;


}

.editorial-text p:last-child {
margin-bottom: 0;
}

/* ============================================================
LIENS ÉVENTUELS DU CONTENU ÉDITORIAL
============================================================ */

.editorial-text a {
color: var(--green);


text-decoration: underline;

text-decoration-thickness: 1px;

text-underline-offset: 2px;


}

.editorial-text a:hover {
color: var(--green-dark);
}

/* ============================================================
NAVIGATION RETOUR
============================================================ */

.question-navigation {
display: flex;


justify-content: center;

align-items: center;

margin: 45px 0 20px;

padding: 10px 0 20px;


}

.question-navigation .btn {
display: inline-flex;


width: auto;

min-width: 230px;

min-height: 46px;

align-items: center;

justify-content: center;

margin: 0;

padding: 12px 24px;

text-align: center;

text-decoration: none;


}

/* ============================================================
PAGE 404
============================================================ */

.question-page + .no-results {
margin: 60px auto;


padding: 60px 25px;


}

.no-results .btn {
display: inline-flex;


width: auto;

min-width: 210px;

align-items: center;

justify-content: center;

margin-top: 25px;

text-decoration: none;


}

/* ============================================================
FOOTER
============================================================ */

footer {
padding: 25px 0 35px;


border-top:
    1px solid
    var(--border);

color: var(--muted);

font-size: 0.75rem;

text-align: center;


}

/* ============================================================
TABLETTES
============================================================ */

@media (
max-width: 900px
) {


.quiz-container {
    grid-template-columns:
        repeat(2, 1fr);
}

.search-form {
    grid-template-columns:
        1fr
        200px;
}

.search-button {
    grid-column: 1 / -1;
}


}

/* ============================================================
MOBILE
============================================================ */

@media (
max-width: 650px
) {


.site {
    width:
        calc(
            100% - 28px
        );
}


header {
    padding:
        18px 0 25px;
}


.main-nav {
    display: none;
}


.intro {
    margin-top: 35px;
}


.intro h1 {
    font-size: 2.1rem;
}


.intro p {
    margin-top: 12px;

    line-height: 1.6;
}


.search-panel {
    margin-top: 24px;
}


.search-form {
    grid-template-columns: 1fr;
}


.search-button {
    grid-column: auto;
}


.quiz-container {
    grid-template-columns: 1fr;
}


.results-header {
    align-items: flex-start;

    flex-direction: column;

    gap: 7px;
}


.quiz-card {
    min-height: 320px;

    padding: 23px;
}


.reload-area {
    padding: 40px 0 60px;
}


/* --------------------------------------------------------
   PAGE QUESTION MOBILE
-------------------------------------------------------- */

.question-page {
    margin:
        15px auto 50px;

    padding: 0;
}


.breadcrumb {
    margin:
        5px 0 22px;

    font-size: 0.78rem;

    line-height: 1.5;
}


.question-page h1 {
    margin-bottom: 20px;

    font-size: 1.75rem;

    line-height: 1.3;
}


.question-introduction {
    margin-bottom: 25px;

    padding: 17px 18px;

    font-size: 0.92rem;

    line-height: 1.7;
}


.question-answer,
.editorial-content {
    margin-bottom: 20px;

    padding:
        22px 19px;

    border-radius: 12px;
}


.question-answer h2,
.editorial-content h2 {
    margin-bottom: 18px;

    font-size: 1.2rem;
}


.answer-content {
    font-size: 0.94rem;

    line-height: 1.75;
}


.editorial-text {
    font-size: 0.94rem;

    line-height: 1.75;
}


.editorial-text .editorial-intro {
    margin-bottom: 23px;

    padding:
        15px 16px;

    font-size: 0.94rem;

    line-height: 1.75;
}


.editorial-text h3 {
    margin:
        27px 0 10px;

    font-size: 1.05rem;

    line-height: 1.45;
}


.editorial-text p {
    margin-bottom: 18px;

    font-size: 0.94rem;

    line-height: 1.75;
}


.question-navigation {
    margin:
        35px 0 15px;

    padding:
        10px 0 20px;
}


.question-navigation .btn {
    width: 100%;

    min-width: 0;
}


}
