/* ===== TAHITI WEBCAMS — style.css ===== */

/* --- NEWSLETTER HIDDEN --- */
.section-newsletter { display: none; }

/* --- Variables & Reset --- */
:root {
  --teal:       #8a7a5a;
  --teal-dark:  #5c5038;
  --teal-light: #c4a96a;
  --teal-glow:  rgba(138,122,90,0.35);
  --bg:         #0f0f0f;
  --bg2:        #1a1a1a;
  --surface:    #242424;
  --text:       #f5f0e8;
  --text-muted: #a09070;
  --accent:     #c4a96a;
  --red-live:   #ff4757;
  --ad-bg:      #1e1e1e;
  --border:     rgba(138,122,90,0.25);
  --border-mid: rgba(138,122,90,0.35);
  --border-str: rgba(138,122,90,0.5);
  --radius:     10px;
  --header-h:   60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.logo .logo-icon { font-size: 1.5rem; }
.logo strong { color: var(--teal-light); }
.main-nav { display: flex; gap: 24px; }
.main-nav a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: color .2s;
}
.main-nav a:hover { color: var(--text); }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== VIEWS ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== AD BLOCKS ===== */
.ad-block {
  position: relative;
  background: var(--ad-bg);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}
.ad-block a { display: block; width: 100%; height: 100%; }
.ad-block img { width: 100%; height: 100%; object-fit: cover; }
.ad-label {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  pointer-events: none;
}

.big-ad {
  width: 100%;
  height: 100px;
  margin-bottom: 8px;
  border-radius: 0;
  border-left: none;
  border-right: none;
}
.cam-ad { width: 100%; height: 60px; margin-top: 8px; border-radius: var(--radius); }
.mid-wide-ad { width: 100%; height: 90px; margin: 20px 0; }
.bot-wide-ad { width: 100%; height: 90px; margin: 20px 0 40px; }

.multi-ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.multi-ad { height: 90px; }

/* ===== POPUP AD ===== */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.popup-overlay.visible { display: flex; }
.popup-ad {
  position: relative;
  max-width: 600px;
  width: 90%;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--teal);
  animation: popupIn .4s ease;
}
@keyframes popupIn {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.popup-ad img { width: 100%; min-height: 200px; object-fit: cover; background: var(--ad-bg); }
.popup-close {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .2s;
}
.popup-close:hover { background: rgba(255,71,87,0.8); }

/* ===== CAM LOGO AD ===== */
.cam-logo-ad {
  position: absolute;
  bottom: 40px; left: 40px;
  z-index: 3;
  opacity: 0.85;
  transition: opacity .2s;
}
.cam-logo-ad:hover { opacity: 1; }
.cam-logo-ad img {
  height: 60px;
  width: auto;
  display: block;
}

/* ===== PAGE ACCUEIL ===== */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  text-align: center;
  margin: 32px 0 8px;
  background: linear-gradient(135deg, #fff 30%, var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 28px;
}

.cameras-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.camera-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow .25s, border-color .25s;
}
.camera-card:hover {
  box-shadow: 0 12px 40px var(--teal-glow);
  border-color: var(--teal);
}
.camera-card:active { transform: scale(.98); }

.cam-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg2);
  overflow: hidden;
}
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cam-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--red-live);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 20px;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}
.play-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background .2s;
}
.camera-card:hover .play-btn { background: var(--teal-glow); }

.cam-info { padding: 10px 12px 4px; }
.cam-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== WIDGET MÉTÉO ===== */
.widget-meteo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}
.widget-meteo h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 12px; }
.meteo-placeholder { color: var(--text-muted); font-size: .9rem; font-style: italic; }
.widget-meteo iframe { width: 100%; border: none; border-radius: 8px; min-height: 200px; }

/* ===== VUE DÉTAIL CAMÉRA ===== */
.cam-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0 10px;
}
.back-btn {
  background: var(--surface);
  border: 1px solid var(--teal);
  color: var(--teal-light);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.back-btn:hover { background: var(--teal); color: #fff; }
.cam-detail-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
}

.cam-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cam-thumb-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
  transition: all .2s;
}
.cam-thumb-mini:hover,
.cam-thumb-mini.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.video-wrapper {
  position: relative;
  width: 100%;
  /* max-width: 800px; */
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-mid);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.video-wrapper iframe { width: 100%; height: 100%; border: none; }

/* Shield full — desktop */
.iframe-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  pointer-events: all;
}

/* Shield partiel — mobile : couvre seulement les 25% du bas */
@media (max-width: 768px) {
  .iframe-shield {
    top: unset;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    pointer-events: all;
  }
}
.video-live-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--red-live);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 20px;
  animation: pulse 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

/* ===== NEWSLETTER ===== */
.section-newsletter {
  background: var(--bg2);
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.section-newsletter .container { text-align: center; }
.section-newsletter h2 {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 12px;
}
.section-newsletter p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 50px;
  color: var(--text);
  font-size: .95rem;
  outline: none;
  font-family: inherit;
}
.newsletter-form input:focus { border-color: var(--teal-light); }
.newsletter-form button,
.contact-form button {
  padding: 12px 28px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.newsletter-form button:hover,
.contact-form button:hover { background: var(--teal-light); transform: translateY(-1px); }
.form-msg { margin-top: 14px; font-size: .9rem; color: var(--teal-light); min-height: 22px; }

#sib-container {
  background: transparent !important;
}

/* ===== CONTACT ===== */
.section-contact {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.section-contact h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 32px;
  text-align: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--teal-light); }
.contact-form button { align-self: flex-start; }
.contact-info h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.contact-info p { color: var(--text-muted); font-size: .9rem; margin-bottom: 12px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-section-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal-light);
  margin-bottom: 24px;
}
.footer-partners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.partner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.partner-header img {
  height: 45px;
  width: auto;
  border-radius: 45%;
}
.footer-partner-card h5 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .05em;
}
@media (max-width: 768px) {
  .footer-partners-grid {
    grid-template-columns: 1fr;
  }
}

.footer-partner-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.fb-link { color: #1877f2; text-decoration: none; }
.fb-link:hover { text-decoration: underline; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-legal-links { display: flex; gap: 12px; align-items: center; }
.footer-legal-links a { color: var(--text-muted); transition: color .2s; }
.footer-legal-links a:hover { color: var(--text); }
.footer-legal-links span { opacity: .4; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .multi-ads-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --header-h: 56px; }
  .burger { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(15,15,15,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    color: var(--text);
  }
  .main-nav a:last-child { border-bottom: none; }
  .cameras-grid { grid-template-columns: 1fr; gap: 20px; }
  .big-ad { height: 70px; }
  .multi-ads-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .multi-ad { height: 70px; }
  .mid-wide-ad, .bot-wide-ad { height: 70px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; border-radius: 8px; }
  .newsletter-form input { border-radius: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cam-selector { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .cam-selector::-webkit-scrollbar { height: 3px; }
  .cam-selector::-webkit-scrollbar-track { background: transparent; }
  .cam-selector::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 2px; }
  .contact-form button { width: 100%; border-radius: 8px; }
  .page-title { margin: 20px 0 6px; }
}

@media (max-width: 380px) {
  .cameras-grid { gap: 12px; }
  .cam-info h3 { font-size: .95rem; }
}

@media (max-width: 768px) {
  .cam-logo-ad {
    left: 8px;
  }
  .cam-logo-ad img {
    height: 32px;
  }
}

/* =============================
   BANNIÈRE INSTALL MOBILE
   ============================= */
#install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #C9A84C;
  color: #000;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease;
}

#install-banner strong {
  font-weight: 700;
}

#install-banner button {
  background: rgba(0,0,0,0.15);
  border: none;
  color: #000;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

#install-close {
  margin-left: auto;
  background: transparent !important;
  font-size: 1rem !important;
  padding: 0 4px !important;
}

#install-help {
  position: fixed;
  bottom: 40px;
  left: 0;
  right: 0;
  z-index: 9998;
  background: #111;
  color: #C9A84C;
  font-size: 0.8rem;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
}

#install-help button {
  background: transparent;
  border: none;
  color: #C9A84C;
  font-size: 1rem;
  cursor: pointer;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}