/* =========================================================
   RESET ET VARIABLES
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-turquoise: #1aa6a6;
    --color-turquoise-dark: #0f6f74;
    --color-coral: #f27d72;

    --page-background: #f7f7f7;
    --text-color: #333;
    --card-radius: 18px;
    --card-gap: 20px;
    --page-width: 1420px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--page-background);
    color: var(--text-color);
    font-family: "Gideon Roman", Arial, sans-serif;
}


/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */

.font-page {
    width: min(100% - 40px, var(--page-width));
    margin-inline: auto;
    padding-block: 50px 80px;
}

.colors-intro {
    width: min(850px, 100%);
    margin: 0 auto 2rem;
    text-align: center;
}

.colors-intro p {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.65;
}


/* =========================================================
   TITRES
   ========================================================= */

h1,
h2 {
    width: 100%;
    text-align: center;
}

h1 {
    margin: 0 0 1.5rem;
    font-family: "Gideon Roman", serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-turquoise-dark);
}

h2 {
    margin: 0;
    font-family: "Gideon Roman", serif;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-turquoise-dark);
}

.chapter-heading {
    width: 100%;
    margin: 2rem auto;
    text-align: center;
}

.chapter-heading h2 {
    margin: 0 0 1rem;
}


/* =========================================================
   GRILLE DES CARTES
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--card-gap);
    width: 100%;
    margin-inline: auto;
}

.card {
    min-width: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
     text-align: center;
}


/* =========================================================
   CARTES DE COULEURS
   ========================================================= */

.color-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 250px;
    padding: clamp(20px, 2vw, 28px);
    overflow: hidden;

    border: 0;
    background: var(--card-bg);
    color: var(--text-color, var(--card-text));
    transition:
        background-color 220ms ease,
        color 220ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.color-card:hover {
    background: var(--card-hover-bg, var(--card-bg));
    color: var(--card-hover-text, var(--text-color, var(--card-text)));
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.color-swatch {
    display: none;
}

.color-info {
    padding: 0;
}

.color-info .name {
    margin: 0 0 12px;
    color: inherit;
    font-family: "Geist", Arial, sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    font-weight: 500;
     text-align: center;
}

.color-values {
    display: flex;
    flex-wrap: wrap;
     justify-content: center;
    gap: 8px;
    margin: 0;
   
}

.color-values code {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.12);
    color: inherit;

    font-family: "Geist", monospace;
    font-size: 0.8rem;
    line-height: 1.2;
}


/* =========================================================
   POÈMES
   ========================================================= */

.color-poem {
    padding: 14px 0 0;
    border: 0;
    background: transparent;
}

.color-poem h3 {
    margin: 0 0 14px;
    color: inherit;
    font-family: "Gideon Roman", serif;
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    line-height: 1.2;
}

.color-poem p {
    margin: 0 ;
    color: inherit;
    font-family: "Gideon Roman", serif;
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    font-style: normal;
    line-height: 1.35;
    white-space: pre-line;
    text-align: left;
}

.swatch-light {
    box-shadow: inset 0 0 0 1px rgba(20, 48, 55, 0.08);
}


/* =========================================================
   SÉPARATEURS
   ========================================================= */

.separator1,
.separator2 {
    position: relative;
    width: min(490px, 70%);
    height: 1px;
    margin-inline: auto;
}

.separator1 {
    margin-block: 3rem;
    background: var(--color-turquoise);
}

.separator2 {
    margin-block: 0;
    background: var(--color-turquoise);
}

.separator1::after,
.separator2::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;

    padding-inline: 0.7rem;
    transform: translate(-50%, -55%);

    background: var(--page-background);
    color: var(--color-turquoise);
    font-size: 0.8rem;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .font-page {
        width: min(100% - 28px, var(--page-width));
        padding-block: 35px 60px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .color-card {
        min-height: 280px;
        padding: 22px;
    }

    .separator1 {
        margin-block: 2.4rem;
    }

    .chapter-heading {
        margin-block: 1.5rem;
    }
}

.color-info .name,
.color-values code,
.color-poem h3,
.color-poem p {
    color: inherit;
}
