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

/*
html {
    scroll-behavior: smooth;
} Demander à Gaëlle si c'est nécessaire pour mes animations car je ne vois pas de changement*/

/*:root ciblera l'élément <html> et aura le même comportement que le sélecteur html mais sa spécificité sera plus forte */

:root {
    --header-height: 69px;
    --header-gap: 50px;
    --header-items-number: 4;
}

/*variable en CSS */

header {
    padding-top: var(--header-height);
}

body {
    margin: 0;
    font-optical-sizing: auto;
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    color: #1A1A1A;
    background-color: #FDFCFB;
}

.oranienbaum-regular {
    font-family: "Oranienbaum", 'Times New Roman', Times, serif;
    font-weight: 400;
    font-style: normal;
}

.manrope-body {
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
}

/* Focus*/
a:focus, 
button:focus, 
input:focus {
    outline: 3px solid #093C5D ; 
}

.liens-evitement a {
    position: absolute;
    top: -100px; 
    left: 20px;
    background-color: #3B7597; 
    color: white;
    padding: 12px 20px;
    font-family: 'Manrope', sans-serif;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999; 
    transition: top 0.2s ease; 
}


.liens-evitement a:focus {
    top: 10px; 
    outline: 2px solid #76876e; 
}

/* Debut Navigation */

/*Code récupéré sur Codepen https://codepen.io/singhimalaya/pen/OKOLEe puis amélioré avec l'aide de mon tuteur de stage */

nav {
    position: fixed;
    top: 0%;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: #FDFCFB;
    padding: 10px 40px; 
    display: flex;
    align-items: center;
    justify-content: space-between; 
}

.nav-logo {
    width: 70px; 
    height: auto;
}

.nav-logo img {
    width: 100%;
    height: auto;
    display: block;
}
.nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--header-items-number), 1fr);
    gap: var(--header-gap);
    padding: 0;
    margin: 0 auto; 
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 20px; 
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    letter-spacing: 1px;
    font-size: 1.2rem;
    position: relative;
    text-align: center;
    color: #4A443F;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 0;
    display: block;
    transition: 0.2s ease color;
}

nav a:before,
nav a:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.2s ease transform;
}

nav a:before {
    top: 5px;
    left: -12px;
    width: 6px;
    height: 6px;
}

nav a:after {
    top: 7px;
    left: -2px;
    width: 4px;
    height: 4px;
}

nav li:nth-child(1) a:before { background-color: #093C5D; }
nav li:nth-child(1) a:after { background-color: #3B7597; }
nav li:nth-child(2) a:before { background-color: #093C5D; }
nav li:nth-child(2) a:after { background-color: #3B7597; }
nav li:nth-child(3) a:before { background-color: #093C5D; }
nav li:nth-child(3) a:after { background-color: #3B7597; }
nav li:nth-child(4) a:before { background-color: #093C5D; }
nav li:nth-child(4) a:after { background-color: #3B7597; }

#indicator {
    position: absolute;
    left: 0%;
    bottom: 0;
    width: 30px;
    height: 3px;
    background-color: #093C5D;
    border-radius: 5px;
    transition: 0.2s ease left;
    display: none; 
}

nav a:hover {
    color: #2E5AA7;
}

nav li:hover a:before,
nav li:hover a:after {
    transform: scale(1);
}

nav a.active {
    color: #3B7597; 
    font-weight: bold; 
}

/* End */

/* Debut Search bar */

header form {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
    margin-top: 20px;
}

.fr-search-bar {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 650px;
}

.fr-input {
    width: 100%;
    height: 50px;
    border-radius: 0;
    background-color: #FDFCFB;
    padding-left: 20px;
    padding-right: 140px;
    border: 1px solid #4A443F;
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    color: #4A443F;
    transition: all 0.3s ease;
}

.fr-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: 40px;
    padding: 0 15px;
    border-radius: 0;
    background-color: #3B7597;
    border: 1px solid #3B7597;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.fr-btn span {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.fr-btn svg {
    width: 16px;
    height: 16px;
}

.fr-btn:hover {
    background-color: transparent;
    color: #3B7597;
}

.fr-btn:hover svg circle,
.fr-btn:hover svg path {
    stroke: #3B7597;
}

.fr-btn:hover span {
    color: #3B7597;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
}

/* End */

/* Hero section */
.hero-section {
    background: #EFE9E3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content,
.hero-img {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-content button {
    pointer-events: auto;
}

.hero-content {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    color: #1A1A1A;
}

.hero-content p {
    line-height: 1.8;
    color: #555;
    font-size: 1.1rem;
    padding: 20px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(244, 241, 234, 0.7) 100%);
    border-radius: 15px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 0 15px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 300px;
    object-fit: cover;
    border: 8px solid white;
}

button {
    width: fit-content;       
    height: auto;            
    border-radius: 0;          
    background-color: #3B7597;
    color: white;
    border: 1px solid #3B7597;
    padding: 12px 30px;        
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    font-size: 0.8rem;         
    font-weight: 700;
    text-transform: uppercase; 
    letter-spacing: 2px;  
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

button:hover {
    background-color: transparent; 
    color: #3B7597;              
}

/* End */

/* Debut "How it works" */
.how-it-works {
    background-color: #edf1dd;
    padding: 40px 20px;
}

.sous-titres {
    font-size: 2.2rem;
    padding-top: 20px;
    text-align: center;
    padding-bottom: 20px;
}

.card-title {
    font-family: "Oranienbaum", 'Times New Roman', Times, serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.cards-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.card p {
    color: #4A443F;
    line-height: 1.6;
    font-size: 1rem;
}

.card {
    background-color: #FFFFFF;
    padding: 30px;
    width: 280px;
    height: 350px;
    border: 4px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease-in-out;
}

.card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow:
        5px 5px 0px 0px #777e44,
        10px 10px 0px 0px rgba(119, 126, 68, 0.5),
        15px 15px 0px 0px rgba(119, 126, 68, 0.2);
    border-color: #777e44;
}

/* Debut Recent items */
.recent-items {
    padding: 60px 20px;
    width: 100%;
    box-sizing: border-box;
}

.recent-items h2 {
    margin: 0 0 50px 0;
    text-align: center;
}

.img-cards-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.img-cards {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.img-cards:hover {
    transform: scale(1.05); 
}

.card-img-box {
    width: 100%;
    height: 450px;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-text-box {
    padding: 24px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.category-tag {
    color: #3B7597;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-text-box h3 {
    font-family: "Oranienbaum", serif;
    font-size: 1.7rem;
    margin: 0 0 15px 0;
    color: #000000;
}

.card-text-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    color: #555555;
}

.article-price {
    color: #76876e; 
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: auto; 
    margin-bottom: 20px;
}

.discovery-btn {
    display: block; 
    background-color: #3B7597;
    color: white;
    padding: 14px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #3B7597; 
    transition: all 0.3s ease-in-out;
}

.discovery-btn:hover {
    background-color: transparent;
    color: #3B7597;
    border-color: #3B7597;
}

/* Debut Author part */
.author-part {
    background-color: #edf1dd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 40px;
}

.author-content {
    max-width: 100%;
    text-align: center;
}

.author-content p {
    font-size: 1.2rem;
    padding-bottom: 20px;
}

.author-content h2 {
    font-size: 2.5rem;
    padding-top: 10px;
    text-align: center;
}

.polaroid {
    background-color: white;
    width: 100%;
    max-width: 376px;
    height: 463px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-polaroid {
    width: 333px;
    height: 316px;
    object-fit: cover;
    margin: 20px;
}

.caption {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    color: #333;
    font-size: 1.5rem;
    margin: 10px;
    text-align: center;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
}

/* End */

/* Debut Slogan */
.slogan-part {
    padding: 80px 20px;
    background-color: #FDFCFB;
    text-align: center;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.decoration {
    color: #484c29;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.slide-up {
    height: 50px;
    overflow: hidden;
    position: relative;
}

.slide-up-list {
    display: flex;
    flex-direction: column;
    animation: slideUpLoop 12s cubic-bezier(0.8, 0, 0.2, 1) infinite;
}

.slide-up-list p {
    font-family: "Oranienbaum", 'Times New Roman', Times, serif;
    font-size: 1.8rem;
    line-height: 50px;
    height: 50px;
    margin: 0;
    color: #1A1A1A;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.highlight {
    color: #777e44;
    font-style: italic;
}

@keyframes slideUpLoop {
    0%, 20% { transform: translateY(0); }
    25%, 45% { transform: translateY(-50px); }
    50%, 70% { transform: translateY(-100px); }
    75%, 95% { transform: translateY(-150px); }
    100% { transform: translateY(-200px); }
}

/* End */

/* Text and cards animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.card,
.img-cards {
    animation: fadeInUp 0.8s ease-out;
}

.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.4s; }

/* Debut Footer */
.main-footer {
    background-color: #093C5D;
    color: #FFFFFF;
    padding: 60px 20px;
}

.footer-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.footer-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-placeholder {
    width: 170px;  
    height: auto; 
    margin-bottom: 10px; 
}

.logo-placeholder img {
    width: 100%; 
    height: auto;
    display: block;
    border-radius: 15px;
}

.website-name {
    font-size: 3.5rem;
    margin: 0 0 20px 0;
    color: #FFFFFF;
}

.footer-socials {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.footer-socials a { color: #FFFFFF; }

.footer-legal-content {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.subtitle-footer {
    font-family: "Oranienbaum", 'Times New Roman', Times, serif;
    letter-spacing: 1px;
    color: #a3a87b;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

ul.host-list {
    display: block;
    text-align: center;
    margin-top: 20px;
}

ul.host-list li {
    font-size: 1rem;
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.author-mail { color: white; }
.author-mail:hover { color: #777E44; }

.admin-link {
    margin-top: 40px;
    color: #e0dedb;
    font-size: 1.1rem;
}

.admin-link:hover { color: #777E44; }


/* ==========================================================================
   RENDU FLUIDE DESKTOP - ADAPTÉ POUR TOUTES LES TAILLES D'ÉCRANS (ORDINATEURS & TABLETTES)
   ========================================================================== */
@media (min-width: 768px) {

    /* CORRECTION NAVIGATION : Espacement dynamique à la place des pixels fixes */
    ul { 
        gap: clamp(15px, 4vw, 80px); /* S'adapte de manière fluide à la taille de l'écran */
        flex-wrap: nowrap; 
    }
    
    nav a {
        font-size: clamp(1rem, 1.2vw, 1.2rem); /* Réduit subtilement la taille du texte si l'écran est petit */
        white-space: nowrap; /* Force le texte à rester sur une seule ligne */
    }

    #indicator { 
        display: block; 
    }
    
    nav li:nth-child(1):hover~#indicator { background: linear-gradient(130deg, #3B7597, #093C5D); }
    nav li:nth-child(2):hover~#indicator { left: calc(100% / var(--header-items-number) + var(--header-gap) / var(--header-items-number)); background: linear-gradient(130deg,  #3B7597, #093C5D); }
    nav li:nth-child(3):hover~#indicator { left: calc(100% / var(--header-items-number) * 2 + var(--header-gap) / var(--header-items-number) * 2); background: linear-gradient(130deg, #3B7597, #093C5D); }
    nav li:nth-child(4):hover~#indicator { left: calc(100% / var(--header-items-number) * 3 + var(--header-gap) / var(--header-items-number) * 3); background: linear-gradient(130deg,  #3B7597, #093C5D); }

    /* Correction Hero Section */
    .hero-section {
        flex-direction: row;
        justify-content: space-between;
        padding: 60px 40px;
        min-height: 720px;
        height: auto;
    }

    .hero-content {
        max-width: 55%;
        text-align: left;
        margin-bottom: 0;
    }

    h1 { font-size: clamp(3.5rem, 6vw, 5.5rem); } /* Titre fluide */
    .hero-img { width: 40%; max-width: 477px; height: auto; aspect-ratio: 477/641; }

    /* CORRECTION "HOW IT WORKS" : Les cartes ne débordent plus jamais */
    .how-it-works { 
        min-height: 562px; 
        padding: 60px 20px; 
        display: flex;
        flex-direction: column;
        align-items: center; 
        justify-content: center;
    }
    
    .cards-container { 
        flex-direction: row; 
        gap: clamp(15px, 3vw, 60px); /* Réduit l'espace entre les cartes sur écran moyen */
        width: 100%;
        max-width: 1100px; 
        margin: 0 auto; 
        justify-content: center; 
    }

    .card {
        flex: 1; /* Permet aux cartes de s'adapter proportionnellement */
        max-width: 320px;
        height: 380px; /* Légèrement augmenté pour éviter que le texte ne sorte */
    }

    .sous-titres { font-size: 3rem; padding-top: 0; }

    /* Centrage de la section "Articles Récents" */
    .img-cards-container { 
        flex-direction: row; 
        gap: 20px; 
        width: 100%;
        max-width: 1150px;
        justify-content: center; 
    }
    
    .img-cards { 
        flex: 1;
        max-width: 350px; 
    }

    /* Section Autrice */
    .author-part {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
        padding: 60px 40px;
        gap: clamp(30px, 5vw, 100px);
    }

    .author-content {
        max-width: 550px;
        order: 2;
        text-align: left;
    }

    .author-content h2 { font-size: 3rem; text-align: left; padding-top: 0; margin-top: 0; }
    .author-content p { font-size: 1.3rem; line-height: 1.6; }
    
    .polaroid { 
        margin-left: 0; 
        width: 376px; 
        flex-shrink: 0;
    }

    /* Slogan & Footer */
    .slide-up-list p { font-size: 2.2rem; }
    
    .main-footer { padding: 80px 0 40px 0; }
    .footer-layout { flex-direction: row; justify-content: space-between; padding: 0 40px; gap: 50px; text-align: left; }
    .footer-brand { align-items: flex-start; }
    .website-name { font-size: clamp(3.5rem, 5vw, 5rem); }
    .footer-legal-content { text-align: left; }
    ul.host-list { text-align: left; }
}