/* Tartiflette-Piscine — feuille de style commune */

:root {
  --bleu-piscine: #1a94d2;
  --bleu-piscine-fonce: #0f6a9e;
  --bleu-piscine-clair: #6fc6ea;
  --jaune-tartiflette: #f0cf6e;
  --jaune-clair: #f8e6ae;
  --rose-flamant: #f2a6c1;
  --texte: #2b2b2b;
  --texte-clair: #5a5a5a;
  --fond: #fffdf7;
  --blanc: #ffffff;
  --ombre: 0 4px 16px rgba(15, 106, 158, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--bleu-piscine-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER / NAV */
header.site-header {
  background: var(--blanc);
  border-bottom: 4px solid var(--jaune-tartiflette);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--ombre);
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  color: var(--bleu-piscine-fonce);
}

.brand img { height: 56px; width: auto; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav.main-nav > a, .dropdown > .dropdown-toggle {
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--texte);
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

nav.main-nav > a:hover, .dropdown > .dropdown-toggle:hover,
nav.main-nav > a.active {
  background: var(--jaune-clair);
  text-decoration: none;
}

.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--blanc);
  border-radius: 10px;
  box-shadow: var(--ombre);
  padding: 8px;
  min-width: 160px;
  border: 1px solid #eee;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--texte);
}

.dropdown-menu a:hover {
  background: var(--jaune-clair);
  text-decoration: none;
}

.btn {
  display: inline-block;
  background: var(--bleu-piscine);
  color: var(--blanc) !important;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: var(--ombre);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover { background: var(--bleu-piscine-fonce); text-decoration: none; }

.btn-secondary {
  background: var(--jaune-tartiflette);
  color: var(--texte) !important;
}

.btn-secondary:hover { background: #e0bb52; }

/* HERO */
.hero {
  background: linear-gradient(160deg, var(--bleu-piscine-clair), var(--bleu-piscine));
  color: var(--blanc);
  padding: 60px 0;
  text-align: center;
}

.hero img.hero-logo {
  max-width: 260px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 12px;
}

.hero p.subtitle {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 24px;
  opacity: 0.95;
}

.hero .btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* SECTIONS */
section { padding: 50px 0; }

section h2 {
  font-size: 1.8rem;
  color: var(--bleu-piscine-fonce);
  margin-bottom: 8px;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--texte-clair);
  max-width: 640px;
  margin: 0 auto 32px;
}

.section-alt { background: var(--jaune-clair); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.cards > a {
  min-width: 0;
}

.card {
  min-width: 0;
  overflow: hidden;
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--ombre);
  border-top: 4px solid var(--bleu-piscine);
}

.card h3 { color: var(--bleu-piscine-fonce); margin-top: 0; }

/* PLACEHOLDER */
.placeholder {
  background: #fff3e0;
  border: 2px dashed #e0a02a;
  color: #7a4a00;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin: 16px 0;
}

.placeholder strong { color: #a35c00; }

.placeholder-inline {
  background: #fff3e0;
  color: #a35c00;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-style: italic;
}

/* EDITIONS GRID (menu / listing) */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.edition-tile {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--ombre);
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.edition-tile:hover { border-color: var(--bleu-piscine); text-decoration: none; }

.edition-tile .year {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--bleu-piscine-fonce);
}

/* GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-grid > * {
  min-width: 0;
}

.gallery-grid .photo-placeholder {
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(45deg, #e6f4fb, #e6f4fb 10px, #d6ecf7 10px, #d6ecf7 20px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bleu-piscine-fonce);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
}

/* TROPHY GRID (uniform tiles with caption) */
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
  min-width: 0;
}

@media (max-width: 640px) {
  .trophy-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

.trophy-grid figure {
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.trophy-grid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform 0.15s ease;
  display: block;
}

.trophy-grid img:hover {
  transform: scale(1.02);
}

.trophy-grid figcaption {
  text-align: center;
  margin-top: 8px;
  font-weight: bold;
  color: var(--bleu-piscine-fonce);
}

/* PODIUM / PALMARES */
.podium {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.podium .place {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  padding: 20px;
  text-align: center;
  min-width: 160px;
}

.podium .place.first { border-top: 5px solid var(--jaune-tartiflette); }
.podium .place.second { border-top: 5px solid #c3c3c3; }
.podium .place.third { border-top: 5px solid #cd8a4f; }

.podium .medal { font-size: 2rem; }

/* WINNER (concours à vainqueur unique) */
.winner-card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  padding: 30px;
  text-align: center;
  max-width: 320px;
  margin: 24px auto;
  border-top: 5px solid var(--jaune-tartiflette);
}

.winner-card .medal { font-size: 3rem; }

.winner-card h3 {
  margin: 10px 0 4px;
  color: var(--bleu-piscine-fonce);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.winner-card p {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0;
}

/* TABLE */
table.infos {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

table.infos td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

table.infos td:first-child {
  font-weight: bold;
  color: var(--bleu-piscine-fonce);
  width: 180px;
}

/* FORM */
form.contact-form {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}

form.contact-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

/* FOOTER */
footer.site-footer {
  background: var(--bleu-piscine-fonce);
  color: var(--blanc);
  padding: 36px 0 20px;
  margin-top: 40px;
}

footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

footer.site-footer h4 { margin-top: 0; color: var(--jaune-tartiflette); }

footer.site-footer a { color: var(--blanc); }

footer.site-footer .bottom {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 16px;
}

/* BREADCRUMB */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--texte-clair);
  padding: 16px 0 0;
}

/* LIGHTBOX (agrandissement des photos de galerie) */
.gallery-grid img {
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-wrap { flex-direction: column; align-items: flex-start; }
  nav.main-nav { width: 100%; justify-content: flex-start; }
  .hero h1 { font-size: 1.8rem; }
}
