@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Josefin+Sans:wght@200;300;400&display=swap');

:root {
    --color-primary: #368088;
    --color-secondary: #A8C6D0;
    --color-accent: #89B3C1;
    --color-background: #F5F9FA;
    --color-text: #2D4A53;
    --color-menu-background: #FFFFFF;
    --color-hover: #188fad;
    --font-main: 'Josefin Sans', sans-serif;
    --font-headers: 'Marcellus', serif;
    --spacing-unit: 0.2rem;
    --border-radius: 0.5rem;
    --transition-speed: 0.3s;
}

/* Base styles */
body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../images/soleil.jpg'); /* ou le chemin de votre image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(6px); /* ajuster la valeur du flou selon besoin */
    transform: scale(1.1); /* pour éviter les bords blancs causés par le flou */
}

/* Header styles */
.main-header {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.header-top {
    display: flex;
    width: 100%;
    padding: var(--spacing-unit) 0;
    justify-content: center;
    background-color: var(--color-menu-background);
    box-shadow: 0 2px 15px rgba(67, 107, 122, 0.333);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgb(255, 167, 0);
}
.header-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/fond.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    z-index: 0;
    opacity: 1;
}

.header-bottom {
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    width: auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

.logo {
    width: 200px;
    height: 200px;
    background-image: url("../images/logoMin.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

@font-face {
  font-family: 'Kawoszeh';
  src: url('../fonts/kawoszeh.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.mainTitle {
    font-family: 'Kawoszeh', sans-serif;
    font-size: 7rem;
    color: #2823c4;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-shadow: 1px 1px 10px rgba(170, 120, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: auto;
    padding: 0;
    padding-left: 1rem;
    box-sizing: border-box;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: space-between;
    max-width: 1200px;
    padding: 0 1rem;
}

.nav-list li {
    flex: 1;
    text-align: center;
}

.nav-link {
    width:95%;
    color: #2823c4;
    text-decoration: none;
    padding: 0.4rem 0.2rem;
    margin: 3px;
    border-radius: var(--border-radius);
    transition: all 0.333s;
    font-size: 1.13rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(6px);
    background:rgba(255, 214, 53, 0.555);
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    text-shadow: 0 0 9px rgba(245, 242, 202, 0.94);
}

.nav-link:hover,
.nav-link:active,
.nav-link:focus {
    background:rgba(255, 214, 53, 1);
    color: #2823c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 107, 122, 0.15);
    transition: all 0.3s ease-in-out;
}

/* Style spécifique pour les liens d'authentification */
.auth-link {
    color: #2823c4;
    font-weight: bold;
}

/* Menu toggle pour mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 100;
    margin-left: 1rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    transition: transform 0.3s ease-in-out,
                opacity 0.2s ease-in-out;
    background-color:#2823c4;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive design */
@media (max-width: 1350px) {
    .nav-list {
        padding: 0 0.5rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.7rem 0.2rem;
        background:#FFBB19;
    }
    
    
    .mainTitle {
        font-size: 5rem;
    }
}

@media (max-width: 1024px) {
    .nav-link {
        font-size: 0.9rem;
    }
    
    
    .mainTitle {
        font-size: 4rem;
    }
}

@media (max-width: 946px) {
    
    .mainTitle {
        font-size: 3rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        justify-content: flex-start;
        padding: 0.5rem 0;
    }
    
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-width: 300px;
        flex-direction: column;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        background: #FF8502;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease-in-out,
                    padding 0.3s ease-in-out;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.33);
        border-radius: var(--border-radius);
        z-index: 5000;
    }
    
    .nav-list li {
        width: 100%;
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.3s ease-out;
    }
    
    .nav-list li a {
        width: 95%;
        text-align: left;
        font-size: 1.4rem;
        font-weight:normal;
        margin-left:2%;
    }
    
    .nav-list.active {
        max-height: max-content;
        opacity: 1;
        padding: var(--spacing-unit) 0;
    }
    
    .nav-list.active li {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-list.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-list.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-list.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-list.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-list.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-list.active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-list.active li:nth-child(7) { transition-delay: 0.4s; }
    
    .logo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 666px) {
    .brand {
        justify-content: center;
        padding: 0;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .mainTitle {
        font-size: 2rem;
    }
    
    .menu-toggle {
        margin-left: 0.5rem;
    }
    
    .nav-list {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
    }
}