/*
Theme Name: Vilva Child
Theme URI: https://blossomthemes.com/wordpress-themes/vilva/
Template: vilva
Author: Blossom Themes
Description: Child theme personnalisé pour fredyfredo.ch
Version: 1.0
*/

/* =========================
   Palette & typo de base
   ========================= */
:root {
    --ff-heading: "Playfair Display", serif;
    --ff-body: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    --clr-bg: #fdfaf4;        /* beige très clair */
    --clr-text: #293132;      /* gris foncé */
    --clr-primary: #7a9a7e;   /* vert sauge */
    --clr-accent: #f1b25b;    /* accent doré/miel */
    --fredy-vert: #6da13f;   /* vert signature menu/boutons */
}
/* ===== Correction du menu mobile (WP Mobile Menu) ===== */

/* Le panneau prend 100% */
.wpmm-container,
.wpmm-nav,
.wpmm-menu,
.wpmm-nav-wrap {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    background: #fffaf0 !important;
    overflow-y: auto !important;
}

/* Liens affichés en colonne */
.wpmm-nav li,
.wpmm-menu li,
.wpmm-nav-wrap li {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* Style des liens */
.wpmm-nav li a,
.wpmm-menu li a,
.wpmm-nav-wrap li a {
    display: block !important;
    padding: 18px 0 !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    width: 100% !important;
}

/* Icône de fermeture (croix) */
.wpmm-close,
.wpmm-close-btn {
    position: absolute !important;
    right: 20px !important;
    top: 20px !important;
    font-size: 30px !important;
    z-index: 99999 !important;
}

/* Empêcher le site derrière de défiler */
body.wpmm-open {
    overflow: hidden !important;
}

/* Corps du site */
body {
    font-family: var(--ff-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-heading);
    color: var(--clr-primary);
}

/* Liens généraux */
a {
    color: var(--clr-primary);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--clr-accent);
}

/* =========================
   Header + menu principal
   ========================= */

/* Bandeau du haut (on laisse Vilva gérer la structure,
   on ajuste juste les couleurs et les paddings) */
.site-header,
.header-main,
.site-header-main {
    background-color: #fffaf0;          /* beige très clair */
    border-bottom: 1px solid #f0e4d5;   /* fine ligne de séparation */
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Pas de header collant, pas d’ombre */
.site-header {
    position: relative;
    top: auto;
    box-shadow: none;
}

/* Logo : taille raisonnable mais bien visible */
.site-branding img,
.site-logo img {
    max-height: 80px;
    height: auto;
    width: auto;
}

/* Menu principal : aligné au centre, style propre */
.main-navigation ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    margin: 0 26px;
}

.main-navigation ul li a {
    font-family: var(--ff-body);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.06em;      /* léger espacement = pro */
    text-transform: none;        /* on garde tes mots tels quels */
    color: #293132;
    padding: 4px 0;
    position: relative;
    transition: color 0.18s ease-out;
}

/* État actif + hover = vert fredyfredo */
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a,
.main-navigation ul li a:hover,
.main-navigation ul li a:focus {
    color: var(--fredy-vert);
}

/* Petite barre verte sous le lien actif / survolé */
.main-navigation ul li > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--fredy-vert);
    transform: translateX(-50%);
    transition: width 0.18s ease-out;
}

.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current-menu-ancestor > a::after,
.main-navigation ul li > a:hover::after {
    width: 26px;
}

/* =========================
   Boutons (CTA, formulaires…)
   ========================= */
.button,
.wp-block-button__link,
input[type="submit"],
button,
.read-more a {
    background-color: var(--fredy-vert);
    color: #ffffff !important;
    border-radius: 999px;
    padding: 0.7em 1.7em;
    border: none;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    cursor: pointer;
    transition: background 0.18s ease-out,
                transform 0.18s ease-out,
                box-shadow 0.18s ease-out;
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button:hover,
.read-more a:hover {
    background-color: #5a8634;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

/* =========================
   Cartes d’articles (archives)
   ========================= */
.blog .site-main article,
.archive .site-main article,
.category .site-main article {
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.04);
    padding: 24px 24px 30px;
    margin-bottom: 38px;
}

.blog .post-thumbnail img,
.archive .post-thumbnail img,
.category .post-thumbnail img {
    border-radius: 16px;
}

/* Titre d’article */
.blog .entry-title a,
.archive .entry-title a,
.category .entry-title a {
    font-weight: 700;
    text-decoration: none;
}

.blog .entry-title a:hover,
.archive .entry-title a:hover,
.category .entry-title a:hover {
    color: var(--fredy-vert);
}

/* Métadonnées (date, catégorie) */
.entry-meta,
.posted-on,
.cat-links {
    font-size: 0.9rem;
    opacity: 0.75;
}

/* =========================
   Footer
   ========================= */
.site-footer {
    font-size: 0.9rem;
    opacity: 0.9;
}

.site-footer a:hover {
    color: var(--fredy-vert);
}

/* =========================
   Responsive – mobiles
   ========================= */
@media (max-width: 768px) {
    .site-branding img,
    .site-logo img {
        max-height: 60px;
    }

    .main-navigation ul li {
        margin: 0 12px;
    }

    .main-navigation ul li a {
        font-size: 0.95rem;
        letter-spacing: 0.04em;
    }
}
/*************************************************
 * HERO LOGO + SLOGAN – VERSION MINIMALISTE PREMIUM
 * (spécifique à la page d’accueil)
 *************************************************/

.home .site-branding {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 0 32px;
    text-align: center;
}

/* Ligne fine au-dessus et en dessous du bloc */
.home .site-branding::before,
.home .site-branding::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;              /* longueur de la ligne */
    max-width: 70%;
    height: 1px;
    background-color: #e4d7c5;  /* beige doux */
}

.home .site-branding::before {
    top: 0;
}

.home .site-branding::after {
    bottom: 0;
}

/* Logo un peu plus mis en avant */
.home .site-branding img {
    max-height: 135px;
    width: auto;
    margin-bottom: 10px;
}

/* Slogan sous le logo */
.home .site-description {
    margin: 10px 0 0;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8c9195;              /* gris doux */
}

/* On garde un fond très propre sous le header */
.home .site-header-main,
.home .site-header {
    background-color: #fdf7ec;
}
/****************************************************
 * MENU MOBILE / TABLETTE – VERSION GÉNÉRIQUE
 ****************************************************/
@media (max-width: 1024px) {

  /* 1) Tous les <nav> prennent 100% de largeur */
  nav {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 2) Les listes de menu deviennent verticales */
  nav ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    margin: 80px 0 40px 0 !important;
    padding: 0 !important;
  }

  /* 3) Chaque élément de menu sur toute la largeur */
  nav ul li {
    width: 100% !important;
    border-bottom: 1px solid #ececec !important;
  }

  /* 4) Les liens prennent tout l’espace en largeur */
  nav ul li a {
    display: block !important;
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-align: left !important;
  }

  /* 5) Le panneau qui glisse (si le thème en utilise un) prend l’écran complet */
  .offcanvas,
  .offcanvas-wrap,
  .nav--offcanvas,
  .mobile-nav,
  .site-header .offcanvas-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #fffaf0 !important; /* beige clair */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 9999 !important;
  }

  /* 6) Bloquer le scroll du site derrière */
  body.offcanvas-open,
  body.menu-open,
  body.nav-open {
    overflow: hidden !important;
  }

  /* 7) Bouton de fermeture (X) mieux positionné s’il existe */
  .close-btn,
  .menu-close,
  .offcanvas-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    font-size: 26px !important;
    z-index: 10000 !important;
  }
}
