/*
===============================================================================
 THEME ENFANT GENERATEPRESS - STYLES PERSONNALISÉS
===============================================================================
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
===============================================================================
*/

/* ============================================================================
   1. EN-TÊTE MOBILE + IMAGES ALIGNÉES
   - Titre du site fluide sur mobile
   - Images alignleft/alignright centrées sur mobile
============================================================================ */
@media (max-width: 768px) {
  .site-branding .main-title a {
    font-size: clamp(1rem, 6vw, 1.2rem);
    line-height: 1.2;
  }

  .wp-block-image.alignleft,
  .wp-block-image.alignright,
  figure.alignleft,
  figure.alignright {
    float: none !important;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    min-width: 80% !important;
  }

  .wp-block-image.alignleft img,
  .wp-block-image.alignright img,
  figure.alignleft img,
  figure.alignright img {
    width: 80% !important;
    height: auto !important;
  }
}

/* ============================================================================
   2. TYPOGRAPHIE DES FORMULAIRES
   - Front + éditeur Gutenberg
============================================================================ */
form input[type="text"],
form input[type="email"],
form select,
form textarea {
  font: 400 1rem/1.5 "Cormorant Garamond", serif;
  border: 1px solid #c9c3bd;
  border-radius: .35rem;
  padding: .6rem .75rem;
}

.editor-styles-wrapper form input[type="text"],
.editor-styles-wrapper form input[type="email"],
.editor-styles-wrapper form select,
.editor-styles-wrapper form textarea {
  font: 400 1rem/1.5 "Cormorant Garamond", serif;
  border: 1px solid #c9c3bd;
  border-radius: .35rem;
  padding: .6rem .75rem;
}

/* ============================================================================
   3. COMPORTEMENT GÉNÉRAL
============================================================================ */
html {
  scroll-behavior: smooth;
}


/* ============================================================================
   4. STRUCTURE - EN-TÊTES
============================================================================ */
#masthead { border-bottom: 2px solid #8C9C6D; }
#sticky-navigation { border-bottom: 2px solid #8C9C6D; }

/* ============================================================================
   5. TITRES SPÉCIFIQUES (Home & Biographie)
   - Titre Home : 2 lignes fixes via <br class="h1-break">
   - Clamp() correct, pas de césure indésirable
============================================================================ */
/* Home — Titre principal */
.entry-content h1.h1Home {
  font-size: clamp(36px, 7.5vw, 180px) !important;
  line-height: 1.05 !important;
  font-weight: 400 !important;
  text-align: center;
  margin: 0 auto .5rem;

  /* Bloque tout wrap auto (seul le br déclenche la 2e ligne) */
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

/* Le saut de ligne dédié déclenche la seconde ligne */
.h1Home .h1-break { display: block; }

/* Héritage couleur propre (neutralise overrides Gutenberg) */
.entry-content h1.h1Home,
.entry-content h1.h1Home * { color: inherit !important; }

/* Sous-titres Home */
h2.h2Home { font-size: clamp(40px, 7vw, 100px) !important; }
h3.h3Home {
  font-size: clamp(1rem, 2vw, 2rem) !important;
  line-height: clamp(1.2rem, 2.8vw, 2rem);
}

/* Home — Extraits de presse */
h1.h1presse { font-size: clamp(2rem, 4vw, 40rem) !important; }
p.pPresse { font-size: clamp(1rem, 2vw, 1.2rem) !important; }
p.pPresseSignature { font-size: clamp(1rem, 2vw, 1.2rem) !important; }

/* ============================================================================
   6. WOOCOMMERCE PAGES
============================================================================ */
/* Prix (échelle douce) */
.woocommerce-Price-amount {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem) !important;
}

/* Bouton commande */
.wc-block-cart__submit-button { color: #ffffff !important; }

/* Tab description — titre masqué */
.woocommerce-Tabs-panel--description > h2 { display: none; }

/* ============================================================================
   7. CITATIONS AVEC GUILLEMETS (images de guillemets)
============================================================================ */
.wp-block-quote {
  position: relative;
  padding: 2rem 2.5rem;
}
.wp-block-quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background: url('/wp-content/uploads/guillemet-gauche.svg') no-repeat center/contain;
}
.wp-block-quote::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: url('/wp-content/uploads/guillemet-droite.svg') no-repeat center/contain;
}

/* ============================================================================
   8. SLIDERS (Flickity)
============================================================================ */
/* Flèches rapprochées vers l’intérieur */
.flickity-prev-next-button.previous { left: 2rem; }
.flickity-prev-next-button.next { right: 2rem; }

/* Titre des slides — mobile */
@media (max-width: 768px) {
  .extraitspresse {
    font-size: clamp(18px, 5vw, 26px) !important;
    line-height: 1.2;
    margin: 0 0 .5rem;
    text-align: center;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}

/* Guillemets — mobile */
@media (max-width: 768px) {
  .presse-carousel blockquote { quotes: "«" "»"; }
  .presse-carousel blockquote p::before {
    content: open-quote;
    font-size: 0.8em;
    vertical-align: baseline;
    margin-right: 0.2em;
  }
  .presse-carousel blockquote p::after {
    content: close-quote;
    font-size: 0.8em;
    vertical-align: baseline;
    margin-left: 0.2em;
  }
}

/* Padding/alignement — mobile */
@media (max-width: 768px) {
  .flickity-enabled .carousel-cell {
    padding-inline: 12px;
    box-sizing: border-box;
  }
  .flickity-enabled .carousel-cell .alignwide {
    margin-inline: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .flickity-enabled .carousel-cell h1.extraitspresse {
    font-size: clamp(18px, 5vw, 26px) !important;
    line-height: 1.2;
    margin: 0 0 .5rem;
  }
  .flickity-enabled .carousel-cell blockquote,
  .flickity-enabled .carousel-cell .has-text-align-left {
    margin-inline: 0 !important;
    padding-inline: 25px !important;
  }
  .flickity-enabled .carousel-cell blockquote { border-left: 0 !important; }
}

/* ============================================================================
   9. BOUTONS CATÉGORIES PRODUITS (WooCommerce)
============================================================================ */
.wc-block-product-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.wc-block-product-categories-list-item { flex: 0 0 auto; }
.wc-block-product-categories-list-item a {
  display: inline-block;
  padding: 0.5rem 1rem 0.4rem;
  background: #92A271;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.wc-block-product-categories-list-item a:hover { background: #2F3A21; }
.wc-block-product-categories-list-item-count { display: none !important; }
@media (max-width: 768px) {
  .wc-block-product-categories-list-item a {
    padding: 0.35rem 0.75rem 0.3rem;
    font-size: 0.85rem;
  }
}

/* ============================================================================
   10. BOUTONS "VALIDER LA COMMANDE" (Woo Blocks)
============================================================================ */
a.wc-block-cart__submit-button.contained,
a.wc-block-components-button.contained {
  background: #92A271 !important;
  color: #fff !important;
  border-color: #92A271 !important;
}
.wc-block-cart__submit-button .wc-block-components-button__text { color: inherit !important; }
a.wc-block-cart__submit-button.contained:hover,
a.wc-block-components-button.contained:hover,
a.wc-block-cart__submit-button.contained:focus-visible,
a.wc-block-components-button.contained:focus-visible {
  background: #2F3A21 !important;
  color: #fff !important;
  outline: none;
}

/* ============================================================================
   11. EFFET MENU TOP - TRANSPARENCE AU SURVOL
============================================================================ */
#menu-top a { transition: opacity 0.3s ease; }
#menu-top:hover a { opacity: 0.4; }
#menu-top a:hover { opacity: 1; }
