/* ========================================
   STRACAU TV - CSS Principal
   Design pour écran 16:9 fullscreen
   ======================================== */

:root {
  --primary-dark: #4C5765;
  --primary-light: #6F89AE;
  --light-grey: #BCBEC1;
  --color-water: #0097DB;
  --color-hvac: #88BF52;
  --color-industry: #F2912D;
  --color-fire: #8B0000;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --bg-dark: #0a0a0a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Barlow', sans-serif;
  overflow: hidden;
  background-color: #000;
}

/* ========== ÉCRAN PRINCIPAL TV ========== */

#main-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

/* Header STRACAU */
.tv-header {
  background: rgba(76, 87, 101, 0.95);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--primary-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tv-header img {
  height: 60px;
  object-fit: contain;
}

.tv-header h1 {
  color: var(--text-light);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
}

.tv-time {
  color: var(--light-grey);
  font-size: 20px;
  font-weight: 600;
  text-align: right;
  line-height: 1.4;
}

.tv-time div {
  font-size: 16px;
  margin-bottom: 2px;
}

.tv-time div:last-child {
  font-size: 24px;
  margin-bottom: 0;
}

/* Contenu principal */
.tv-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

/* Écrans de rotation */
.screen {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.screen.active {
  display: flex;
  opacity: 1;
}

/* ========== ÉCRAN 1: BIENVENUE ========== */
.screen-welcome {
  background: linear-gradient(135deg, #2c3e50 0%, #4a6fa5 100%);
  text-align: center;
}

.welcome-logo {
  display: block;
  width: 400px;
  height: auto;
  margin: 0 auto 40px auto;
  animation: pulse 2s infinite;
  object-fit: contain;
  max-width: 90%;
}

.welcome-text h2 {
  font-size: 56px;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.welcome-tagline {
  font-size: 32px;
  color: var(--light-grey);
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.stracau-mission {
  margin-top: 40px;
  font-size: 24px;
  font-style: italic;
  color: var(--primary-light);
}

/* ========== ÉCRAN 2: ANNIVERSAIRES ========== */
.screen-anniversaires {
  background: linear-gradient(135deg, #34495e 0%, #6F89AE 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 40px;
}

.anniversaires-content {
  flex: 1;
  text-align: center;
  width: 100%;
}

.anniversaires-content h2 {
  font-size: 48px;
  margin-bottom: 40px;
  font-weight: 700;
}

.anniversaires-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
}

.anniversaires-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

.stracky-birthday-container {
  flex-shrink: 0;
}

.stracky-birthday {
  width: 100%;
  max-width: 350px;
  height: auto;
  animation: bounce 2s infinite;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  object-fit: contain;
}

.anniversaire-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 12px;
  border-left: 5px solid var(--primary-light);
  backdrop-filter: blur(10px);
  animation: slideIn 0.6s ease-out;
  text-align: center;
}

.anniversaire-card .name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.anniversaire-card .date {
  font-size: 20px;
  color: var(--light-grey);
}

.no-anniversaires {
  font-size: 42px;
  color: var(--light-grey);
  opacity: 0.8;
  text-align: center;
  padding: 60px 20px;
  width: 100%;
  animation: fadeIn 0.8s ease-out;
}

/* ========== ÉCRAN 3: CITATION ========== */
.screen-citation {
  background: linear-gradient(135deg, #2c3e50 0%, #0097DB 100%);
  padding: 60px;
}

.citation-content {
  max-width: 1200px;
  text-align: center;
}

.citation-text {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 40px;
  font-style: italic;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.citation-author {
  font-size: 28px;
  color: var(--light-grey);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ========== ÉCRAN 4: FÊTE DU JOUR ========== */
.screen-fete {
  background: linear-gradient(135deg, #8B0000 0%, #F2912D 100%);
  padding: 80px 40px;
}

.fete-content {
  text-align: center;
}

.fete-emoji {
  font-size: 100px;
  margin-bottom: 30px;
  animation: bounce 1.5s infinite;
}

.fete-name {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 20px;
}

.fete-description {
  font-size: 28px;
  color: var(--light-grey);
  font-weight: 300;
}

/* ========== ÉCRAN 5: MÉTÉO ========== */
.screen-meteo {
  background: linear-gradient(135deg, #34495e 0%, #3498db 100%);
  padding: 40px;
}

.meteo-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: 100%;
}

.meteo-info {
  text-align: center;
}

.meteo-icon {
  font-size: 100px;
  margin-bottom: 20px;
}

.meteo-location {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 15px;
}

.meteo-temp {
  font-size: 64px;
  font-weight: 700;
  margin-bottom: 15px;
}

.meteo-description {
  font-size: 24px;
  color: var(--light-grey);
  margin-bottom: 20px;
}

.meteo-details {
  font-size: 18px;
  color: var(--light-grey);
  line-height: 1.8;
}

/* ========== ÉCRAN 6: ACTUALITÉS ========== */
.screen-actualites {
  background: linear-gradient(135deg, #27ae60 0%, #16a085 100%);
  padding: 40px;
}

.actualites-content {
  width: 100%;
}

.actualites-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

.actualite-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  border-left: 6px solid var(--primary-light);
  backdrop-filter: blur(10px);
  animation: slideIn 0.6s ease-out;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  align-items: flex-start;
  transition: all 0.3s ease;
  cursor: pointer;
}

.actualite-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.actualite-emoji {
  font-size: 36px;
  grid-column: 1;
  grid-row: 1;
}

.actualite-image {
  width: 100%;
  max-width: 150px;
  height: auto;
  aspect-ratio: 5/4;
  object-fit: cover;
  border-radius: 8px;
  grid-column: 1;
  grid-row: 2;
}

.actualite-content {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.actualite-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.actualite-card p {
  font-size: 13px;
  color: var(--light-grey);
  line-height: 1.4;
  margin-bottom: 10px;
}

.actualite-desc {
  font-size: 13px;
  color: var(--light-grey);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.actualite-dates {
  font-size: 12px;
  color: var(--light-grey);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 8px;
}

.actualite-vide {
  text-align: center;
  color: var(--light-grey);
  padding: 60px 20px;
  font-size: 24px;
  width: 100%;
}

.actualites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 768px) {
  .actualites-grid {
    grid-template-columns: 1fr;
  }

  .actualite-card {
    grid-template-columns: 120px 1fr;
  }

  .actualite-image {
    width: 120px;
    height: 100px;
  }

  .actualite-card h3 {
    font-size: 16px;
  }

  .actualite-desc {
    font-size: 12px;
  }
}

/* ========== ÉCRAN 7: TIPS ========== */
.screen-tips {
  background: linear-gradient(135deg, #4a6fa5 0%, #88BF52 100%);
  padding: 60px 40px;
}

.tips-content {
  max-width: 1200px;
  text-align: center;
}

.tips-category {
  font-size: 28px;
  color: var(--light-grey);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tips-text {
  font-size: 42px;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.tips-icon {
  font-size: 60px;
  margin-bottom: 30px;
}

/* ========== ÉCRAN 8: HORLOGE MONDIALE ========== */
.screen-horloge {
  background: linear-gradient(135deg, #2c3e50 0%, #4a6fa5 100%);
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.horloge-title {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
}

.horloges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
}

.horloge-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 15px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 2px solid var(--primary-light);
  animation: slideIn 0.6s ease-out;
}

.horloge-city {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.horloge-time {
  font-size: 36px;
  font-weight: 600;
  font-family: 'Monaco', 'Courier New', monospace;
  color: var(--color-water);
}

.horloge-flag {
  font-size: 32px;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .horloge-title {
    font-size: 36px;
    margin-bottom: 25px;
  }

  .horloge-city {
    font-size: 16px;
  }

  .horloge-time {
    font-size: 32px;
  }

  .horloge-flag {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .screen-horloge {
    padding: 20px;
  }

  .horloge-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .horloges-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }

  .horloge-card {
    padding: 15px 10px;
  }

  .horloge-city {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .horloge-time {
    font-size: 24px;
  }

  .horloge-flag {
    font-size: 24px;
    margin-bottom: 5px;
  }
}

/* ========== ANIMATIONS ========== */

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== BOUTON VIDÉOS FLOTTANT ========== */
.videos-button {
  position: fixed;
  bottom: 40px;
  left: 40px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 15px 35px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 200;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.videos-button:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ========== BOUTON VISITEUR ========== */
.visitor-button {
  position: absolute;
  bottom: 40px;
  right: 40px;
  background: var(--primary-light);
  color: var(--text-light);
  border: none;
  padding: 20px 40px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.visitor-button:hover {
  background: var(--color-water);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1920px) {
  .tv-header h1 { font-size: 28px; }
  .welcome-text h2 { font-size: 48px; }
  .tips-text { font-size: 36px; }
}

@media (max-height: 1080px) {
  .tv-header { padding: 15px 30px; }
  .tv-content { padding: 30px; }
  .welcome-text h2 { font-size: 44px; }
}

/* ========== LOADING SPINNER ========== */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--primary-light);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== TIMER PROGRESS BAR ========== */
.screen-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 6px;
  background: var(--primary-light);
  width: 0%;
  animation: timerBar linear forwards;
}

@keyframes timerBar {
  0% { width: 0%; }
  100% { width: 100%; }
}
