/* ====================== Cockpit — cockpit.css (S13) ======================
   CSS unifié — extrait de index.html. Aucun <style> ne reste dans le HTML.
   Fond : source unique ici (body/::before/::after) — plus d'injection JS. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Pinyon Script';
  src: url('../fonts/PinyonScript.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root{
  /* Police */
  --font-main: 'Inter', -apple-system, sans-serif;

  /* Palette unifiée */
  --bg-card: #111827;
  --bg-card-soft: #1a2235;
  --text-primary: #f9fafb;
  --text-secondary: #94a3b8;
  --text-muted: #4b5563;
  --accent-gold: #c9a96e;
  --accent-blue: #60a5fa;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --border: rgba(255,255,255,0.07);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);

  --grid-faint: rgba(232,180,150,.11);

  /* Graisses */
  --fw-base:300; --fw-headers:300; --fw-weekno:300; --fw-event:300; --fw-allday:500;

  /* Layout */
  --agenda-w:78%; --agenda-h:92vh;
  --title-height:3.4vh; --carousel-h:36vh;

  /* Calendrier */
  --weeks:5;
  --events-top:1.10em;

  /* Carrousel */
  --carousel-fit: cover;
  --carousel-align: 50% 50%;
  --carousel-interval: 10000ms;
  --carousel-fade: 1200ms;
}

html{ height:100%; margin:0; }

/* === Fond — source unique (S13) === */
body{
  position:relative; overflow:hidden;
  background:#060c18;
  font-family:var(--font-main); letter-spacing:.01em; font-weight:var(--fw-base);
  color:var(--text-primary);
  min-height:100vh;
}
body::before{
  content:'';
  position:fixed;
  inset:0;
  z-index:0;
  background-image: url('../img/fond-or-rose-hd.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  filter: brightness(1.1) contrast(1.08);
}

/* Calque d'assombrissement séparé */
body::after{
  content:'';
  position:fixed;
  inset:0;
  z-index:0;
  background: radial-gradient(
    ellipse at 20% 50%,
    rgba(201, 169, 110, 0.06) 0%,
    transparent 60%
  ),
  linear-gradient(
    to right,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.2) 60%,
    rgba(0,0,0,0.45) 100%
  );
  pointer-events: none;
}

/* tout le contenu passe au-dessus du décor */
.wrap, .agenda, .right, .grid, .dateblock, .sig { position:relative; z-index:1; }
.wrap{
  display:grid; grid-template-columns:minmax(0,var(--agenda-w)) minmax(0,1fr);
  grid-template-rows:100vh; align-items:start; gap:1.1vw;
  padding:1.5vh 1.5vw; box-sizing:border-box; overflow:hidden;
}

/* ===== AGENDA (S24 — ambient, zéro bordure verticale) ===== */

/* Navigation période */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 4px;
  flex-shrink: 0;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 8px;
  transition: color 0.2s;
}

.nav-btn:hover {
  color: var(--accent-gold);
}

.month-title {
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 300;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
}

/* Grille */
.grid {
  display: grid;
  grid-template-columns: 22px repeat(7, 1fr);
  /* 8 pistes reelles : en-tete + (semaine 1fr, separateur auto) x3, semaine 4
     — pas "auto repeat(4,1fr)" (5 pistes) : .week-separator (S24) est un
     item de grille a part entiere entre chaque semaine, sans quoi les 2
     dernieres semaines retombent en lignes implicites ecrasees. */
  grid-template-rows: auto 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* En-têtes colonnes */
.cell.header {
  font-size: clamp(9px, 0.72vw, 11px);
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  padding: 0 0 10px 6px;
  font-weight: 500;
  background: transparent;
  border: none;
}

.cell.header.weekno {
  color: transparent;
  padding: 0;
}

/* Numéros de semaine */
.cell.weekno {
  font-size: clamp(8px, 0.65vw, 11px);
  color: #4b5563;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 7px;
  padding-right: 5px;
  border: none;
  background: transparent;
  font-weight: 300;
}

/* Séparateur entre semaines — fade or */
.week-separator {
  grid-column: 1 / -1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201,169,110,0.2) 15%,
    rgba(201,169,110,0.2) 85%,
    transparent
  );
}

.day{
  display:flex; flex-direction:column; gap:.22vh; line-height:1.18;
  font-size:clamp(11.5px,.92vw,17px); font-weight:var(--fw-base);
  color: var(--text-primary);
  overflow:hidden;
}

/* Cellules jours */
.cell.day {
  min-height: 0;
  padding: 5px 6px 4px;
  position: relative;
  border: none;
  background: transparent;
  overflow: hidden;
}

.cell.day.other-month .dnum {
  opacity: 0.2;
}

.cell.day.today {
  background: rgba(201,169,110,0.03);
}

.cell.day.today::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201,169,110,0.6),
    transparent
  );
}

/* Numéro du jour */
.dnum {
  font-size: clamp(11px, 0.9vw, 14px);
  color: #9ca3af;
  display: block;
  margin-bottom: 3px;
  line-height: 1;
  font-weight: 400;
}

.cell.today .dnum {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: clamp(12px, 1vw, 16px);
}

/* Événements all-day */
.allday {
  font-size: clamp(9px, 0.75vw, 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  margin-top: 1px;
  font-weight: 400;
}

/* Événements avec heure */
.evt {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
}

.evt-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(8px, 0.65vw, 10px);
  color: #4b5563;
  line-height: 1.3;
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

.evt-title {
  font-size: clamp(9px, 0.75vw, 12px);
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 8px;
}

.evt-more {
  font-size: clamp(8px, 0.62vw, 10px);
  color: #374151;
  margin-top: 2px;
}

/* Supprimer .agenda border — le cadre faisait laid */
.agenda {
  overflow: hidden;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: var(--agenda-h);
  max-height: 96vh;
}

/* ===== COLONNE DROITE (S21 — ambient-panel unifié) ===== */
.right {
  display: flex;
  flex-direction: column;
  height: var(--agenda-h, 92vh);
  max-height: var(--agenda-h, 92vh);
  overflow: hidden;
  box-sizing: border-box;
}

.hero{
  position:relative; flex:0 0 auto; height:var(--carousel-h); overflow:hidden; max-width:100%;
  background: transparent !important;
  background-position:center; background-size:cover; background-repeat:no-repeat;
  border:none !important; box-shadow:none !important; outline:none !important;
}
.hero::before{ display:none; }

/* Slides */
.slide{
  position:absolute; inset:0; z-index:1; width:100%; height:100%;
  object-fit: var(--carousel-fit); object-position: var(--carousel-align);
  opacity:0; transition:opacity var(--carousel-fade) ease;
  background: transparent !important; border:none !important; box-shadow:none !important; outline:none !important;
}
.slide.show{ opacity:1; }

.ambient-panel {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: var(--radius);
  position: relative;
  box-sizing: border-box;
}

.ambient-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,110,0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.panel-clock {
  padding: 28px 24px 20px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.panel-date {
  font-size: clamp(10px, 0.82vw, 13px);
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.panel-time {
  font-size: clamp(52px, 6.5vw, 88px);
  font-weight: 100;
  letter-spacing: -4px;
  color: var(--accent-gold);
  line-height: 1;
}

.panel-sep {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,169,110,0.35), transparent);
  margin: 0 20px;
  flex-shrink: 0;
}

.panel-quote {
  padding: 10px 20px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.quote-text {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(13px, 1.2vw, 18px);
  color: var(--text-primary);
  line-height: 1.45;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quote-author {
  font-size: clamp(8px, 0.62vw, 10px);
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.7;
}

.panel-weather {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 14px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* === MÉTÉO (S20 — v3, design validé Arnaud ; conteneur devenu .panel-weather S21) === */
.weather-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.weather-temp-block {
  display: flex;
  align-items: flex-start;
  line-height: 1;
}

.weather-temp {
  font-size: clamp(64px, 7vw, 96px);
  font-weight: 100;
  line-height: 1;
  letter-spacing: -6px;
  color: var(--accent-gold);
}

.weather-temp-deg {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 200;
  color: var(--accent-gold);
  opacity: 0.7;
  margin-top: clamp(8px, 1vw, 12px);
}

.weather-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 8px;
}

.weather-icon svg {
  width: clamp(40px, 4.5vw, 52px);
  height: clamp(40px, 4.5vw, 52px);
  stroke: var(--accent-gold);
  color: var(--accent-gold);
  opacity: 0.9;
}

.weather-desc {
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.weather-feels {
  font-size: clamp(10px, 0.8vw, 12px);
  color: var(--text-muted);
  text-align: right;
}

.weather-location {
  font-size: clamp(8px, 0.65vw, 10px);
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 16px;
}

.weather-sep {
  height: 1px;
  background: linear-gradient(to right, rgba(201,169,110,0.3), transparent);
  margin: 14px 0;
}

.weather-sep-plain {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 16px 0 14px;
}

.weather-details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
  gap: 4px;
}

.weather-detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  font-size: clamp(10px, 0.82vw, 13px);
  color: var(--text-secondary);
}

.weather-detail-item svg {
  flex-shrink: 0;
}

.weather-sun {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.sun-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sun-item:last-child {
  align-items: flex-end;
}

.sun-label {
  font-size: clamp(7px, 0.6vw, 9px);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.sun-item span:last-child {
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--accent-gold);
  font-weight: 300;
  letter-spacing: -0.5px;
}

.weather-daily {
  display: flex;
  justify-content: space-between;
  gap: 3px;
  margin-top: 0;
  flex-shrink: 0;
}

.weather-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 2px;
  background: transparent;
  border-radius: 0;
}

.weather-day .wd-label {
  font-size: clamp(8px, 0.62vw, 10px);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.weather-day .wd-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-day .wd-icon svg {
  width: clamp(16px, 1.5vw, 20px);
  height: clamp(16px, 1.5vw, 20px);
  stroke: var(--text-secondary);
  color: var(--text-secondary);
  fill: none;
}

.weather-day .wd-temps {
  display: flex;
  gap: 3px;
  align-items: baseline;
}

.weather-day .wd-max {
  font-size: clamp(12px, 1vw, 15px);
  color: var(--text-primary);
  font-weight: 400;
}

.weather-day .wd-min {
  font-size: clamp(10px, 0.8vw, 12px);
  color: #4b5563;
}

.weather-day .wd-precip {
  font-size: clamp(8px, 0.62vw, 10px);
  color: var(--accent-blue);
  opacity: 0.8;
}

/* Ultra-larges */
@media (min-aspect-ratio: 21/9){ body::before{ background-size: 140% auto; } }

/* Carrousel — anti-bordures */
.hero, .carousel, .slide, .slider, .carousel-inner,
.hero img, .hero .slide, #hero, #hero img {
  border: none !important; box-shadow: none !important; background: transparent !important; outline: none !important;
}

/* KILL CADRE (carrousel uniquement — S21 : ne plus s'appliquer à .ambient-panel,
   dont la bordure est désormais voulue par le design) */
.hero, .hero *, .hero::before, .hero::after, .hero *::before, .hero *::after {
  border: 0 !important; outline: 0 !important; box-shadow: none !important;
}

@media (max-height: 700px) {
  :root {
    --agenda-h: 98vh;
    --carousel-h: 28vh;
    --events-top: 0.8em;
  }
  .allday, .evt {
    font-size: clamp(9px, 0.75vw, 12px);
  }
}

@media (max-width: 1024px) {
  :root {
    --agenda-w: 100%;
    --carousel-h: 0px;
  }
  .right {
    display: none;
  }
}
