/*!
Theme Name: calendrier
Theme URI: https://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Thème dédié au jeu Calendrier de l'avent (plugin calendrier-avent).
Version: 1.0.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: calendrier
Tags: custom-logo, one-column, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

/*--------------------------------------------------------------
# Base
---------------------------------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  color: #1d2327;
  background: #ffffff;
}

a {
  color: #c8102e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/*--------------------------------------------------------------
# Layout
---------------------------------------------------------------*/
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

/*--------------------------------------------------------------
# Header / navigation
---------------------------------------------------------------*/
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #e7e7e7;
  background: #ffffff;
}

.site-branding .custom-logo {
  max-height: 56px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 1.35em;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  text-decoration: none;
  color: #c8102e;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li > a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: #1d2327;
}

.main-navigation li > a:hover,
.main-navigation .current-menu-item > a {
  background: #f5f5f5;
  color: #c8102e;
  text-decoration: none;
}

.main-navigation .menu-toggle {
  display: none;
  border: 1px solid #d6d6d6;
  background: #ffffff;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-navigation .menu-toggle {
    display: block;
  }

  .main-navigation ul {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .main-navigation.toggled ul {
    display: flex;
  }
}

/*--------------------------------------------------------------
# Contenu
---------------------------------------------------------------*/
.entry-header {
  margin-bottom: 20px;
}

.page-title,
.entry-title {
  margin: 0;
  font-size: 2em;
  line-height: 1.2;
}

.entry-content > h2,
.entry-content > h3 {
  line-height: 1.3;
}

/*--------------------------------------------------------------
# Pied de page
---------------------------------------------------------------*/
.site-footer {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid #e7e7e7;
  text-align: center;
  background: #fafafa;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-logo .custom-logo {
  max-height: 48px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-logo a:hover .custom-logo {
  opacity: 1;
}

.site-footer-text {
  margin: 0;
  font-size: 0.9em;
  color: #646970;
}

/*--------------------------------------------------------------
# Utilitaires
---------------------------------------------------------------*/
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/*--------------------------------------------------------------
 # Landing Page — vidéo plein écran
 ---------------------------------------------------------------*/
body.home {
  background: #0b0b10;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #2b0410 0%, #0b0b10 65%);
}

.landing-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .landing-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 12, 0.55) 0%,
    rgba(8, 8, 12, 0.2) 45%,
    rgba(8, 8, 12, 0.75) 100%
  );
} */

.site-main.landing-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;
  text-align: center;
}

.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.landing-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(300px, 68vw);
  aspect-ratio: 1;
  margin: 0;
  padding: 36px;
  background: #ffffff;
  border-radius: 50%;
  line-height: 0;
}

.landing-logo {
  width: 100%;
  height: auto;
}

.landing-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 600;
  line-height: 1.6;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.landing-btn {
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #e20613;
  border-radius: 50px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  animation: pulse-glow 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.landing-btn svg {
  margin-left: 8px;
  width: 1.2em;
  height: 1.2em;
  translate: 16px 0;
  transition: translate 0.2s ease;
}
.landing-btn:hover {
  text-decoration: none;
}
.landing-btn:hover svg {
  translate: 20px 0;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
  }
  50% {
    box-shadow: 0 6px 25px rgba(200, 16, 46, 0.6);
  }
}

/*--------------------------------------------------------------
 # Page campagne — vidéo plein écran + formulaire centré
 ---------------------------------------------------------------*/
.site-main.campaign-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 56px 20px;
}

.campaign-page .entry-content {
  width: 100%;
}

/* Encart du formulaire (surcharge le plugin, d'où la double classe) */
.campaign-page .cal-avent-register {
  max-width: 460px;
  margin: 0 auto;
  padding: 34px 30px;
  background: rgba(113, 115, 122, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  text-align: center;
  backdrop-filter: blur(4px);
}

.campaign-page .cal-avent-logo {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.campaign-page .cal-avent-register-title {
  margin: 0;
  font-size: 1.5em;
  color: #ffffff;
}

.campaign-page .cal-avent-register-sub {
  margin: 6px 0 14px;
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
}

.campaign-page .cal-avent-register-intro {
  margin: 0 0 18px;
  font-size: 0.9em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.campaign-page .cal-avent-field,
.campaign-page .cal-av-field {
  margin: 0 0 12px;
  text-align: left;
}

.campaign-page .cal-avent-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #ffffff;
}

.campaign-page .cal-avent-field input[type="email"],
.campaign-page .cal-avent-field input[type="text"],
.campaign-page .cal-avent-field input[type="tel"] {
  width: 100%;
  padding: 11px 12px;
  background: #d8cebc;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  color: #2b2b2b;
  font-size: 1em;
}

.campaign-page .cal-avent-field input:focus-visible {
  outline: 2px solid #cb5040;
  outline-offset: 1px;
}

.campaign-page .cal-av-consent {
  font-size: 0.85em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.campaign-page .cal-av-consent input {
  accent-color: #cb5040;
}

.campaign-page .cal-avent-submit {
  width: 100%;
  padding: 13px 22px;
  background: #cb5040;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.campaign-page .cal-avent-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.campaign-page .cal-avent-note {
  margin: 16px 0 0;
  font-size: 0.82em;
  color: rgba(255, 255, 255, 0.7);
}

/* Consentement court + popup RGPD */
.campaign-page .cal-av-consent-row {
  align-items: center;
}

.campaign-page .cal-av-rgpd-open {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #ffffff;
}

.campaign-page .cal-av-rgpd-open:hover {
  background: #cb5040;
  border-color: #cb5040;
}

.campaign-page .cal-av-popup-card {
  background: rgba(113, 115, 122, 0.96);
  color: #ffffff;
}

.campaign-page .cal-av-popup-title {
  color: #ffffff;
}

.campaign-page .cal-av-popup-close {
  color: rgba(255, 255, 255, 0.85);
}

.campaign-page .cal-av-popup-close:hover {
  color: #ffffff;
}

.campaign-page .cal-avent-player,
.campaign-page .cal-avent-message {
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* Grille du calendrier — texte à gauche de la grille (fond vidéo) */
.campaign-page .cal-avent-side-text {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.campaign-page .cal-av-thanks-card {
  text-align: center;
  background: #d8cebc;
  color: #cb5040;
}

.campaign-page .cal-av-thanks-card .cal-av-popup-title {
  color: #cb5040;
}

.campaign-page .cal-av-thanks-card .cal-avent-register-sub {
  color: #a04a3d;
}

.campaign-page .cal-av-thanks-card .cal-av-popup-close {
  color: #cb5040;
}

/*--------------------------------------------------------------
 # Thème Noël - Décorations
 ---------------------------------------------------------------*/
body {
  position: relative;
  background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

/* Flocons de neige animés */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image:
    radial-gradient(2px 2px at 20% 10%, #fff 50%, transparent),
    radial-gradient(2px 2px at 80% 20%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 40% 30%, #fff 50%, transparent),
    radial-gradient(2px 2px at 60% 5%, #fff 50%, transparent),
    radial-gradient(1px 1px at 90% 40%, #fff 50%, transparent),
    radial-gradient(2px 2px at 10% 60%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 70% 70%, #fff 50%, transparent),
    radial-gradient(2px 2px at 30% 80%, #fff 50%, transparent);
  background-repeat: repeat;
  background-size: 400px 400px;
  animation: snow-fall 15s linear infinite;
  opacity: 0.6;
}

body::after {
  animation-delay: -7.5s;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 15%, #fff 50%, transparent),
    radial-gradient(2px 2px at 85% 25%, #fff 50%, transparent),
    radial-gradient(1px 1px at 45% 35%, #fff 50%, transparent),
    radial-gradient(2px 2px at 55% 15%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 95% 45%, #fff 50%, transparent),
    radial-gradient(2px 2px at 5% 65%, #fff 50%, transparent),
    radial-gradient(1px 1px at 75% 75%, #fff 50%, transparent),
    radial-gradient(2px 2px at 25% 85%, #fff 50%, transparent);
}

@keyframes snow-fall {
  0% {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0,
      0 0,
      0 0,
      0 0,
      0 0;
  }
  100% {
    background-position:
      200px 800px,
      -100px 900px,
      150px 850px,
      -200px 800px,
      100px 900px,
      -150px 850px,
      200px 800px,
      -100px 900px;
  }
}

.entry-title::after {
  animation-delay: 1.5s;
  background: radial-gradient(circle at 30% 30%, #ffd700, #2d7d2d 70%);
}

/* Style pour le calendrier (shortcode) */
.site-main .calendrier-avent,
.site-main [class*="calendrier"] {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(200, 16, 46, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .entry-title::before,
  .entry-title::after {
    width: 14px;
    height: 14px;
    margin: 0 8px;
  }

  .site-header::before,
  .site-header::after,
  .site-footer::before,
  .site-footer::after {
    width: 28px;
    height: 35px;
  }
}
