@font-face {
    font-family: Interr;
    src: url(../polices/Inter_28pt-Light.ttf);
}

:root {
    --jaune: rgb(253, 209, 0);
    --jaune-clair: rgb(254, 234, 128);
    --fond: rgb(254, 240, 197);
    --texte: rgb(68, 68, 68);
    --present: rgb(34, 34, 34);
    --brun: #8d7400;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

::selection {
    background: var(--jaune-clair);
    color: #ffffff;
}

html {
    scrollbar-color: var(--brun) #fff;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

body {
    margin: 0;
    background: var(--fond);
    font-family: Interr, Calibri, sans-serif;
    color: var(--texte);
    line-height: 1.5;
}

/* ===================================================
   HEADER  (bureau)
   =================================================== */
#progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: rgba(141, 116, 0, 0.5);
    z-index: 9999;
    transition: width 0.1s linear;
}

header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1.5rem;
    height: 4.25rem;
    background: transparent;

    transition:
        background-color 0.8s ease,
        backdrop-filter 0.8s ease,
        box-shadow 0.8s ease,
        transform 0.3s ease-in;
}

header.scrolled {
    background: rgba(253, 209, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.13);
}

/* Zone logo */
.phone {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Le bouton hamburger est masqué sur bureau */
#hamburger {
    display: none;
}

.logo-link {
    display: block;
    line-height: 0;
}

#logonav {
    display: block;
    height: 2.75rem;
}

/* Navigation */
#menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.menu-principal {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.menu-principal a {
    color: var(--texte);
    text-decoration: none;
    font-family: Calibri, sans-serif;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.menu-principal a:hover {
    color: var(--brun);
}

.menu-principal a.present {
    color: var(--brun);
    font-weight: 600;
}

/* Dropdown "Plus" */
.menu {
    position: relative;
}

.menu>button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: Calibri, sans-serif;
    font-size: 1.5rem;
    color: var(--texte);
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    transition: background 0.2s, color 0.2s;
}

.menu>button:hover {
    color: var(--brun);
}

.submenu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.13);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    min-width: 15rem;
    z-index: 100;
}

.submenu.ouvert {
    display: block;
}

.submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--texte);
    text-decoration: none;
    font-family: Calibri, sans-serif;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.submenu li a:hover {
    background: var(--fond);
    color: var(--brun);
}

/* Icones reseaux (nav bureau) */
.reseaunav {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 2em;
}

#zest-compte-icon img {
    width: 3rem;
    transition: transform 0.2s;
    margin-bottom: .7em;
}

#zest-compte-icon img:hover {
    transform: scale(1.2);
}

.reseaunav a img:not(.compte-img) {
    display: block;
    height: 1.75rem;
    transition: transform 0.2s;
}

.reseaunav a:hover img {
    transform: scale(1.12);
}

.statut-connexion {
    text-decoration: none;
    color: var(--texte);
}

/* ===================================================
   FOOTER
   =================================================== */

footer {
    background: var(--jaune);
    padding: 3rem 4vw 1.5rem;
    margin-top: 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(141, 116, 0, 0.22);
}

.footer-brand h3 {
    font-size: 1.4rem;
    margin: 0 0 0.4rem;
    color: var(--brun);
}

.footer-brand>p {
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0 0 1rem;
}

.reseaux-footer {
    display: flex;
    gap: 0.6rem;
}

.reseaux-footer a img {
    display: block;
    height: 2rem;
    transition: transform 0.2s;
}

.reseaux-footer a:hover img {
    transform: scale(1.1);
}

.footer-col-titre {
    font-family: Calibri, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--brun);
    margin: 0 0 0.75rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.45rem;
    font-size: 0.875rem;
}

.footer-col ul li a {
    color: var(--texte);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--brun);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.25rem;
    font-family: Calibri, sans-serif;
    font-size: 0.8rem;
    color: var(--brun);
}

.footer-links a {
    color: var(--brun);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}


/* ===========================
   Animation chargement
=========================== */

body.loading {
    overflow: hidden;
}

#loader {
    position: fixed;
    inset: 0;
    background: #F7F4EC;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity .8s ease;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 180px;
    margin-bottom: 35px;
    opacity: 0;
    transform: scale(.6);
    animation: logoAnimation 1s forwards;
}

@keyframes logoAnimation {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loader-bar {
    width: 320px;
    height: 10px;
    background: #ddd;
    border-radius: 50px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    border-radius: 50px;

    background: linear-gradient(90deg,
            #FFF3B0,
            #FFE066,
            #FFD43B,
            #FFC107,
            #FFE066);

    background-size: 200% 100%;
    animation: loaderGradient 2s linear infinite;

    transition: width 0.02s linear;
}

@keyframes loaderGradient {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 200% 0%;
    }
}


/* Espace Compte */
.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.espace-compte h4 {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33em;
    padding: .5em;
    border-radius: 2em;
    border: solid #ccc .1em;
    margin: .5em;
    transition: transform 0.2s ease;
}

.espace-compte h2 {
    margin: 0 auto;
}

.firebase-stripe {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    margin-top: 4em;
}

.espace-compte h4:hover {
    transform: scale(1.025);
}

.espace-compte h4 img {
    height: 2.5em;
    margin-right: .5em;
    border-radius: 50em;
}

.espace-compte a {
    text-decoration: none;
    color: var(--texte);
}

.deco {
    width: 8.5em;
    text-align: center;
    margin: 1em auto;
}

.etat-connexion {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2em;
}

.espace-compte section {
    display: flex;
    background: #fff;
    margin: .75em;
    border: #ccc .1em solid;
    border-radius: 1.5em;
    padding: .6em;
    transition: transform .3s ease, box-shadow .3s ease;
    width: 30em;
}

.espace-compte section img {
    height: 6.5em;
    margin: auto;
    padding: 1em;
}

.espace-compte {
    width: 90%;
    margin: 0 auto;
}


.espace-compte section:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

/* ===================================================
   Animation apparition des sections
   =================================================== */
section {

    opacity: 0;

    transform: translateY(40px);

    transition: 1s;
}

section.visible {

    opacity: 1;

    transform: none;
}









.lemon {
    position: fixed;
    left: 0;
    top: 0;

    transform: translate(-50%, -50%);
    font-size: 24px;

    pointer-events: none;
    z-index: 99999;

    animation: lemonBurst 0.8s ease-out forwards;
}

@keyframes lemonBurst {
    0% {
        opacity: 1;
        transform:
            translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(0.5);
    }

    100% {
        opacity: 0;
        transform:
            translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--r)) scale(1.4);
    }
}

/* Flèche pour remonter en haut */
#backToTop {
    position: fixed;
    bottom: 0.4em;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #fdd100;
    color: #3d3000;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Interface informations du compte */
.compte {
    width: 80%;
    margin: auto;
    text-align: center;

}

.compte .carte-compte {
    background: white;
    padding: .35em 2em 2em 2em;
    border-radius: 2em;
    border: solid #ccc .1em;
    width: 30em;
    margin: auto;
}

.carte-compte p {
    font-size: 1.2em;
}

#profil-btn {
    display: inline-block;
    margin-top: 1em;
    background: #fdd100;
    color: black;
    padding: .8em 2em;
    border-radius: 2em;
    text-decoration: none;
}

.carte-compte input {
    margin-left: 1em;
    padding: .3em;
    transform: translateY(-.1em);
    border: solid #ccc .1em;
    border-radius: .5em;
}

#sauver {
    border: none;
    background: #fdd100;
    color: black;
    padding: .8em 2em;
    border-radius: 2em;
    text-decoration: none;
    cursor: pointer;
}

#zest-compte-icon {
    position: relative;
}




#profil-alert:not(.pas-dans-header) {
    position: absolute;
}

#profil-alert:not(.dans-header) {
    position: relative;
}

#profil-alert {
    width: 20px;
    height: 20px;
    background: red;
    color: white;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
    animation: attention 2s infinite ease-in-out;
    z-index: 10000;
}

.dans-header {
    top: 0;
    right: 0;
}

.pas-dans-header {
    top: 30px;
    right: -475px;
}

.red {
    color: rgb(213, 29, 29);
}






.panier-icon-container {
    position: relative;
}


#badge-panier {
    position: absolute;
    width:12px;
    height: 12px;
    background: #32d74b;
    border-radius: 50%;
    top: -2.5px;
    right: -2.5px;
    display: none;
    animation: attention 2s infinite ease-in-out;
}

/* Supprimer les flèches des input number sur Chrome, Edge, Safari */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}





/* ===================================================
   TABLETTE  ≤ 960px
   =================================================== */
@media (max-width: 960px) {}












/* ===================================================
   MOBILE  ≤ 768px
   =================================================== */

@media (max-width: 1200px) {

    .header-cta {
        display: none;
    }

    .menu-principal a,
    .menu>button {
        font-size: 1.2rem;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    /* --- Header fixé en barre haute --- */
    header {
        position: sticky;
        padding: 0;
        height: auto;
    }

    .phone {
        justify-content: space-between;
        padding: 0.55rem 1rem;
        width: 100%;
        height: 3.75rem;
    }

    #logonav {
        height: 2.5rem;
    }

    .cta a {
        box-shadow: 0 0.5rem 2rem rgba(253, 209, 0, 0.3);
    }

    /* Bouton hamburger */
    #hamburger {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 2.5rem;
        height: 2.5rem;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        padding: 0;
        flex-shrink: 0;
        z-index: 9999;
    }

    #hamburger span {
        position: absolute;
        width: 1.5rem;
        height: 0.14rem;
        background: var(--brun);
        border-radius: 1em;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #hamburger span:nth-child(1) {
        transform: translateY(-0.42rem);
    }

    #hamburger span:nth-child(2) {
        transform: translateY(0);
    }

    #hamburger span:nth-child(3) {
        transform: translateY(0.42rem);
    }

    #hamburger.open span:nth-child(1) {
        transform: rotate(-45deg);
    }

    #hamburger.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    #hamburger.open span:nth-child(3) {
        transform: rotate(45deg);
    }

    /* Panneau de navigation coulissant */
    #menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 23.5rem;
        height: 100dvh;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 4.75rem 1.25rem 2rem;
        background: rgba(254, 240, 197, 0.98);
        box-shadow: 0.4rem 0 2rem rgba(0, 0, 0, 0.15);
        transform: translateX(-110%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        flex: none;
    }

    #menu.open {
        transform: translateX(0);
    }

    .menu-principal {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .menu-principal a {
        font-size: 1.05rem;
        padding: 0.7rem 0.5rem;
        width: 100%;
        border-bottom: 1px solid rgba(141, 116, 0, 0.13);
        color: var(--texte);
    }

    .menu-principal a.present {
        color: var(--brun);
        font-weight: 700;
    }

    .menu-principal a:hover {
        color: var(--brun);
    }

    .menu {
        width: 100%;
        margin-top: 0.1rem;
    }

    .menu>button {
        width: 100%;
        text-align: left;
        font-size: 1.05rem;
        padding: 0.7rem 0.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(141, 116, 0, 0.13);
        background: transparent;
    }

    /* Submenu en mode statique dans le panneau */
    .submenu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0.5rem;
        margin: 0.25rem 0 0;
        padding: 0.25rem 0;
        background-color: transparent;
    }

    .submenu li a {
        white-space: normal;
        font-size: 0.9rem;
    }

    .reseaunav {
        margin-left: 0;
        margin-top: 1.5rem;
        display: flex;
        justify-content: center;
    }

    .reseaunav a img:not(.compte-img) {
        height: 2.2rem;
    }

    /* --- Footer --- */

    footer {
        padding: 2rem 1.25rem 1.25rem;
        margin-top: 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 0.5rem;
    }

    .saveurs {
        display: none;
    }

    #zest-compte-icon img {
        width: 4rem;
    }

    .firebase-stripe h4 {
        font-size: 60%;
    }
}

@media (max-width: 730px) {

    /* Espace Compte */
    .espace-compte h4 {
        text-align: center;
        width: 40vw;
    }

    .firebase-stripe h4 {
        font-size: 60%;
    }

    .espace-compte section {
        width: 90vw;
    }

    .compte .carte-compte {
        width: 80vw;
    }

    .carte-compte input {
        width: 30vw;
    }

    .pas-dans-header {
        right: -89vw;
    }
}








/* ===================================================
   ACCESSIBILITÉ
   =================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

:focus-visible {
    outline: 3px solid var(--brun);
    outline-offset: 3px;
    border-radius: 3px;
}

@keyframes defilement {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}








@keyframes attention {

    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }

}