@font-face {
    font-family: "Ultra";
    src: url('../sources/Fonts/Ultra-Regular.ttf') format('truetype');
    font-weight: 400;
}

/*-----------------------------------------------STYLES GÉNÉRAUX-----------------------------------------------*/
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* masque le contenu qui dépasse les bords horizontaux */
    width: 100%;
}

body {
   /* max-width: 900px;*/
    margin: 0 auto;
}

main {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    overflow: clip;
    position: relative; /* ancre pour #blue-accueil, les coordonnées sont calculées depuis lui */
    min-height: 100vh;  /* minimum toute la hauteur de l'écran, s'étire si le contenu est plus grand */
    /*background-color: white;*/
}

header {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 16px;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10; /* au-dessus du slideur */
}

button {
    padding: 0;
}

h1, h2 {
    font-family: 'Ultra', sans-serif;
    font-weight: 400;
    color: #212121;
}

h1 {
    font-size: 2.375rem;
    line-height: 42px;
}

h2 {
    font-size: 2rem;
    line-height: 52px;
}

h3 {
    font-size: 1.25rem;
    line-height: 26px;
    font-weight: 600;
}


h3,h4,h5,h6, p, a, ul, ol, small {
    font-family: 'Outfit', sans-serif;
}
p {
    line-height: 26px;
    font-size: 1.125rem;
}

a {
    text-decoration: none;
    font-size: 0.875rem;
    color: inherit;
}

a:visited {
    color: inherit;
}
ul {
    list-style: none;
    padding-inline-start: 0;
}

/*-----------------------------------------------STYLES HEADER-----------------------------------------------*/

.btn-recherche svg,
.btn-compte svg,
.btn-menu svg {
    width: 32px;
    height: 32px;
}

.logo, .logo svg {
    width: 50px;
    height: 32px;
}

.btn-menu {
    cursor: pointer; /* remplace le curseur par une main */
}

.btn-compte, .btn-menu {
    max-width: 32px;
    max-height: 32px;
}
.btn-menu, .search-bar input {
    border: none;        /* On supprime le cadre standard */
    outline: none;       /* Supprimer le cadre bleu lorsque le curseur est sur l'élément */
    background: none;    /* arrière-plan hérité du parent */
}

.search-bar {
    display: flex;
    align-items: center;
    border-radius: 50px;
    box-shadow: 0 0 16px 0 rgba(153, 153, 153, 0.23);
    gap: 5px;
    background: white;
    min-width: 200px;
    height: 44px;
    flex: 1;
    padding: 4px 8px 4px 16px;
}

.search-bar input {
    font-size: 16px;
    min-width: 40px;
    flex: 1;
}

.btn-recherche {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #FFC412;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.btn-recherche svg {
    color: #202020;
    margin: 6px;
}

/*--------------------------------------------STYLES MENU DE NAVIGATION--------------------------------------------*/

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;        /* masqué derrière le bord droit */
    width: 75%;
    max-width: 320px;
    height: 100%;
    background: linear-gradient(135deg, #FFC412, white, #12DFFF);
    z-index: 100;
    transition: right 0.3s ease;
    padding: 24px;
}

.nav-menu.open {
    right: 0;            /* sort */
}

.nav-menu ul {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-menu ul li a {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.5rem;
    font-weight: 500;
    color: #202020;
    font-family: 'Ultra', sans-serif;
}
.nav-menu ul li a img {
    width: 20px;
    height: 20px;
}

.btn-close {
    position: absolute;
    top: 26px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-close svg {
    width: 32px;
    height: 32px;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    background: rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/*-----------------------------------------------STYLES MAIN-----------------------------------------------*/

.page-wrapper {
    position: relative;
    overflow: hidden; /* découpe le cercle*/
}

main > h1 + p {
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

main > h1 {
    text-align: center;
}

.hero-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    height: 100vh;
}

.hero-slider::-webkit-scrollbar {
    display: none;
}

.slide {
    overflow: hidden;
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    background-size: cover;
    background-position: center;
    position: relative; /* ancre pour le contenu */
}

.slide img, .block-carte-recettes img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;    /* s'étend sur tout le bloc */
    object-position: center top;
    z-index: -1;
}

.slide-1 img {
    object-position: right center; /* déplace la zone visible vers la gauche */
}

.slide::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            to bottom,
            white 0%,       /* on conserve le blanc jusqu'à 0 % */
            rgba(255,255,255, 0.7) 23%,  /* début d'une transition abrupte */
            rgba(255,255,255, 0.35) 50%,   /* tombe rapidement */
            rgba(255,255,255, 0.1) 70%,   /* ralentit */
            transparent 85%  /* le dégradé s'estompe progressivement */
    );
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2; /* par-dessus l'image et le dégradé */
    margin-top: 150px; /* Fin de l'en-tête */
    text-align: center;
}

.slide-content svg {
    position: absolute; /* extraire du flux */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* centrer au milieu du contenu */
    z-index: -1;
    width: 160%;
    height: 160%;
}

.slide-content h1, .slide-content p {
    margin: 8px auto;
}
.slide-content h1 {
    width: 335px;
    text-transform: uppercase;
}

.slide-content p {
    width: 266px;
}

.btn-invitation {
    display: inline-block;
    padding: 16px 12px;
    margin: 16px auto;
    color: #fff;
    font-size: 1rem;
    line-height: 16px;
    text-align: center;
    background-color: #202020;
    border-radius: 90px;
    transition: transform 0.3s ease;
}

.btn-invitation:visited {
    color: #fff;
}

.btn-invitation:hover {
    transform: scale(1.1);
}

.liste-sections {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    margin: 48px 56px;
    gap: 40px;
}

.bloc-carte-accueil {
    background-color: white;
    padding: 35px 40px;
    width: 328px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 0 16px 0 rgba(153, 153, 153, 0.23);
    gap: 20px;
}

.bloc-carte-accueil svg,
.bloc-carte-accueil h3,
.bloc-carte-accueil hr,
.bloc-carte-accueil p {
    margin: 0;
}

.bloc-carte-accueil h3 {
    font-size: 1.5rem;
}

.bloc-carte-accueil p {
    text-align: left;
    font-size: 14px;
    color: #737373;
}

.bth-leger {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #12DFFF;
    font-weight: bold;
    background-color: white;
    border: 2px solid #12DFFF;
    border-radius: 37px;
    width: 164px;
    transition: transform 0.3s ease;
}

.bth-leger:visited {
    color: #12DFFF;
}

.bth-leger:hover {
    transform: scale(1.1);
}

.ligne {
    border: none;          /* Supprimer le style par défaut */
    height: 2px;           /* épaisseur */
    background-color: #FFC412;
    width: 50px;
    margin: 16px 0;     /* centrage */
}

.boitier-icone {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 72px;
    height: 72px;
    background-color: #FFC412;
    border-radius: 50%;
}

.boitier-icone img {
    width: 40px;
    height: 40px;
}

.bth-leger svg {
    width: 10px;
    height: 16px;
}

.cercle-de-fond {
    position: absolute;          /* sorti du flux, coordonnées depuis main */
    border-radius: 50%;          /* arrondit le carré en cercle */
    filter: blur(80px);          /* flou sur l'élément, crée un effet de lueur */
    opacity: 0.97;               /* presque opaque (0 = invisible, 1 = opaque) */
    pointer-events: none;        /* les clics passent à travers l'élément */
}

#blue-accueil {
    z-index: 0;
    left: -106vmin;               /* dépasse vers la gauche, valeur négative = vers l'extérieur */
    top: 60%;                    /* bord supérieur de l'élément au milieu de main */
    transform: translateY(-50%); /* remonte de la moitié de sa hauteur = centré verticalement */
    width: 145vmin;
    height: 145vmin;             /* valeurs identiques = carré, vmin depuis le petit côté de l'écran */
    background: radial-gradient(
            circle,         /* forme circulaire du dégradé (ellipse par défaut) */
            #12DFFF,        /* couleur au centre */
            transparent 85% /* disparition progressive à partir de 85% du rayon */
    );
}

.cercle-top {
    z-index: -1;
    width: 200vw;
    height: 200vw; /* vw car le cercle est proportionnel à la largeur */
    top: calc(-12vh - 100vw); /* centré à -12vh, soit la moitié de la hauteur */
    left: calc(50% - 100vw); /* centré à 50 %, moins la moitié de la largeur */
    /*outline: 2px solid blue;*/
}

#jaune-recettes {
    background: radial-gradient(
            circle,         /* forme circulaire du dégradé (ellipse par défaut) */
            #FFC412,        /* couleur au centre */
            transparent 72% /* disparition progressive à partir de 72% du rayon */
    );
}

#orange-soupes {
    background: radial-gradient(
            circle,
            #FF6200,
            transparent 72%
    );
}

#orange-plats {
    background: radial-gradient(
            circle,
            #FF9500,
            transparent 72%
    );
}

#rose-desserts {
    background: radial-gradient(
            circle,
            #FF89B8,
            transparent 72%
    );
}

#blue-guide {
    background: radial-gradient(
            circle,
            #12DFFF,
            transparent 72%
    );
}
/*
#jaune-recettes::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: blue;
}

#jaune-recettes::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: blue;
}
*/

.block-carte-recettes {
    display: flex;
    justify-content: center;
    border-radius: 16px;
    margin: 12px 0;
    box-shadow: 0 0 12px 0 rgba(150, 150, 150, 0.95);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    position: relative;
    color: white;
}

.block-carte-recettes img {
    z-index: 0;              /*On place l'image sous le texte (z-index: 1), mais au-dessus de l'arrière-plan main */
    object-position: center; /* On centre : l'image sera rognée de manière uniforme en haut et en bas */
}

.categorie img {
    filter: brightness(60%); /* On assombrit l'image elle-même (100 % = originale, 0 % = noire) */
}

.recette img {
    filter: brightness(55%); /* On assombrit l'image elle-même (100 % = originale, 0 % = noire) */
}

#bouillon-viande img  {
    object-position: center 40%;
}

.categorie {
    max-height: 100%;
    height: 168px;
}

.categorie a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.categorie a h2 {
    color: white;
    text-align: center;
    line-height: 36px;
}

.block-carte-recettes a {
    padding: 24px 20px;
    border-radius: 16px;
    flex: 1;
    z-index: 1;         /* Placer le contenu au-dessus de l'image */
}

.recette h3, p, a, span, img {
    margin: 0;
}

.recette h3 {
    margin-bottom: 8px;
}

.recette .petites-infos p {
    width: 210px;
    line-height: 20px;
}

.recette .petites-infos span {
    align-self: flex-end;
    font-size: 16px;
    font-weight: 600;
}

.petites-infos {
    display: flex;
    justify-content: space-between;
}
                                        /*----------STYLES FOOTER----------*/

footer {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
    background: #212121;
}

.footer-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.block-liste-logo {
    display: flex;
    justify-content: space-between;
    max-width: 100%;
}

.block-liste-logo svg  {
    width: 50px;
    height: 32px;
    color: white;
}

.block-liste-logo ul {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    color: white;
    margin: 0;
}

.block-liste-logo ul li a {
    color: white;
    font-size: 1rem;
}

footer small, footer span {
    text-align: right;
    align-self: end;
}

footer span {
    display: inline-block;
    margin-top: 62px;
    text-transform: uppercase;
    font-family: 'Ultra', sans-serif;
    font-size: 4.625rem;
    color: white;
}

footer small {
    font-size: 13px;
    color: #B6B6B6;
}

/* ---------- MEDIA QUERIES ---------- */

@media (min-width: 720px) {

    header {
        gap: 24px;
    }

    #blue-accueil {
        width: 80vmin;
        height: 80vmin;
        left: -55vmin;
    }

    .cercle-top {
        width: 130vh;
        height: 130vh;
        top: calc(-10vh - 65vh);
        left: calc(50% - 65vh);
    }

    .hero-slider {
        min-height: 1200px;
    }

    .search-bar {
        max-width: 450px;
        margin: auto 16px;
    }

    .liste-sections {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    footer span {
        font-size: 5rem;
    }
}

@media (min-width: 1231px) {
    .liste-sections {
        padding-top: calc(25vh - 48px);
    }
}