/* assets/css/sections/home-play.css
 * SCOPE STRICT : #play
 * Harmonisation Style "Carnet / Chroniques"
 * VERSION : DARK MODE COMPATIBLE + BIG VIDEO + UNIFORM HEIGHT
 */

#play {
/* Couleurs sémantiques (s'adaptent au thème global) */
--play-accent: var(--accent, #ff4500);
--play-text:   var(--text, #1a1a1a);
--play-bg:     var(--bg, #ffffff);
--play-border: var(--border, #eeeeee);

/* IMPORTANT : Surface dynamique (ex: blanc en light, gris sombre en dark) */
--play-surface: var(--surface, var(--bg));

max-width: 1200px;
margin: 0 auto;
padding: 20px 20px;
color: var(--play-text);
background: transparent;
}

/* =========================
 * HEADER HARMONISÉ
 * ========================= */
#play .play-header-main {
margin-bottom: 40px;
padding-bottom: 12px;
border-bottom: 2px solid var(--play-text);
}

#play .play-subtitle {
font-size: 0.78rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--play-accent);
margin: 0 0 6px 0;
}

#play .play-title-main {
margin: 0;
font-size: 2.25rem;
font-weight: 900;
text-transform: uppercase;
letter-spacing: -0.5px;
line-height: 1.05;
}

#play .play-title-sep {
color: var(--play-accent);
}

#play .play-intro {
margin: 12px 0 0 0;
max-width: 70ch;
opacity: 0.9;
font-size: 1rem;
line-height: 1.5;
}

/* =========================
 * SOUS-TITRES DE BLOCS
 * ========================= */
#play .block-header-styled {
margin-bottom: 25px;
}

#play .block-header-styled h3 {
font-size: 1.4rem;
font-weight: 800;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 12px;
margin: 0 0 5px 0;
color: var(--play-text);
}
#play .block-header-styled h3 i {
color: var(--play-accent);
}

#play .block-sub {
font-size: 0.95rem;
opacity: 0.7;
}

/* =========================
 * BLOC FILMS (Youtube/Paysage)
 * ========================= */
#play .block-films {
margin-bottom: 60px;
}

#play .films-list {
display: grid;
grid-template-columns: 1fr;
gap: 30px;
}

#play .play-card-film {
display: flex;
flex-direction: column;
background: var(--play-surface); /* S'adapte au dark mode */
border: 1px solid var(--play-border);
border-radius: 14px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0,0,0,0.03);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#play .play-card-film:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(0,0,0,0.06);
border-color: color-mix(in srgb, var(--play-accent) 20%, var(--play-border));
}

@media (min-width: 900px) {
  #play .play-card-film {
  flex-direction: row;
  height: 340px;
  }
  #play .play-film-media {
  flex: 0 0 60%;
  height: 100%;
  }
  #play .play-film-content {
  flex: 1;
  padding: 30px;
  justify-content: center;
  }
}

#play .play-film-media {
background: #000;
position: relative;
width: 100%;
aspect-ratio: 16/9;
}
@media (min-width: 900px) {
  #play .play-film-media { aspect-ratio: auto; }
}

#play .play-film-media video,
#play .play-film-media iframe {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}

#play .play-film-content {
padding: 20px;
display: flex;
flex-direction: column;
}

#play .play-film-meta {
display: flex;
gap: 15px;
font-size: 0.8rem;
font-weight: 700;
color: var(--play-accent);
text-transform: uppercase;
margin-bottom: 10px;
}

#play .play-film-title {
margin: 0 0 10px 0;
font-size: 1.25rem;
font-weight: 800;
line-height: 1.2;
}

#play .play-film-desc {
font-size: 0.95rem;
opacity: 0.8;
line-height: 1.5;
}

#play .play-cta-wrapper {
margin-top: 20px;
}
#play .play-btn-yt {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
background: #ff0000;
color: #fff;
border-radius: 99px;
font-weight: 700;
font-size: 0.85rem;
text-decoration: none;
transition: transform 0.2s;
}
#play .play-btn-yt:hover {
transform: scale(1.05);
background: #d00000;
}

/* =========================
 * BLOC REELS (Rail)
 * ========================= */
#play .block-reels {
position: relative;
}

#play .reels-top-bar {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 20px;
flex-wrap: wrap;
gap: 15px;
}

#play .reels-nav {
display: flex;
gap: 10px;
}

#play .reels-nav-arrow {
width: 40px; height: 40px;
border-radius: 50%;
display: grid; place-items: center;
background: var(--play-bg);
border: 1px solid var(--play-border);
color: var(--play-text);
cursor: pointer;
transition: all 0.2s ease;
}
#play .reels-nav-arrow:hover {
border-color: var(--play-accent);
color: var(--play-accent);
}
#play .reels-nav-arrow.is-disabled {
opacity: 0.3;
pointer-events: none;
}

/* RAIL SCROLL */
#play .reels-rail-wrap {
position: relative;
margin: 0 -20px;
padding: 0 20px;
}

/* UNIFORM HEIGHT */
#play .reels-rail {
display: flex;
gap: 20px;
overflow-x: auto;
padding-bottom: 20px;
scroll-snap-type: x mandatory;
scrollbar-width: none;
align-items: stretch; /* Hauteur uniforme */
}
#play .reels-rail::-webkit-scrollbar { display: none; }

#play .reel-item-wrap {
flex: 0 0 auto;
width: 320px;
scroll-snap-align: start;
display: flex;
flex-direction: column;
height: auto;
gap: 12px;
}
@media (min-width: 600px) {
  #play .reel-item-wrap {
  width: 520px; /* LARGEUR GRAND FORMAT */
  }
}

#play .play-card-reel {
position: relative;
background: var(--play-surface); /* Dark mode safe */
border: 1px solid var(--play-border);
border-radius: 14px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0,0,0,0.03);
display: flex;
flex-direction: column;
height: 100%; /* Remplissage hauteur */
}

/* Layout Desktop Reel */
@media (min-width: 600px) {
  #play .play-card-reel {
  flex-direction: row;
  min-height: 300px;
  }

  #play .play-reel-media {
  flex: 0 0 230px; /* LARGEUR VIDÉO CONSÉQUENTE */
  padding: 0;
  border-right: 1px solid var(--play-border);
  }

  #play .play-reel-body {
  flex: 1;
  justify-content: center;
  }
}

#play .play-reel-media {
background: transparent;
display: grid; place-items: center;
position: relative;
}

#play .play-reel-video-box {
width: 100%;
height: 100%;
aspect-ratio: auto;
background: transparent;
border-radius: 0;
overflow: hidden;
position: relative;
}

/* VIDEO CONTAIN (NO CROP) */
#play .play-reel-video {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
background: #000;
}

#play .play-reel-body {
padding: 25px;
display: flex;
flex-direction: column;
}

#play .play-reel-title {
font-size: 1.1rem;
font-weight: 800;
margin: 0 0 10px 0;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

#play .play-reel-meta {
font-size: 0.7rem;
font-weight: 700;
color: var(--play-accent);
text-transform: uppercase;
margin-bottom: 12px;
display: flex; gap: 10px; flex-wrap: wrap;
}

#play .play-reel-text {
font-size: 0.9rem;
opacity: 0.85;
margin-bottom: 15px;
line-height: 1.5;
display: block; /* FULL TEXT */
}

#play .play-reel-footer-caption {
font-size: 0.7rem;
text-align: center;
padding: 8px;
background: rgba(0,0,0,0.02);
border-top: 1px solid var(--play-border);
color: var(--play-text);
opacity: 0.6;
}

/* Chips Links */
#play .play-reel-links {
display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto;
}
#play .play-chip-link {
font-size: 0.7rem;
font-weight: 700;
background: var(--play-surface);
border: 1px solid var(--play-border);
padding: 4px 10px;
border-radius: 99px;
text-decoration: none;
color: var(--play-text);
transition: 0.2s;
white-space: nowrap;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
#play .play-chip-link:hover {
border-color: var(--play-accent);
color: var(--play-accent);
}

/* BADGE LEFT */
#play .play-badge {
position: absolute;
top: 12px;
left: 12px;
right: auto;
z-index: 5;
background: var(--reel-badge-bg, rgba(0,0,0,0.8));
color: var(--reel-badge-color, #fff);
padding: 5px 10px; border-radius: 4px;
font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
display: flex; align-items: center; gap: 5px;
pointer-events: none;
}
#play .play-badge img { width: 14px; height: 14px; }

/* Actions Share */
#play .play-share-actions {
display: flex; gap: 8px; padding-left: 4px;
}
#play .play-share-btn {
display: inline-flex; align-items: center; gap: 6px;
padding: 6px 12px;
border-radius: 99px;
font-size: 0.75rem; font-weight: 700;
text-decoration: none;
cursor: pointer;
border: 1px solid transparent;
transition: transform 0.2s;
}
#play .play-share-btn:hover { transform: translateY(-2px); }

#play .play-share-btn.whatsapp { background: #25D366; color: white; }
#play .play-share-btn.facebook { background: #1877F2; color: white; }
#play .play-share-btn.copy { background: var(--play-surface); border-color: var(--play-border); color: var(--play-text); }

/* FOOTER ACTIONS */
#play .play-footer-actions {
display: flex;
justify-content: center;
margin-top: 40px;
}

#play .play-btn-more {
background: var(--play-text);
color: var(--play-bg);
text-decoration: none;
padding: 0.8rem 1.8rem;
border-radius: 999px;
font-weight: 900;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.08em;
transition: transform 0.25s ease;
border: 1px solid var(--play-text);
}

#play .play-btn-more:hover {
background: var(--play-accent);
border-color: var(--play-accent);
color: #fff;
transform: scale(1.04);
}

/* MOBILE FIXES */
@media (max-width: 600px) {
  #play .play-title-main { font-size: 1.9rem; }

  #play .play-card-reel { flex-direction: column; height: 100%; }

  #play .play-reel-media {
  width: 100%;
  height: auto;
  border-right: none;
  border-bottom: 1px solid var(--play-border);
  padding: 10px;
  background: rgba(0,0,0,0.02);
  }

  #play .play-reel-video-box {
  max-width: 100%;
  width: 200px;
  aspect-ratio: 9/16;
  margin: 0 auto;
  border-radius: 8px;
  background: #000;
  }

  #play .play-reel-video { object-fit: contain; }

  #play .play-share-actions .play-share-btn { flex: 1; justify-content: center; }

  #play .play-badge { top: 8px; left: 8px; }
}
