/* ==========================================================================
   KAROMA — GLOBAL CSS
   Règles communes à l'ensemble du site
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES
   ========================================================================== */

:root {

    /* ----------------------------------------------------------------------
       Couleurs
       ---------------------------------------------------------------------- */

    --primary: #6D28D9;
    --gold: #FFD700;

    --color-bg: #FFF8F0;
    --color-text: #333333;
    --color-border: #E5D6C8;
    --color-highlight: #D4B896;

    --color-accent-1: #6D28D9;
    --color-accent-2: #B48A5A;

    --violet: #9B7EBD;
    --violet-clair: #AF98CA;

    --vert: #B5C99A;
    --vert-fonce: #718355;


    /* ----------------------------------------------------------------------
       Polices
       ---------------------------------------------------------------------- */

    --spontane: "DancingScript", sans-serif;
    --font_gene: "Montserrat", sans-serif;


    /* ----------------------------------------------------------------------
       Dimensions générales
       ---------------------------------------------------------------------- */

    --header-height: 80px;
    --footer-height: 70px;

    --container-width: 1600px;


    /* ----------------------------------------------------------------------
       Espacements
       ---------------------------------------------------------------------- */

    --space-xs: 0.4rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
}


/* ==========================================================================
   2. RESET
   ========================================================================== */

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


html {
    font-size: 16px;
    scroll-behavior: smooth;
}


body {
    margin: 0;

    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);

    min-height: 100vh;

    background: var(--color-bg);
    color: var(--color-text);

    font-family: var(--font_gene);
    line-height: 1.6;

    overflow-x: clip;
}


img {
    max-width: 100%;
}


/* ==========================================================================
   3. FORMULAIRES
   ========================================================================== */

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}


/* ==========================================================================
   4. CONTENEUR PRINCIPAL
   ========================================================================== */

.container {
    width: min(95%, var(--container-width));

    margin-inline: auto;
    padding: 0;

    font-size: 1rem;
}

main,
.page-content,
.container {
    margin-bottom: 1rem;
}
/* ==========================================================================
   5. TYPOGRAPHIE MANUSCRITE
   ========================================================================== */

.spontane {

    font-family: var(--spontane);

    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;

    color: var(--violet);
}


.vert {
    color: var(--vert-fonce);
}


/* ==========================================================================
   6. SYSTÈME DE CONTENU KAROMA
   --------------------------------------------------------------------------
   Classes communes à toutes les pages.

   IMPORTANT :
   Les modifiers "--..." servent uniquement à modifier une variante.

   Exemple :

   class="content-card"
   class="content-card content-card--width-medium"
   class="content-row content-row--image-right"
   ========================================================================== */


/* ==========================================================================
   6.1 GRANDE INTRODUCTION
   ========================================================================== */

.section-intro {

    width: 100%;

    margin: var(--space-2xl) 0 var(--space-xl);

    padding: 1rem 1.5rem;

    background-color: rgba(244, 212, 182, 0.30);

    border-left: 5px solid var(--vert);
    border-radius: 8px;

    color: var(--color-text);

    font-family: var(--spontane);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: bold;

    line-height: 1.25;

    text-align: center;
}


/* ==========================================================================
   6.2 TITRE DE PAGE
   ========================================================================== */

.page-title {

    margin: 0.5rem 0 var(--space-2xl);

    color: #843fa1;

    font-family: var(--spontane);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: bold;

    line-height: 1.15;

    text-align: center;
}


/* ==========================================================================
   6.3 LIGNE DE CONTENU
   --------------------------------------------------------------------------
   Par défaut : une seule colonne.

   Les modifiers image-left / image-right créent deux colonnes.

   Le texte et l'image restent TOUJOURS dans leur propre espace.
   ========================================================================== */

.content-row {

    display: grid;

    grid-template-columns: minmax(0, 1fr);

    gap: var(--space-xl);

    width: 100%;

    margin-block: var(--space-xl);

    align-items: center;
}


/* --------------------------------------------------------------------------
   IMAGE À DROITE
   -------------------------------------------------------------------------- */

.content-row--image-right {

    grid-template-columns:
        minmax(0, 1fr)
        minmax(260px, 380px);

    grid-template-areas:
        "text image";
}


/* --------------------------------------------------------------------------
   IMAGE À GAUCHE
   -------------------------------------------------------------------------- */

.content-row--image-left {

    grid-template-columns:
        minmax(260px, 380px)
        minmax(0, 1fr);

    grid-template-areas:
        "image text";
}


/* --------------------------------------------------------------------------
   Éléments du contenu
   -------------------------------------------------------------------------- */

.content-row > .content-card,
.content-row > .content-stack {

    grid-area: text;
}


.content-row > .content-image {

    grid-area: image;
}


/* ==========================================================================
   6.4 GROUPE DE BLOCS
   --------------------------------------------------------------------------
   Permet par exemple de placer deux content-card empilés à côté
   d'une seule image.
   ========================================================================== */

.content-stack {

    display: flex;

    flex-direction: column;

    gap: var(--space-lg);

    min-width: 0;
}


/* ==========================================================================
   6.5 BLOC DE CONTENU
   ========================================================================== */

.content-card {

    width: 100%;

    padding: 1.5rem 2rem;

    background: white;

    border: 1px solid var(--color-border);
    border-top: 4px solid var(--violet);

    border-radius: 10px;

    box-shadow:
        0 5px 14px rgba(212, 184, 150, 0.18);

    color: var(--color-text);

    line-height: 1.75;

    min-width: 0;
}


/* --------------------------------------------------------------------------
   TITRE DU BLOC
   -------------------------------------------------------------------------- */

.content-card__title {

    margin: 0 0 1rem;

    color: var(--color-text);

    font-family: var(--spontane);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: bold;

    line-height: 1.2;

    text-align: center;
}


/* --------------------------------------------------------------------------
   SOUS-TITRE MANUSCRIT
   -------------------------------------------------------------------------- */

.content-card__subtitle {

    margin: 0 0 1rem;

    color: var(--violet);

    font-family: var(--spontane);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: bold;

    line-height: 1.2;
}


/* --------------------------------------------------------------------------
   Paragraphes
   -------------------------------------------------------------------------- */

.content-card p {

    margin: 0 0 1rem;
}


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


/* ==========================================================================
   6.6 VARIANTES DE LARGEUR DU BLOC
   ========================================================================== */

.content-card--width-small {
    width: 70%;
}


.content-card--width-medium {
    width: 85%;
}


.content-card--width-large {
    width: 100%;
}


/* ==========================================================================
   6.7 VARIANTES DE PADDING
   ========================================================================== */

.content-card--padding-small {
    padding: 1rem;
}


.content-card--padding-medium {
    padding: 1.5rem 2rem;
}


.content-card--padding-large {
    padding: 2.5rem 3rem;
}


/* ==========================================================================
   6.8 ALIGNEMENT DU BLOC
   ========================================================================== */

.content-card--align-left {
    justify-self: start;
}


.content-card--align-center {
    justify-self: center;
}


.content-card--align-right {
    justify-self: end;
}


/* ==========================================================================
   6.9 DÉCALAGES VISUELS DU BLOC
   --------------------------------------------------------------------------
   transform ne supprime PAS l'espace réservé par le Grid.
   ========================================================================== */

.content-card--offset-left {
    transform: translateX(-5%);
}


.content-card--offset-right {
    transform: translateX(5%);
}


.content-card--offset-up {
    transform: translateY(-2rem);
}


.content-card--offset-down {
    transform: translateY(2rem);
}


/* --------------------------------------------------------------------------
   Combinaisons utiles
   -------------------------------------------------------------------------- */

.content-card--offset-right-up {
    transform: translate(5%, -2rem);
}


.content-card--offset-left-up {
    transform: translate(-5%, -2rem);
}


.content-card--offset-right-down {
    transform: translate(5%, 2rem);
}


.content-card--offset-left-down {
    transform: translate(-5%, 2rem);
}


/* ==========================================================================
   6.10 VARIANTES DE COULEUR
   ========================================================================== */

.content-card--green {
    border-top-color: var(--vert);
}


.content-card--violet {
    border-top-color: var(--violet);
}


/* ==========================================================================
   6.11 BLOC SIMPLE SANS CADRE
   --------------------------------------------------------------------------
   Toujours un content-card, mais sans aspect "encart".
   ========================================================================== */

.content-card--plain {

    background: transparent;

    border: none;

    border-radius: 0;

    box-shadow: none;

    padding-inline: 0;
}


/* ==========================================================================
   6.12 IMAGE
   ========================================================================== */

.content-image {

    display: block;

    width: 100%;
    max-width: 380px;

    height: auto;

    justify-self: center;

    padding: 0.7rem;

    background: transparent;

    border: 1px solid var(--color-border);

    border-radius: 10px;

    box-shadow:
        0 10px 28px rgba(212, 184, 150, 0.30);

    object-fit: contain;

    min-width: 0;
}


/*
   Si le HTML utilise un <figure> autour de l'image.
*/

figure.content-image {
    margin-block: 0;
}


/*
   Image située dans un cadre content-image.
*/

.content-image__img {

    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;

    border-radius: 6px;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.15);
}


/* ==========================================================================
   6.13 TAILLES D'IMAGE
   ========================================================================== */

.content-image--small {
    max-width: 260px;
}


.content-image--medium {
    max-width: 340px;
}


.content-image--large {
    max-width: 460px;
}


/* ==========================================================================
   6.14 DÉCALAGES DE L'IMAGE
   ========================================================================== */

.content-image--offset-left {
    transform: translateX(-5%) rotate(1.5deg);
}


.content-image--offset-right {
    transform: translateX(5%) rotate(1.5deg);
}


.content-image--offset-up {
    transform: translateY(-2rem) rotate(1.5deg);
}


.content-image--offset-down {
    transform: translateY(2rem) rotate(1.5deg);
}


.content-image--offset-right-up {
    transform: translate(5%, -2rem) rotate(1.5deg);
}


.content-image--offset-left-up {
    transform: translate(-5%, -2rem) rotate(1.5deg);
}


/* ==========================================================================
   6.15 LARGEUR DES COLONNES
   ========================================================================== */

.content-row--image-large {

    grid-template-columns:
        minmax(0, 1fr)
        minmax(360px, 500px);
}


.content-row--image-small {

    grid-template-columns:
        minmax(0, 1fr)
        minmax(220px, 280px);
}


/* Pour image à gauche */

.content-row--image-left.content-row--image-large {

    grid-template-columns:
        minmax(360px, 500px)
        minmax(0, 1fr);
}


.content-row--image-left.content-row--image-small {

    grid-template-columns:
        minmax(220px, 280px)
        minmax(0, 1fr);
}


/* ==========================================================================
   6.16 ESPACEMENT ENTRE COLONNES
   ========================================================================== */

.content-row--gap-small {
    column-gap: 1rem;
}


.content-row--gap-medium {
    column-gap: 2rem;
}


.content-row--gap-large {
    column-gap: 4rem;
}


.content-row--gap-xl {
    column-gap: 6rem;
}


/* ==========================================================================
   6.17 DÉCALAGE GLOBAL DE LA COMPOSITION
   ========================================================================== */

.content-row--offset-left {
    transform: translateX(-5%);
}


.content-row--offset-right {
    transform: translateX(5%);
}


/* ==========================================================================
   6.18 LISTES
   ========================================================================== */

.content-list {

    margin: var(--space-lg) auto;

    padding-left: 1.5rem;

    line-height: 1.8;
}


.content-list li {
    margin-bottom: 0.5rem;
}


.content-list li:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   6.19 BLOC MIS EN ÉVIDENCE
   ========================================================================== */

.highlight-block {

    width: min(100%, 900px);

    margin: var(--space-2xl) auto;

    padding: 1.5rem 2rem;

    background: rgba(181, 201, 154, 0.18);

    border-left: 5px solid var(--vert-fonce);

    border-radius: 10px;

    color: var(--vert-fonce);

    font-family: var(--spontane);
    font-size: clamp(1.6rem, 3vw, 2.2rem);

    line-height: 1.4;
}


/* --------------------------------------------------------------------------
   Variante étapes
   -------------------------------------------------------------------------- */

.highlight-block--steps p {
    margin: 0 0 1rem;
}


.highlight-block--steps p:last-child {
    margin-bottom: 0;
}


.highlight-block--steps p:nth-child(2) {
    margin-left: 3rem;
}


.highlight-block--steps p:nth-child(3) {
    margin-left: 6rem;
}


/* ==========================================================================
   6.20 TEXTE ACCENTUÉ
   ========================================================================== */

.text-accent {
    color: var(--violet);
}


.text-accent--green {
    color: var(--vert-fonce);
}


/* ==========================================================================
   7. BOUTONS KAROMA
   ========================================================================== */

.bio-btn {

    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.8rem 1.4rem;

    border: none;
    border-radius: 8px;

    background: var(--violet);
    color: white;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.bio-btn:hover {

    background: var(--violet-clair);
    color: var(--gold);

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}


.bio-btn:active {
    transform: translateY(0);
}


/* ==========================================================================
   8. FOOTER
   ========================================================================== */

@media (max-width: 768px) {

    footer {

        bottom: env(safe-area-inset-bottom);

        height: auto !important;
        min-height: 70px;

        padding: 8px 5px !important;
        padding-bottom: env(safe-area-inset-bottom);

        box-sizing: border-box;
    }


    footer p {

        margin: 0;
        padding: 0;

        line-height: 1.3;
    }


    footer .home-contact-mail {

        display: block;

        margin-top: 5px;
    }


    footer .home-contact-mail .bio-btn {

        margin-left: 0 !important;

        padding: 0.45rem 0.8rem;

        font-size: 0.75rem;
    }
}


/* ==========================================================================
   9. RESPONSIVE GLOBAL
   ========================================================================== */


/* --------------------------------------------------------------------------
   TABLETTE
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {

    body {
        padding-top: 120px;
    }


    .container {
        width: 92%;
    }


    .content-row--image-right,
    .content-row--image-left {

        column-gap: 2rem;
    }
}


/* --------------------------------------------------------------------------
   PETITE TABLETTE
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {

    body {
        padding-top: 150px;
    }


    .content-row--image-right,
    .content-row--image-left {

        grid-template-columns:
            minmax(0, 1fr)
            minmax(240px, 320px);
    }


    .content-row--image-left {

        grid-template-columns:
            minmax(240px, 320px)
            minmax(0, 1fr);
    }


    .content-card--width-small {
        width: 85%;
    }
}


/* --------------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {

    body {

        padding-top: 100px;
        padding-bottom: 120px;

        min-height: 100dvh;

        overflow-x: clip;
    }


    .container {
        width: 94%;
    }


    .spontane {
        font-size: 2rem;
    }


    /* ----------------------------------------------------------------------
       Toutes les compositions passent en une colonne
       ---------------------------------------------------------------------- */

    .content-row,
    .content-row--image-right,
    .content-row--image-left {

        display: grid;

        grid-template-columns: 1fr;

        grid-template-areas:
            "text"
            "image";

        gap: var(--space-lg);

        width: 100%;

        transform: none;
    }


    /*
       Sur mobile, l'image reste après le texte pour image-right.
    */

    .content-row--image-right {

        grid-template-areas:
            "text"
            "image";
    }


    /*
       Pour image-left, on conserve l'idée "image à gauche"
       en la faisant passer avant le texte.
    */

    .content-row--image-left {

        grid-template-areas:
            "image"
            "text";
    }


    .content-row > .content-card,
    .content-row > .content-stack {

        grid-area: text;
    }


    .content-row > .content-image {

        grid-area: image;
    }


    /* ----------------------------------------------------------------------
       Cartes
       ---------------------------------------------------------------------- */

    .content-card,
    .content-card--width-small,
    .content-card--width-medium,
    .content-card--width-large {

        width: 100%;

        padding: 1.2rem;
    }


    .content-card--padding-small,
    .content-card--padding-medium,
    .content-card--padding-large {

        padding: 1.2rem;
    }


    .content-card--offset-left,
    .content-card--offset-right,
    .content-card--offset-up,
    .content-card--offset-down,
    .content-card--offset-right-up,
    .content-card--offset-left-up,
    .content-card--offset-right-down,
    .content-card--offset-left-down {

        transform: none;
    }


    /* ----------------------------------------------------------------------
       Images
       ---------------------------------------------------------------------- */

    .content-image,
    .content-image--small,
    .content-image--medium,
    .content-image--large {

        width: min(94%, 360px);

        max-width: 360px;

        justify-self: center;
    }


    .content-image--offset-left,
    .content-image--offset-right,
    .content-image--offset-up,
    .content-image--offset-down,
    .content-image--offset-right-up,
    .content-image--offset-left-up {

        transform: rotate(1deg);
    }


    /* ----------------------------------------------------------------------
       Introduction
       ---------------------------------------------------------------------- */

    .section-intro {

        margin-top: 2rem;
        margin-bottom: 2rem;

        padding: 1rem;

        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }


    .page-title {

        margin-bottom: 2rem;

        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }


    /* ----------------------------------------------------------------------
       Listes
       ---------------------------------------------------------------------- */

    .content-list {
        padding-left: 1.2rem;
    }


    /* ----------------------------------------------------------------------
       Highlight
       ---------------------------------------------------------------------- */

    .highlight-block {

        width: 100%;

        padding: 1rem;

        font-size: clamp(1.5rem, 6vw, 2rem);
    }


    .highlight-block--steps p:nth-child(2),
    .highlight-block--steps p:nth-child(3) {

        margin-left: 0;
    }
}


/* --------------------------------------------------------------------------
   PETIT MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {

    body {
        padding-top: 95px;
    }


    .container {
        width: 94%;
    }


    .spontane {
        font-size: 1.8rem;
    }


    .content-row {
        gap: 1.25rem;
        margin-block: 1.5rem;
    }


    .content-card {

        padding: 1rem;

        border-radius: 8px;
    }


    .content-card__title {
        font-size: 2rem;
    }


    .content-card__subtitle {
        font-size: 1.8rem;
    }


    .content-image {

        width: 94%;

        padding: 0.5rem;
    }


    .content-list {

        font-size: 0.95rem;

        line-height: 1.7;
    }
}


/* --------------------------------------------------------------------------
   TRÈS PETIT MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 360px) {

    body {
        padding-top: 90px;
    }


    .container {
        width: 94%;
    }


    .spontane {
        font-size: 1.7rem;
    }


    .content-card__title {
        font-size: 1.8rem;
    }


    .content-card__subtitle {
        font-size: 1.6rem;
    }
}
/* ==========================================================
   IMAGES — RESPONSIVE
   ========================================================== */

.content-image {
    width: 100%;
    max-width: 380px;
}

.content-image__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}


/* Tablette */
@media (max-width: 900px) {
    .content-image {
        max-width: 320px;
    }
}


/* Smartphone */
@media (max-width: 768px) {
    .content-image {
        width: 80%;
        max-width: 280px;
        justify-self: center;
    }

    .content-image__img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}


/* Petit smartphone */
@media (max-width: 480px) {
    .content-image {
        width: 75%;
        max-width: 230px;
    }
}


/* Très petit smartphone */
@media (max-width: 360px) {
    .content-image {
        width: 70%;
        max-width: 200px;
    }
}

/* ==========================================================================
   10. DÉCORATION — PLUIE
   ========================================================================== */

#pluie-eau {

    position: absolute;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;
}


.goutte-eau {

    position: absolute;

    top: 0;

    background: linear-gradient(
        135deg,
        #fff36a 0%,
        #c8df3f 45%,
        #72ad3c 100%
    );

    clip-path: polygon(
        50% 0%,
        72% 25%,
        100% 60%,
        92% 80%,
        75% 94%,
        50% 100%,
        25% 94%,
        8% 80%,
        0% 60%,
        28% 25%
    );

    pointer-events: none;
}

