/*
Theme Name: Claque Begnins 2026
Theme URI: https://claquebegnins.ch
Author: Origamii Design
Author URI: https://origamii.design
Description: Theme sur mesure pour La Claque de Begnins - version 2026 nettoyee et optimisee.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: claque-begnins-2026
*/

/* ==========================================================================
   BREAKPOINTS DE REFERENCE
   --mobile:     600px
   --tablet:     780px
   --desktop:    1200px
   --desktop-lg: 1500px
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL RESETS
   ========================================================================== */

article {
  display: flex;
  flex-direction: column;
  align-content: center;
}

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

/* ==========================================================================
   2. ANIMATION PARTAGEE (rotation gérée par GSAP dans transition.js)
   ========================================================================== */

/* ==========================================================================
   3. LAYOUT OVERRIDE
   ========================================================================== */

.is-layout-constrained > section {
  max-width: 90%;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ==========================================================================
   4. PIECES DISPLAY COMPONENT
   ========================================================================== */

.pieces-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1em;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin-bottom: 1em;
}

.pieces-error a {
  color: #721c24;
  text-decoration: underline;
}

.pieces-display-block {
  margin: 2em 0;
  font-family: var(--wp--preset--font-family--system-font);
}

.pieces-annee {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 1em;
  color: var(--wp--preset--color--dark-gray);
}

.pieces-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: flex-start;
}

.pieces-featured-image {
  flex: 1 1 300px;
  max-width: 500px;
}

.pieces-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pieces-details {
  flex: 1 1 300px;
}

.pieces-titre1,
.pieces-titre2,
.pieces-titre3 {
  margin: 0 0 0.3em 0;
  line-height: 1.2;
  font-weight: bold;
}

.pieces-titre1 {
  color: var(--wp--preset--color--black);
}

.pieces-titre2 {
  color: var(--wp--preset--color--medium-gray);
}

.pieces-titre3 {
  color: var(--wp--preset--color--dark-gray);
}

.pieces-auteur {
  margin: 0.8em 0;
  font-style: italic;
  font-weight: 500;
}

.pieces-mise-en-scene {
  margin: 0.8em 0;
  font-size: 1em;
}

/* ==========================================================================
   5. TICKET COMPONENT
   ========================================================================== */

.ticket {
  margin-top: -4em;
  z-index: 2;
  display: block;
  position: relative;
  font-size: calc(0.1rem + 30%);
  font-family: var(--wp--preset--font-family--ticket);
  translate: 0 0;
  rotate: -2deg;
  scale: 1;
  transition: all 0.2s ease-out;
  padding-bottom: 1em;
  isolation: isolate;
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.25));
}

.ticket::before, .ticket::after {
  content: '';
  position: absolute;
  width: 30em;
  max-width: none;
  top: 0;
  left: 0;
  height: calc(100% - 1em);
  
  opacity: 0.5;
  pointer-events: none;
  z-index: 10;
}

.ticket::before {
background-image: url('./assets/images/texture-papier-ticket.png');
  background-size: contain;
  mix-blend-mode: color-burn;
}

.ticket::after{
background-image: url('./assets/images/texture-papier-ticket-neg.png');
  background-size: contain;
  mix-blend-mode: screen;
}


.ticket__img {
  width: 30em;
  max-width: none;
  top: 0;
  left: 0;
  object-fit: contain;
}

.ticket__content {
  position: absolute;
  width: 26em;
  top: 0;
  left: 0;
  padding: 1.6em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  align-self: center;
}

.ticket__droite,
.ticket__gauche,
.ticket__centre {
  height: 12.5em;
}

.ticket__droite,
.ticket__gauche {
  box-shadow: 0.08em 0.08em 0.1em var(--wp--custom--color--rose-80);
  background-color: var(--wp--custom--color--dark-brown-80);
  width: 1px;
  margin: 0 5%;
}

.ticket__centre {
  display: flex;
  width: 80%;
  flex-direction: column;
  justify-content: space-between;
}

.ticket__centre .separateur {
  width: 100%;
  height: 1px;
  background-color: var(--wp--custom--color--dark-brown-80);
  box-shadow: 0.08em 0.08em 0.1em var(--wp--custom--color--rose-80);
}

/* Ticket : variante mini */
.mini {
  margin-top: -8em;
}

a .ticket.mini h3,
a .ticket.mini h4 {
  color: var(--wp--preset--color--rose);
  font-weight: 500;
  font-size: 2em;
  text-shadow: 0.03em 0.03em 0.1em var(--wp--custom--color--rose-60);
}

a .ticket.mini h2 {
  font-weight: 600;
  color: var(--wp--custom--color--dark-brown-85);
  font-size: 3.2em;
  margin: 0;
  padding: 0;
  line-height: 0.8em;
  text-shadow: 0.03em 0.03em 0.05em var(--wp--custom--color--rose-60);
}

a .ticket.mini h4 {
  font-size: 2.3em;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
  margin-bottom: -0.2em;
}

a .ticket.mini h3 {
  margin: 0;
  padding: 0;
  margin-top: -0.2em;
}

/* Ticket : variante maxi */
.ticket.maxi {
  font-size: 14px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.ticket.maxi h2,
.ticket.maxi h3 {
  color: var(--wp--preset--color--rose);
  font-weight: 500;
  font-size: 2em;
  text-shadow: 0.03em 0.03em 0.1em var(--wp--custom--color--rose-60);
}

.ticket.maxi h1 {
  font-weight: 600;
  color: var(--wp--custom--color--dark-brown-85);
  font-size: 3.2em;
  margin: 0;
  padding: 0;
  line-height: 0.8em;
  text-shadow: 0.03em 0.03em 0.05em var(--wp--custom--color--rose-60);
}

.ticket.maxi h3 {
  font-size: 2.3em;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
  margin-bottom: -0.2em;
}

.ticket.maxi h2 {
  margin: 0;
  padding: 0;
  margin-top: -0.2em;
}

/* Ticket : variante dates */
.ticket.dates {
  margin-top: -18em;
  text-align: left;
}

.ticket.dates h3,
.ticket.dates h4 {
  color: var(--wp--preset--color--rose);
  font-weight: 500;
  font-size: 2em;
  text-shadow: 0.03em 0.03em 0.1em var(--wp--custom--color--rose-60);
}

.ticket.dates h2 {
  font-weight: 600;
  color: var(--wp--custom--color--dark-brown-85);
  font-size: 3.2em;
  margin: 0;
  padding: 0;
  line-height: 0.8em;
  text-shadow: 0.03em 0.03em 0.05em var(--wp--custom--color--rose-60);
}

.ticket.dates h4 {
  font-size: 2.3em;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
  margin-bottom: -0.2em;
}

.ticket.dates h3 {
  margin: 0;
  padding: 0;
  margin-top: -0.2em;
}

/* ==========================================================================
   6. BANDEAU MISE EN SCENE
   ========================================================================== */

.bandeau-m-e-s {
  z-index: 0;
  display: block;
  position: relative;
  font-size: 1rem;
  padding: 1em;
  font-family: var(--wp--preset--font-family--ticket);
  rotate: 3deg;
}

.m-e-s__img {
  width: 25em;
  height: 5em;
  object-fit: cover;
  filter: drop-shadow(1.5px 1.5px 4px rgba(0, 0, 0, 0.25));
}

.m-e-s__content {
  position: absolute;
  width: 25em;
  padding: 1.4em 2em;
  line-height: 0.2;
  top: 0;
  left: 0;
}

/* ==========================================================================
   7. GRILLE PIECES RECENTES
   ========================================================================== */

.recent-pieces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));
  gap: 3em;
  align-items: center;
  justify-items: center;
  margin-bottom: 2.5em;
}

.recent-pieces-txt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 0.5em 10%;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

a.list-piece {
  width: 275px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  position: relative;
}

.list-piece .wp-post-image {
  width: 100%;
  translate: 0 0;
  scale: 1;
  transition: all 0.2s ease-out;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.25);
}

.list-piece:hover .wp-post-image {
  translate: 0 -1.7em;
  scale: 1.05;
  box-shadow: 0 15px 15px 0 rgba(0, 0, 0, 0.25);
}

.list-piece:hover .ticket {
  translate: 0 0;
  rotate: -5deg;
  scale: 1.1;
}

.list-piece:nth-of-type(7),
.list-piece:nth-of-type(8),
.list-piece:nth-of-type(9),
.list-piece:nth-of-type(10) {
  display: none;
}

.list-piece-txt:nth-of-type(1),
.list-piece-txt:nth-of-type(2),
.list-piece-txt:nth-of-type(3),
.list-piece-txt:nth-of-type(4) {
  display: flex;
}

/* ==========================================================================
   8. TICKET LIST (section texte)
   ========================================================================== */

.ticket-list {
  display: flex;
  align-items: center;
  padding: 0.5em 0;
}

.ticket-list .info-ticket {
  display: flex;
  align-items: baseline;
}

.recent-pieces-txt {
  display: grid;
}

.recent-pieces-txt a {
  text-decoration: none;
}

.ticket-list i {
  text-decoration: none;
  transform: rotateZ(90deg) translate(0.1em, 0.7em);
  transition: transform 0.3s cubic-bezier(0.46, -1.12, 0.54, 2.01);
  font-size: 1.2em;
  margin-left: -1em;
}

.ticket-list h2,
.ticket-list h3 {
  text-decoration: none;
  color: var(--wp--custom--color--dark-brown-85);
  transition: color 0.3s ease-in-out;
  margin: 0;
  padding: 0;
}

.ticket-list h2 {
  font-size: 1.2em;
  font-weight: 600;
}

.ticket-list h3 {
  font-size: 0.8em;
  font-weight: 500;
  transform: translateY(0.1em);
}

.recent-pieces-txt > a:hover h2 {
  color: var(--wp--preset--color--dark-red);
}

.recent-pieces-txt > a:hover i {
  color: var(--wp--preset--color--dark-red);
  transform: rotateZ(90deg) translate(0.1em, 0.2em);
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
  .pieces-content {
    flex-direction: column;
  }
  .pieces-featured-image,
  .pieces-details {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 780px) {
  .ticket {
    margin-left: 4vw;
  }
  .bandeau-m-e-s {
    margin-top: -1.5em;
  }
}

@media (min-width: 1200px) {
  .list-piece:nth-of-type(7),
  .list-piece:nth-of-type(8) {
    display: flex;
  }
}

@media (min-width: 1500px) {
  .list-piece:nth-of-type(9),
  .list-piece:nth-of-type(10) {
    display: flex;
  }
  .list-piece-txt:nth-of-type(3),
  .list-piece-txt:nth-of-type(4) {
    display: none;
  }
}
