/* ════════════════════════════════════════════════
   CALVEZ ARCHI — style.css
   Police : Poppins (Google Fonts)
   Couleurs de la charte :
     Rouge    #f22233
     Rose     #f2aece
     Vert     #77bf56
     Jaune    #f2e422
     Orange   #f05c38
     Bleu     #66bbe9
     Crème    #f2f2eb  ← fond général
     Noir     #111111
════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  background: #f2f2eb;
  color: #111;
  overflow-x: hidden;
}

/* ── VARIABLES ── */
:root {
  --red:    #f22233;
  --cream:  #f2f2eb;
  --black:  #111111;
  --border: #111111;
  --radius: 6px;
  --gap:    1.25rem;
  --pad-h:  2.5rem;
}

/* ══════════════════════════════════
   HEADER
══════════════════════════════════ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--pad-h);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1.5px solid rgba(0,0,0,0.1);
}

.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-identity {
  text-align: right;
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.65;
}

.header-identity strong {
  font-weight: 800;
  font-size: 0.84rem;
  display: block;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* ══════════════════════════════════
   CADRE FENÊTRE GÉNÉRIQUE (.win)
══════════════════════════════════ */
.win {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--gap) var(--pad-h);
}

.win-bar {
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1.5px solid var(--border);
  background: #fff;
}
.win-bar.bleu   { background: #66bbe9; }

.win-bar.rose   { background: #f2aece; }

.win-bar.vert   { background: #77bf56; }

/* ── Couleurs barres supplémentaires ── */
.win-bar.rouge  { background: #f22233; }
.win-bar.jaune  { background: #f2e422; }
.win-bar.orange { background: #f05c38; }
.win-bar.noir   { background: #111111; }

/* Dots blancs sur fonds foncés */
.win-bar.rouge .dot,
.win-bar.vert .dot,
.win-bar.bleu .dot,
.win-bar.orange .dot,
.win-bar.noir .dot  { background: #111; }

/* Dots noirs sur fonds clairs */
.win-bar.jaune .dot,
.win-bar.rose .dot  { background: #111; }

/* ── Compteur popup (ex: 2 / 4) ── */
.popup-counter {
  color: #888;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-top: -0.25rem;
}


.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--black);
  display: inline-block;
  flex-shrink: 0;
}


/* ══════════════════════════════════
   GRILLE PROJETS
══════════════════════════════════ */
.projets-section {
  padding: var(--gap) var(--pad-h) 0;
  background: var(--cream);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

/* ─ Cadre individuel ─ */
.media-window {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ─ Zone média 16:9 ─ */
.media-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #1a1a1a;
  overflow: hidden;
}

.media-frame iframe,
.media-frame .proj-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}

/* ─ Vidéo : thumb play ─ */
.video-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1e1e;
  cursor: pointer;
  transition: background 0.2s;
}
.video-thumb:hover { background: #111; }

.play-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.video-thumb:hover .play-circle {
  transform: scale(1.1);
  background: rgba(242,34,51,0.75);
  border-color: var(--red);
}
.play-circle svg { margin-left: 4px; }

/* ─ Photo overlay + oeil ─ */
.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  cursor: pointer;
  transition: background 0.3s;
}
.photo-frame:hover .photo-overlay { background: rgba(0,0,0,0.08); }

.eye-btn {
  position: absolute;
  bottom: 9px;
  right: 9px;
  width: 30px;
  height: 22px;
  object-fit: contain;
  cursor: pointer;
  z-index: 5;
  opacity: 0.95;
  transition: opacity 0.2s, transform 0.2s;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}
.eye-btn:hover { opacity: 1; transform: scale(1.1); }

/* ─ Label sous le cadre ─ */
.media-label {
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: #666;
  letter-spacing: 0.04em;
  border-top: 1px solid #eee;
  background: #fff;
}


/* ══════════════════════════════════
   À PROPOS
══════════════════════════════════ */
.apropos-inner {
  padding: 2.5rem 3rem;
  background: #fff;
}

.section-label {
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
}

.section-title {
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.accent-bar {
  width: 36px;
  height: 4px;
  background: var(--red);
  margin-bottom: 1.5rem;
}

.apropos-inner p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.85;
  color: #333;
  max-width: 720px;
}


/* ══════════════════════════════════
   ACCORDÉON 6 SECTIONS
══════════════════════════════════ */
.sections-wrap {
  margin: 0 var(--pad-h) var(--gap);
}

.accord-item {
  background: #fff;
  border: 1.5px solid var(--border);
  overflow: hidden;
  margin-top: -1.5px;
}
.accord-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.accord-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); }

.accord-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.accord-head:hover { background: var(--cream); }
.accord-head.open  { border-bottom: 1.5px solid var(--border); }

.accord-head-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.accord-num {
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--red);
  text-transform: uppercase;
}

.accord-title {
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.accord-arrow {
  font-size: 1.2rem;
  color: var(--red);
  font-weight: 300;
  transition: transform 0.25s;
  line-height: 1;
}
.accord-head.open .accord-arrow { transform: rotate(45deg); }

.accord-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accord-body.open { max-height: 400px; }

.accord-body-inner {
  padding: 1.25rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.85;
  color: #444;
}


/* ══════════════════════════════════
   CONTACT
══════════════════════════════════ */
.contact-inner {
  padding: 2.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-block { margin-bottom: 1.75rem; }

.contact-label {
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.35rem;
}

.contact-val {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-val a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact-val a:hover { border-bottom-color: var(--red); }

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.social-links a {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.social-links a:hover { color: var(--red); }

/* ─ Formulaire ─ */
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }

.form-group { display: flex; flex-direction: column; gap: 0.3rem; }

.form-group label {
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.7rem 1rem;
  border: 1.5px solid #c8c8c0;
  background: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--black);
  outline: none;
  border-radius: 3px;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 120px; }

.btn-send {
  align-self: flex-start;
  padding: 0.8rem 2.2rem;
  background: var(--red);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background 0.2s, transform 0.15s;
}
.btn-send:hover { background: #c8001d; transform: translateY(-1px); }


/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  background: var(--black);
  color: #666;
  padding: 1.5rem var(--pad-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: var(--gap);
}

.footer-logo {
  height: 38px;
  width: auto;
  /* Logo rouge sur fond noir : visible naturellement */
}

footer p { font-size: 0.72rem; font-weight: 300; }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }


/* ══════════════════════════════════
   POPUP GALERIE
══════════════════════════════════ */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
.popup-overlay.open { display: flex; }

.popup-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.popup-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  font-family: 'Poppins', sans-serif;
  transition: color 0.2s;
}
.popup-close:hover { color: var(--red); }

.popup-title {
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.popup-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.popup-img {
  max-width: 85vw;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

/* ─ Flèches navigation popup ─ */
.popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
}
.popup-nav:hover { background: rgba(242,34,51,0.6); }
.popup-nav.prev { left: -52px; }
.popup-nav.next { right: -52px; }
.popup-nav.hidden { opacity: 0; pointer-events: none; }

/* ─ Points indicateurs ─ */
.popup-dots {
  display: flex;
  gap: 8px;
}
.popup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.popup-dot.active { background: var(--red); }


/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {
  :root { --pad-h: 1.25rem; }

  .media-grid { grid-template-columns: 1fr; }

  .apropos-inner { padding: 1.75rem 1.5rem; }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1.75rem 1.5rem;
  }

  footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .popup-nav.prev { left: -40px; }
  .popup-nav.next { right: -40px; }
}

@media (max-width: 480px) {
  .logo-img { height: 44px; }
  .avatar { width: 44px; height: 44px; }
  .header-identity { font-size: 0.68rem; }
  .header-identity strong { font-size: 0.75rem; }
}


/* ══════════════════════════════════
   VIDÉO MP4 NATIVE
══════════════════════════════════ */
.proj-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}

/* ══════════════════════════════════
   À PROPOS — LAYOUT AVEC STATS
══════════════════════════════════ */
.apropos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.apropos-text p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.85;
  color: #333;
  max-width: 100%;
}

/* ── Stats container ── */
.apropos-stats {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 0.5rem;
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ── Visuel graphique animé ── */
.stat-visual {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}

.stat-square {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--black);
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.stat-square.filled {
  background: var(--black);
}
.stat-square.accent {
  border-color: var(--red);
  background: var(--red);
}
.stat-square.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Forme géométrique tracée SVG */
.stat-shape {
  opacity: 0;
  transition: opacity 0.6s ease 0.2s;
}
.stat-shape.visible { opacity: 1; }
.stat-shape path, .stat-shape rect, .stat-shape circle, .stat-shape line {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1) 0.3s;
}
.stat-shape.visible path,
.stat-shape.visible rect,
.stat-shape.visible circle,
.stat-shape.visible line {
  stroke-dashoffset: 0;
}

/* ── Chiffres et labels ── */
.stat-label-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--black);
}

.stat-unit {
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.stat-desc {
  font-weight: 300;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.06em;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .apropos-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .apropos-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .stat-block { flex: 1; min-width: 100px; }
}

/* ══ H1 SEO visible moteurs, invisible visuellement ══ */
.seo-h1 {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════
   À PROPOS — RESPONSIVE DÉFINITIF
   Les stats ne débordent jamais,
   quelle que soit la taille d'écran
══════════════════════════════════ */
.apropos-inner {
  overflow: hidden;
}
.apropos-grid {
  width: 100%;
  min-width: 0;
}
.apropos-stats {
  min-width: 0;
  overflow: hidden;
}
.apropos-text {
  min-width: 0;
  overflow: hidden;
}
.stat-visual {
  flex-wrap: wrap;
  max-width: 100%;
}
.stat-number {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
}

/* Tablette et desktop étroit */
@media (max-width: 900px) {
  .apropos-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .apropos-stats {
    border-left: 1.5px solid #eee;
    padding-left: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .apropos-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .apropos-inner {
    padding: 1.5rem !important;
  }
  .apropos-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1.5px solid #eee;
    padding-top: 1.5rem;
    gap: 1rem !important;
  }
  .stat-block {
    min-width: 0;
  }
  .stat-visual {
    height: auto !important;
    flex-wrap: wrap;
  }
  .stat-square {
    width: 8px !important;
    height: 8px !important;
  }
  .stat-desc {
    font-size: 0.65rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
