/* =============================================
   HappyKid Theme - style.css v6
   Complete rewrite with section backgrounds,
   bigger menu, picto icons, search box
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Montserrat:wght@400;600;700&display=swap');

:root {
  --hk-pink: #e14d91;
  --hk-pink-light: #f8e0ec;
  --hk-orange: #e8704a;
  --hk-purple: #8e44ad;
  --hk-turquoise: #5bb5b5;
  --hk-grey: #777;
  --hk-white: #fff;
  --hk-font-title: 'Luckiest Guy', 'Comic Sans MS', cursive;
  --hk-font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --hk-radius: 12px;
  --hk-shadow: 0 2px 8px rgba(0,0,0,.08);
}

body { font-family: var(--hk-font-body); color: #444; }
h1, h2, h3, h4 { font-family: var(--hk-font-title); }

/* =============================================
   SECTION BACKGROUNDS
   ============================================= */
.hk-section-welcome { background: url('/themes/custom/happykid/images/backgrounds/bgRose.jpg') repeat; }
.hk-section-agenda { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyAgenda.gif') repeat; }
.hk-section-activities { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyActivities.gif') repeat; }
.hk-section-baby { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyBaby.gif') repeat; }
.hk-section-birthday { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyBirthday.gif') repeat; }
.hk-section-camper { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyCamper.gif') repeat; }
.hk-section-food { background: url('/themes/custom/happykid/images/backgrounds/bkg_HappyFood.gif') repeat; }
.hk-section-help { background: url('/themes/custom/happykid/images/backgrounds/bkg_MaryPoppins.gif') repeat; }

/* =============================================
   HEADER / BANNER - BIGGER
   ============================================= */
.hk-banner { width: 100%; overflow: hidden; line-height: 0; }
.hk-banner-img { width: 100%; height: auto; display: block; min-height: 200px; object-fit: cover; }

/* =============================================
   NAVIGATION - BIGGER MENU
   ============================================= */
.hk-nav { background: rgba(255,255,255,.92); padding: .5rem 0; border-bottom: 3px solid var(--hk-pink-light); }
.hk-nav-links { display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: .3rem; }
.hk-nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none !important; padding: .4rem .8rem; border-radius: 8px; transition: all .2s; min-width: 90px; }
.hk-nav-item:hover { background: var(--hk-pink-light); transform: translateY(-2px); }
.hk-nav-item.active { background: var(--hk-pink-light); border-bottom: 3px solid var(--hk-pink); }
.hk-nav-icon { width: 55px; height: 55px; object-fit: contain; margin-bottom: 4px; }
.hk-nav-item span { font-family: var(--hk-font-title); font-size: .85rem; color: var(--hk-pink); text-align: center; line-height: 1.1; }
.hk-nav-item.hk-welcome span { color: #e14d91; }
.hk-nav-item.hk-agenda span { color: #d4a017; }
.hk-nav-item.hk-activities span { color: #27ae60; }
.hk-nav-item.hk-baby span { color: #e74c9b; }
.hk-nav-item.hk-camper span { color: #2980b9; }
.hk-nav-item.hk-food span { color: #e67e22; }
.hk-nav-item.hk-birthday span { color: #8e44ad; }
.hk-nav-item.hk-help span { color: #c0392b; }
.hk-nav-item.hk-club { background: #333; border-radius: 8px; padding: .6rem 1rem; }
.hk-nav-item.hk-club span { color: white; font-size: .9rem; }
.hk-nav-item.hk-club:hover { background: var(--hk-pink); }

/* =============================================
   MOBILE
   ============================================= */
.hk-mobile-bar { display: none; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: var(--hk-pink); position: sticky; top: 0; z-index: 1000; }
.hk-logo-img { height: 40px; }
.hk-hamburger { background: none; border: none; padding: 6px; cursor: pointer; }
.hk-hamburger span { display: block; width: 28px; height: 3px; background: white; margin: 5px 0; border-radius: 2px; transition: .3s; }
.hk-mobile-menu { background: white; border-bottom: 3px solid var(--hk-pink); z-index: 999; position: sticky; top: 52px; }
.hk-mobile-link { display: block; padding: 1rem 1.5rem; color: var(--hk-pink) !important; font-weight: 600; border-bottom: 1px solid #f0f0f0; text-decoration: none; font-family: var(--hk-font-title); }
.hk-mobile-link:hover { background: var(--hk-pink-light); }
.hk-mobile-club { background: #333; color: white !important; }

/* =============================================
   MAIN CONTENT
   ============================================= */
.hk-main-wrapper { padding-top: 1.5rem; }
.hk-content-main { background: rgba(255,255,255,.85); border-radius: var(--hk-radius); padding: 1.5rem; margin-bottom: 2rem; box-shadow: var(--hk-shadow); }
.hk-sidebar { padding-left: 1.5rem; }

/* =============================================
   SIDEBAR BLOCKS
   ============================================= */
.hk-sidebar-block { border-radius: var(--hk-radius); padding: 1.2rem; margin-bottom: 1rem; box-shadow: var(--hk-shadow); }
.hk-sidebar-block h2 { font-size: 1.3rem; margin-bottom: .8rem; }

/* Search */
.hk-search-block { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.hk-search-block h2 { color: var(--hk-orange); }
.hk-search-input-wrapper { display: flex; gap: .3rem; }
.hk-search-input { flex: 1; border: 2px solid #ddd; border-radius: 20px; padding: .5rem 1rem; font-size: .9rem; }
.hk-search-input:focus { border-color: var(--hk-orange); outline: none; box-shadow: 0 0 0 3px rgba(232,112,74,.2); }
.hk-search-btn { background: var(--hk-orange); border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: white; transition: all .2s; }
.hk-search-btn:hover { background: #d35400; transform: scale(1.05); }
.hk-search-icon { width: 20px; height: 20px; }

/* Club */
.hk-club-block { background: linear-gradient(135deg, var(--hk-purple), #9b59b6); color: white; }
.hk-club-block h2 { color: white; }
.hk-club-block p { color: rgba(255,255,255,.9); }

/* Social */
.hk-social-block { background: linear-gradient(135deg, #b3e5fc, #81d4fa); }
.hk-social-block h2 { color: #0288d1; }
.hk-social-icons { display: flex; gap: .8rem; }
.hk-social { display: flex; width: 45px; height: 45px; border-radius: 50%; background: white; color: var(--hk-pink) !important; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: bold; text-decoration: none !important; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.hk-social:hover { transform: scale(1.15); }

/* Facebook */
.hk-fb-block { background: #f0f2f5; }
.hk-fb-block h2 { color: #1877F2; }
.hk-fb-feed iframe { border-radius: 8px; }

/* Login */
.hk-login-block { background: linear-gradient(135deg, #fde2c8, #f5c6a0); }
.hk-login-block h2 { color: var(--hk-pink); font-size: 1.2rem; }
.hk-login-toggle { background: none; border: none; width: 100%; display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 0; }
.hk-login-toggle h2 { margin: 0; }
.hk-login-arrow { font-size: .7rem; color: var(--hk-pink); transition: transform .3s; }
.hk-login-toggle.open .hk-login-arrow { transform: rotate(180deg); }
.hk-login-form { display: none; margin-top: 1rem; }
.hk-login-form.open { display: block; }
.hk-form-group { margin-bottom: .8rem; }
.hk-form-group label { display: block; font-size: .85rem; color: var(--hk-pink); font-weight: 600; margin-bottom: .3rem; }
.hk-login-btn { width: 100%; margin-top: .5rem; }
.hk-login-links { margin-top: .8rem; display: flex; flex-direction: column; gap: .3rem; }
.hk-login-links a { font-size: .8rem; color: var(--hk-pink) !important; }

@media (min-width: 992px) {
  .hk-login-form { display: block; }
  .hk-login-arrow { display: none; }
  .hk-login-toggle { cursor: default; }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary, .button, input[type=submit] { background: var(--hk-pink) !important; border-color: var(--hk-pink) !important; color: white !important; border-radius: 25px; padding: .5rem 1.5rem; font-weight: 600; transition: all .2s; }
.btn-primary:hover, .button:hover, input[type=submit]:hover { background: #c93d7d !important; border-color: #c93d7d !important; transform: translateY(-1px); }
.form-control, input[type=text], input[type=email], input[type=password], textarea, select { border-radius: 8px; border: 1px solid var(--hk-pink-light); }
.form-control:focus { border-color: var(--hk-pink); box-shadow: 0 0 0 3px rgba(225,77,145,.15); }

/* =============================================
   FOOTER
   ============================================= */
.hk-footer { background: linear-gradient(135deg, var(--hk-pink), #c93d7d) !important; color: white; padding: 2.5rem 0 1rem; margin-top: 0; }
.hk-footer h3 { font-family: var(--hk-font-title); color: white !important; font-size: 1.2rem; margin-bottom: 1rem; }
.hk-footer p { font-size: .9rem; line-height: 1.6; color: rgba(255,255,255,.9); }
.hk-footer-links { list-style: none; padding: 0; margin: 0; }
.hk-footer-links li { margin-bottom: .4rem; }
.hk-footer-links a { color: white !important; text-decoration: none; font-size: .9rem; }
.hk-footer-links a:hover { text-decoration: underline; }
.hk-footer-social { text-align: center; padding: 1.5rem 0; margin-top: 1rem; }
.hk-social-footer { display: inline-flex; width: 50px; height: 50px; border-radius: 50%; background: white; color: var(--hk-pink) !important; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: bold; margin: 0 8px; text-decoration: none !important; transition: transform .2s; }
.hk-social-footer:hover { transform: scale(1.1); }
.hk-copyright { text-align: center; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.3); font-size: .85rem; color: rgba(255,255,255,.8); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
  .hk-mobile-bar { display: flex !important; }
  .hk-sidebar { padding-left: 0; margin-top: 1.5rem; }
  .hk-content-main { padding: 1rem; }
  h1 { font-size: 1.5rem; }
  .hk-footer .row > div { text-align: center; margin-bottom: 1.5rem; }
}

/* =============================================
   VIEWS GRID
   ============================================= */
.views-view-grid { width: 100%; }
.views-view-grid .views-row { background: var(--hk-white); border: 1px solid var(--hk-pink-light); border-radius: var(--hk-radius); padding: 0; margin-bottom: 1.2rem; box-shadow: var(--hk-shadow); overflow: hidden; }
.views-view-grid .views-row img { width: 100%; height: auto; display: block; border-radius: 0; }
.views-view-grid .views-row h3 { padding: .8rem 1rem 0; font-size: 1.1rem; }
.views-view-grid .views-row h3 a { color: var(--hk-pink); }
.views-view-grid .views-field { padding: 0 1rem; }
.views-view-grid .views-field-field-photos { padding: 0; }

/* =============================================
   PICTOGRAM ICONS (Caractéristiques)
   Using CSS ::before with emoji/icons for each term
   ============================================= */
.views-field-taxonomy-vocabulary-13 { padding: .3rem 1rem .8rem; font-size: .82rem; color: #666; line-height: 2.2; }
.views-field-taxonomy-vocabulary-13 .field-content { display: flex; flex-wrap: wrap; gap: .3rem; }

/* Node detail pictos */
.node .field--name-taxonomy-vocabulary-13 { font-size: .85rem; margin: .8rem 0; }
.node .field--name-taxonomy-vocabulary-13 .field__items { display: flex; flex-wrap: wrap; gap: .4rem; }
.node .field--name-taxonomy-vocabulary-13 .field__item,
.hk-picto-tag { display: inline-flex; align-items: center; gap: .3rem; background: #f8f4ff; border: 1px solid #e8d5f5; border-radius: 20px; padding: .25rem .7rem; font-size: .78rem; color: #666; font-style: normal; white-space: nowrap; }

/* Picto icon mapping via data attributes or text matching in JS */
.hk-picto-tag[data-picto="coeur"]::before { content: "❤️"; }
.hk-picto-tag[data-picto="gratuit"]::before { content: "🆓"; }
.hk-picto-tag[data-picto="inscription"]::before { content: "📋"; }
.hk-picto-tag[data-picto="pleinair"]::before { content: "🌳"; }
.hk-picto-tag[data-picto="pluie"]::before { content: "☔"; }
.hk-picto-tag[data-picto="enfants"]::before { content: "👶"; }
.hk-picto-tag[data-picto="adultes"]::before { content: "👨‍👩‍👧"; }
.hk-picto-tag[data-picto="parent"]::before { content: "👨‍👧"; }
.hk-picto-tag[data-picto="besoins"]::before { content: "♿"; }
.hk-picto-tag[data-picto="francophone"]::before { content: "🌍"; }

/* Event card metadata */
.hk-age { font-weight: 600; color: var(--hk-orange); }
.hk-lieu { font-size: .85rem; color: var(--hk-grey); }
.hk-lieu a { color: var(--hk-turquoise) !important; }
.views-field-field-agemin, .views-field-field-lieu2 { font-size: .85rem; padding: .2rem 1rem; }

@media (max-width: 991px) {
  .views-view-grid .views-col { width: 100% !important; }
}

/* =============================================
   EXPOSED FILTERS
   ============================================= */
.views-exposed-form { background: rgba(255,255,255,.95); border: 1px solid var(--hk-pink-light); border-radius: var(--hk-radius); padding: 1rem 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--hk-shadow); }
.views-exposed-form .form-item { margin-bottom: .8rem; }
.views-exposed-form label { font-weight: 600; color: var(--hk-pink); font-size: .9rem; margin-bottom: .3rem; }
.views-exposed-form select, .views-exposed-form input[type=text] { border: 1px solid #ddd; border-radius: 6px; padding: .4rem .6rem; width: 100%; max-width: 300px; }
.views-exposed-form .form-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.views-exposed-form .form-actions .button, .views-exposed-form .form-actions input[type=submit] { background: var(--hk-pink); color: white; border: none; border-radius: 6px; padding: .5rem 1.5rem; cursor: pointer; font-weight: 600; }
.views-exposed-form .form-actions .button:hover { background: #c93070; }

/* =============================================
   CALENDAR WIDGET
   ============================================= */
.hk-calendar { background: rgba(255,255,255,.95); border: 1px solid var(--hk-pink-light); border-radius: var(--hk-radius); padding: 1rem; margin-bottom: 1.5rem; box-shadow: var(--hk-shadow); }
.hk-cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.hk-cal-header h3 { font-family: var(--hk-font-title); color: var(--hk-pink); font-size: 1.3rem; margin: 0; }
.hk-cal-nav { background: none; border: none; font-size: 1.5rem; color: var(--hk-orange); cursor: pointer; padding: .2rem .6rem; }
.hk-cal-nav:hover { color: var(--hk-pink); }
.hk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; }
.hk-cal-day-header { font-weight: 700; font-size: .75rem; color: var(--hk-grey); padding: .3rem 0; }
.hk-cal-day { padding: .4rem .2rem; font-size: .85rem; border-radius: 4px; cursor: pointer; transition: all .15s; }
.hk-cal-day:hover { background: var(--hk-pink-light); }
.hk-cal-day.today { font-weight: 700; color: var(--hk-orange); }
.hk-cal-day.selected { background: var(--hk-pink); color: white; font-weight: 700; }
.hk-cal-day.empty { color: #ccc; cursor: default; }
.hk-cal-day.empty:hover { background: transparent; }

/* =============================================
   EVENT DETAIL
   ============================================= */
.node--type-event .field--name-field-photos img, .node--type-happyactivities .field--name-field-photos img,
.node--type-happybaby .field--name-field-photos img, .node--type-happybirthday .field--name-field-photos img,
.node--type-happycamper .field--name-field-photos img, .node--type-happyfood .field--name-field-photos img { max-width: 100%; height: auto; border-radius: var(--hk-radius); margin-bottom: 1rem; }
.node .field--name-body { margin-bottom: 1.5rem; line-height: 1.7; }
.node .field--name-field-agemin, .node .field--name-field-agemax { display: inline-block; margin-right: 1rem; font-size: .9rem; color: var(--hk-orange); font-weight: 600; }
.node .field--name-field-lieu2 { margin-bottom: 1rem; }
.node .field--name-field-lieu2 a { color: var(--hk-turquoise); }
.node .field--name-field-contact { background: #f0f8ff; padding: 1rem; border-radius: var(--hk-radius); margin: 1rem 0; }
.node .field--name-field-siteweb { margin: .5rem 0; }
.node .field--name-field-siteweb a { color: var(--hk-pink); }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--hk-pink); margin-bottom: .5rem; }
.breadcrumb a { color: var(--hk-pink); }

/* Pager */
.pager { text-align: center; margin: 2rem 0; }
.pager__items { display: flex; justify-content: center; gap: .5rem; list-style: none; padding: 0; }
.pager__item a, .pager__item span { display: inline-block; padding: .4rem .8rem; border-radius: 6px; background: var(--hk-white); border: 1px solid var(--hk-pink-light); color: var(--hk-pink); text-decoration: none; }
.pager__item--active a, .pager__item--active span { background: var(--hk-pink); color: white; }
.pager__item a:hover { background: var(--hk-pink-light); }

/* Language switch */
.hk-lang-switch { text-align: right; margin-bottom: 1rem; }
.hk-lang { font-size: .85rem; margin-left: .5rem; color: #555; text-decoration: none; }
.hk-lang img { width: 16px; height: 12px; vertical-align: middle; margin-right: 2px; }
