/* ============================================================
   FEUILLE DE STYLE — LOCAVORE
   Site de paniers de fruits et légumes locaux à Montpellier
   Palette de couleurs :
     - Vert principal : #75b728
     - Rouge accent   : #c41b28
     - Beige fond     : #f5efed
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* 1rem = 10px pour faciliter les calculs */
    font-size: 62.5%;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ---------- CONTAINER ---------- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- BOUTONS ---------- */
.btn {
    display: inline-block;
    padding: 1.4rem 3.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #75b728;
    color: #fff;
    border-color: #75b728;
}

.btn-primary:hover {
    background-color: #5f9a1e;
    border-color: #5f9a1e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(117, 183, 40, 0.35);
}

.btn-secondary {
    background-color: #c41b28;
    color: #fff;
    border-color: #c41b28;
}

.btn-secondary:hover {
    background-color: #a01520;
    border-color: #a01520;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 27, 40, 0.35);
}

/* ---------- TITRES DE SECTION ---------- */
section h2 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #2d2d2d;
    text-align: center;
    margin-bottom: 1.6rem;
}

/* Picto décoratif au-dessus de chaque titre de section */
section h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1.6rem;
    background: url('images/picto_finPlan-de-travail-1.png') center/contain no-repeat;
    opacity: 0.7;
}

.section-intro {
    text-align: center;
    font-size: 1.8rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 4.8rem;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

/* Navigation principale */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 3.2rem;
}

.main-nav a {
    font-weight: 600;
    font-size: 1.5rem;
    color: #444;
    transition: color 0.3s ease;
    position: relative;
}

/* Soulignement animé au survol */
.main-nav a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #75b728;
    transition: width 0.3s ease;
}

.main-nav a:not(.btn-nav):hover {
    color: #75b728;
}

.main-nav a:not(.btn-nav):hover::after {
    width: 100%;
}

/* Bouton "Commander" dans la nav */
.btn-nav {
    display: inline-block;
    padding: 0.8rem 2.4rem;
    background-color: #c41b28;
    color: #fff !important;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.btn-nav:hover {
    background-color: #a01520;
}

/* Menu hamburger (caché par défaut, affiché sur mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ============================================================
   SECTION HÉRO ACCUEIL (index.html)
   ============================================================ */
.hero-accueil {
    background: url('images/légumes.jpg') center/cover no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-accueil .hero-overlay {
    width: 100%;
    padding: 8rem 0;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(117, 183, 40, 0.85) 0%, rgba(74, 140, 11, 0.9) 100%);
}

/* Grille 2 colonnes : texte à gauche, boutons à droite */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    color: #fff;
}

.hero-split-texte h1 {
    font-size: 5.6rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 2.4rem;
}

.hero-subtitle {
    font-size: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 480px;
}

/* Colonne droite : 4 boutons verticaux */
.hero-split-nav {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: stretch;
}

/* Bouton de navigation (blanc transparent) */
.btn-hero-nav {
    display: block;
    padding: 1.6rem 2.4rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-hero-nav:hover {
    background-color: rgba(255, 255, 255, 0.28);
    border-color: #fff;
    transform: translateX(6px);
}

/* Bouton Commander (rouge) */
.btn-hero-commander {
    display: block;
    padding: 1.6rem 2.4rem;
    background-color: #c41b28;
    color: #fff;
    border: 2px solid #c41b28;
    border-radius: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-hero-commander:hover {
    background-color: #a01520;
    border-color: #a01520;
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(196, 27, 40, 0.4);
}

/* ============================================================
   BANNIÈRE TITRE DE PAGE (sous-pages)
   ============================================================ */
.page-banner {
    /* Photo de légumes en fond */
    background: url('images/légumes.jpg') center/cover no-repeat;
    padding: 2.4rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Superposition verte semi-transparente */
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(117, 183, 40, 0.75) 0%, rgba(74, 140, 11, 0.82) 100%);
    z-index: -1;
}

.page-banner h1 {
    font-size: 3.2rem;
    font-weight: 900;
    color: #fff;
    position: relative;
}

/* ============================================================
   LIEN NAVIGATION ENTRE PAGES
   ============================================================ */
.page-nav-suivant {
    text-align: center;
    margin-top: 4.8rem;
}

/* ============================================================
   LIEN ACTIF DANS LA NAVIGATION
   ============================================================ */
.main-nav a.active {
    color: #75b728;
}

.main-nav a.active::after {
    width: 100%;
}

/* ============================================================
   SECTIONS DES SOUS-PAGES
   ============================================================ */
.histoire-page {
    padding: 8rem 0;
    background-color: #fff;
}

.engagements-page {
    padding: 8rem 0;
    background-color: #f5efed;
    position: relative;
    overflow: hidden;
}

/* Picto en filigrane sur la page engagements */
.engagements-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/picto_finPlan-de-travail-1.png') center/180px repeat;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

.engagements-page .container {
    position: relative;
    z-index: 1;
}

.paniers-page {
    padding: 8rem 0;
    background-color: #fff;
}

/* ============================================================
   SECTION HISTOIRE ET VALEURS
   ============================================================ */
.histoire {
    padding: 10rem 0;
    background-color: #fff;
}

.histoire-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 6rem;
    align-items: start;
}

.histoire-image {
    /* Conteneur pour limiter la hauteur de l'image */
    max-height: 450px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.histoire-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.histoire-texte h2 {
    text-align: center;
    margin-bottom: 2.4rem;
}

.histoire-texte p {
    margin-bottom: 1.6rem;
    color: #555;
    font-size: 1.7rem;
}

.histoire-texte strong {
    color: #75b728;
}

/* ============================================================
   SECTION ENGAGEMENTS
   ============================================================ */
.engagements {
    padding: 10rem 0;
    background-color: #f5efed;
    position: relative;
    /* Empêche le pseudo-élément de déborder */
    overflow: hidden;
}

/* Picto en filigrane décoratif (filigrane / watermark) */
.engagements::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/picto_finPlan-de-travail-1.png') center/180px repeat;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

/* Remonter le container au-dessus du filigrane */
.engagements .container {
    position: relative;
    z-index: 1;
}

.engagements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.2rem;
}

/* Carte d'engagement */
.carte-engagement {
    background-color: #fff;
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carte-engagement:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

/* Petit trait décoratif vert en remplacement de l'icône */
.carte-engagement::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 2rem;
    background-color: #75b728;
    border-radius: 2px;
}

.carte-engagement h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 1.6rem;
}

.carte-engagement p {
    color: #666;
    font-size: 1.5rem;
}

/* ============================================================
   SECTION CITATION
   ============================================================ */
.citation {
    padding: 8rem 0;
    background-color: #75b728;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Picto en filigrane sur le vert de la citation */
.citation::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('images/picto_finPlan-de-travail-1.png') center/200px repeat;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

.citation .container {
    position: relative;
    z-index: 1;
}

.citation blockquote {
    max-width: 750px;
    margin: 0 auto;
}

.citation blockquote p {
    font-size: 2.4rem;
    font-weight: 600;
    font-style: italic;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.citation cite {
    font-size: 1.6rem;
    font-style: normal;
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   SECTION PANIERS
   ============================================================ */
.paniers {
    padding: 10rem 0;
    background-color: #fff;
}

.paniers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.2rem;
    align-items: stretch;
}

/* Carte panier */
.carte-panier {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    cursor: pointer;
}

.carte-panier:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

/* Carte mise en avant (Panier Duo) */
.carte-panier--vedette {
    border-color: #75b728;
    transform: scale(1.04);
    position: relative;
}

.carte-panier--vedette:hover {
    transform: scale(1.04) translateY(-6px);
}

.carte-panier-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.carte-panier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.carte-panier:hover .carte-panier-image img {
    transform: scale(1.08);
}

/* Contenu de la carte panier */
.carte-panier-contenu {
    padding: 2.8rem 2.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.carte-panier-contenu h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 1.2rem;
}

.panier-description {
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.carte-panier-contenu .btn {
    align-self: stretch;
}

/* ============================================================
   SECTION APPEL À L'ACTION (CTA)
   ============================================================ */
/* ============================================================
   SECTION CONTACT / FORMULAIRE
   ============================================================ */
.contact {
    padding: 10rem 0;
    background-color: #f5efed;
    text-align: center;
}

.contact h2 {
    color: #2d2d2d;
    margin-bottom: 1.6rem;
}

/* Formulaire */
.formulaire-contact {
    max-width: 600px;
    margin: 0 auto;
}

.formulaire-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.4rem;
    margin-bottom: 3.2rem;
}

.formulaire-champ {
    text-align: left;
}

.formulaire-champ label {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 0.8rem;
}

.formulaire-champ input {
    width: 100%;
    padding: 1.4rem 1.8rem;
    font-size: 1.6rem;
    border: 2px solid #e0d8d5;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.formulaire-champ input:focus {
    outline: none;
    border-color: #75b728;
    box-shadow: 0 0 0 3px rgba(117, 183, 40, 0.2);
}

.formulaire-champ input::placeholder {
    color: #aaa;
}

/* Champ pleine largeur (ex: email sous la grille) */
.formulaire-champ--plein {
    grid-column: 1 / -1;
    margin-bottom: 3.2rem;
}

/* ============================================================
   PAGE COMMANDER
   ============================================================ */

/* Section choix du panier (commander.html) */
.commander-choix {
    padding: 1.6rem 0 1rem;
    background-color: #fff;
    text-align: center;
}

/* Conteneur du panier unique sélectionné — format horizontal compact */
.panier-unique {
    max-width: 620px;
    margin: 0 auto;
}

/* Panier confirmé : disposition horizontale, plus compact */
.panier-confirme {
    cursor: default;
    flex-direction: row;
    align-items: stretch;
}

.panier-confirme .carte-panier-image {
    width: 180px;
    min-width: 180px;
    height: auto;
    flex-shrink: 0;
}

.panier-confirme .carte-panier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panier-confirme .carte-panier-contenu {
    padding: 1.6rem 2rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panier-confirme .carte-panier-contenu h3 {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

.panier-confirme .panier-description {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.panier-confirme:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.panier-confirme:hover .carte-panier-image img {
    transform: none;
}

/* Lien retour pour choisir un autre panier */
.retour-choix {
    margin-top: 1.6rem;
}

.retour-choix a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #75b728;
    transition: color 0.3s ease;
}

.retour-choix a:hover {
    color: #5f9a1e;
}

/* Section formulaire (commander.html) */
.commander-formulaire {
    padding: 4rem 0 6rem;
    background-color: #f5efed;
    text-align: center;
}

.commander-formulaire h2 {
    color: #2d2d2d;
    margin-bottom: 1.6rem;
}

/* Lien de retour à l'accueil */
.retour-accueil {
    margin-top: 3.2rem;
}

.retour-accueil a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #75b728;
    transition: color 0.3s ease;
}

.retour-accueil a:hover {
    color: #5f9a1e;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 6rem 0 0;
    position: relative;
}

/* Bande décorative picto en haut du footer */
footer::before {
    content: '';
    display: block;
    width: 100%;
    height: 8px;
    background: url('images/picto_finPlan-de-travail-1.png') center/30px repeat-x;
    opacity: 0.25;
    position: absolute;
    top: 0;
    left: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p,
.footer-col li {
    font-size: 1.4rem;
    line-height: 2;
}

.footer-col a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #75b728;
}

.footer-logo {
    height: 45px;
    width: auto;
    margin-bottom: 1.6rem;
    /* Inverser les couleurs du logo si nécessaire (fond sombre) */
    filter: brightness(0) invert(1);
}

.footer-col address {
    font-style: normal;
}

.footer-col address a {
    color: #75b728;
}

/* Barre inférieure */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.4rem 0;
    font-size: 1.3rem;
    color: #888;
}


/* ============================================================
   RESPONSIVE — TABLETTE (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

    .hero-split-texte h1 {
        font-size: 3.6rem;
    }

    .hero-split {
        gap: 3rem;
    }

    /* Histoire : passer en colonne */
    .histoire-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .histoire-image {
        max-width: 500px;
        max-height: 350px;
        margin: 0 auto;
    }

    /* Engagements : 2 colonnes */
    .engagements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Paniers : 2 colonnes, la carte vedette reprend sa taille */
    .paniers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carte-panier--vedette {
        transform: scale(1);
    }

    .carte-panier--vedette:hover {
        transform: translateY(-6px);
    }

    /* Footer : 2 colonnes */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Header : afficher le menu hamburger */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    /* Classe ajoutée via JS pour ouvrir le menu */
    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 1.4rem 2rem;
        font-size: 1.7rem;
    }

    .main-nav a:not(.btn-nav)::after {
        display: none;
    }

    .btn-nav {
        margin: 0.8rem 2rem;
        display: block;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    /* Héro accueil */
    .hero-accueil {
        min-height: 60vh;
    }

    .hero-split {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .hero-split-texte h1 {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.6rem;
        max-width: 100%;
    }

    /* Titres */
    section h2 {
        font-size: 2.6rem;
    }

    .section-intro {
        font-size: 1.6rem;
    }

    /* Histoire */
    .histoire {
        padding: 6rem 0;
    }

    /* Engagements : 1 colonne */
    .engagements {
        padding: 6rem 0;
    }

    .engagements-grid {
        grid-template-columns: 1fr;
    }

    /* Citation */
    .citation blockquote p {
        font-size: 2rem;
    }

    /* Paniers : 1 colonne */
    .paniers {
        padding: 6rem 0;
    }

    .paniers-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Contact / Formulaire */
    .contact,
    .commander-formulaire {
        padding: 3rem 0 4rem;
    }

    /* Panier confirmé : repasser en colonne sur mobile */
    .panier-confirme {
        flex-direction: column;
    }

    .panier-confirme .carte-panier-image {
        width: 100%;
        min-width: unset;
        height: 160px;
    }

    /* Formulaire : empiler les champs en colonne sur mobile */
    .formulaire-grid {
        grid-template-columns: 1fr;
    }

    /* Footer : 1 colonne */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
}


/* ============================================================
   RESPONSIVE — PETIT MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {

    html {
        /* Rétablir la taille par défaut sur très petit écran */
        font-size: 56.25%;
    }

    .hero-split-texte h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .page-banner h1 {
        font-size: 2.8rem;
    }

    section h2 {
        font-size: 2.4rem;
    }

    .carte-engagement {
        padding: 2.8rem 2rem;
    }

    .carte-panier-contenu {
        padding: 2rem 1.8rem;
    }
}
