/* Theme variables (set from charte graphique) */
:root {
  --color-primary: #0B5D7A; /* Océan Atlantique */
  --color-primary-600: #1269B0;
  --color-secondary: #1E8FA8; /* Île d'Oléron */
  --color-accent: #cb8c23; /* Sable / accents */
  --color-bg: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-text: #0B1F2A;
  --color-text-white: #FFFFFF;
  --color-text-muted: #405361;
  --color-text-muted-white: #EFEFEF;
  /* From charte: RVB 18/105/176 and RVB 203/140/35 */
  --color-hero-blue: #1269B0;
  --color-hero-orange: #CB8C23;
  --color-hero-white: #FFFFFF;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.06);
  --shadow-md: 0 8px 28px rgba(0,0,0,.08);
  --grad-ocean: linear-gradient(135deg, #0B5D7A 0%, #1E8FA8 100%);
  --grad-sand: radial-gradient(1200px 600px at 20% -10%, rgba(229,183,0,.18), transparent 60%), radial-gradient(900px 600px at 120% 10%, rgba(255,255,255,.35), transparent 50%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  font-family: "Minion Pro", Georgia, "Times New Roman", Times, serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

main { flex: 1; margin-top: 64px; }

img { display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn { display: inline-block; padding: 12px 18px; border-radius: 999px; font-weight: 600; background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.btn:not(.btn-accent):not(.btn-outline):hover { filter: brightness(0.50); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-600); border-color: var(--color-primary-600); color: var(--color-text-white); text-decoration: none; }
.btn-accent { background: var(--color-accent); color: #FFFFFF; }
.btn-accent:not(.accent-nav) { border: 2px solid var(--color-accent); }
.btn-accent:hover { filter: brightness(0.85); text-decoration: none; color: #fff; }

/* .container { width: min(1200px, 92%); margin: 0 auto; } */
.container { width: 90%; margin: 0 auto; }
.section { padding: 88px 0; position: relative; }
.section.alt { background: linear-gradient(to bottom, #ecf2f6 0%, #ffffff 100%); text-align: center;}
.section.alt2 { text-align: center; }
.section.ocean { background: var(--grad-ocean); color: #fff; }
.section.sand { background: var(--grad-sand), #fff; }
.divider-top, .divider-bottom { position: absolute; left: 0; right: 0; height: 80px; pointer-events: none; }
.divider-top { top: -1px; }
.divider-bottom { bottom: -1px; }
.divider svg { display: block; width: 100%; height: 100%; }
.section-title { font-size: clamp(24px, 3vw, 40px); margin: 0 0 16px; line-height: 1.2; }
.section-lead { margin: 0 0 32px; color: var(--color-text-muted); }
.section-lead-light { margin: 0 0 32px; color: var(--color-text-muted-white); }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px; background: #000; color: #fff; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; background: rgba(255,255,255,.75); backdrop-filter: saturate(180%) blur(14px); box-shadow: 0 1px 0 rgba(0,0,0,.06); transition: transform .25s ease; width: 100%; }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 64px; }
.brand-group { display: flex; align-items: center; padding-left: 12px; padding-right: 12px; }
.brand-logo { display: inline-flex; overflow: hidden;}
.brand-logo img { width: calc(64px + 6vw); object-fit: contain; display: block; max-width: 160px; }
.brand { display: flex; flex-direction: column; font-weight: 700; color: var(--color-text); font-family: "Nilland", "Minion Pro", Georgia, "Times New Roman", Times, serif; }
.brand-top { font-size: 18px; letter-spacing: .2px; margin: 0;}
.brand-bottom { font-size: 12px; color: var(--color-text-muted); margin-top: -2px; }

nav#nav { padding-right: 12px;}

.site-nav ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a { display: inline-block; padding: 10px 10px; border-radius: 10px; font-weight: 600; }
.site-nav a.active { background: rgba(11,93,122,.08); color: var(--color-primary-600); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; position: relative; border-radius: 8px; cursor: pointer; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--color-text); transition: transform .3s, opacity .2s, top .3s; }
.nav-toggle span:nth-child(1){ top: 15px; }
.nav-toggle span:nth-child(2){ top: 21px; }
.nav-toggle span:nth-child(3){ top: 27px; }
.nav-open .nav-toggle span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2){ opacity: 0; }
.nav-open .nav-toggle span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
#nav a:not(.btn-accent):hover { background: var(--color-primary-600); border-color: var(--color-primary-600); color: var(--color-text-white); text-decoration: none; }

/* Hero */
.hero { position: relative; padding: 0; background: var(--grad-ocean); color: #fff; overflow: hidden; min-height: 600px; height: calc(100vh - 64px); display: flex; align-items: center; }
.hero .bg-video, .hero .bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; filter: saturate(105%) contrast(105%) brightness(90%); display: block; }
.hero .container { position: relative; z-index: 3; display: none; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; margin: 0 0 16px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.hero p { font-size: clamp(16px, 2.2vw, 20px); color: rgba(255,255,255,.92); margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .shape { position: absolute; inset: -30% -10% auto auto; width: 90vmax; height: 90vmax; background: radial-gradient(closest-side, rgba(229,183,0,.25), transparent 70%); transform: rotate(18deg); filter: blur(10px); }
.hero .texture { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; opacity: .35; }
/* Apply text shadow to all text in hero for readability */
.hero, .hero * { text-shadow: 0 2px 6px rgba(0,0,0,.45); }
/* Hero bicolor title spans */
.hero .title-primary { color: var(--color-hero-blue); }
.hero .title-accent { color: var(--color-hero-orange); }
.hero .title-neutral { color: var(--color-hero-white); }

/* Hero overlay images from maquette */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.hero-picture {
  position: absolute;
  right: -10%;
  bottom: 0;
  /* top: 55%;
  transform: translateY(-50%); */
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  z-index: 3;
}

.hero-picture img {
  /* width: auto;
  height: auto; */
  /* max-width: 100%; */
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.hero-name-slogan {
  position: absolute;
  top: 15%;
  left: 17%;
  max-width: 37%;
  z-index: 3;
}

.hero-name-slogan img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-city {
  position: absolute;
  bottom: 1%;
  left: 25%;
  max-width: 12%;
  z-index: 3;
}

.hero-city img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-dates {
  position: absolute;
  bottom: 5%;
  right: 36%;
  max-width: 25%;
  z-index: 3;
}

.hero-dates img {
  width: 100%;
  height: auto;
  display: block;
}

/* Separator */
.header-separator-bottom {
    position: absolute;
    bottom: -1px;
    left: 0px;
    width: 100%;
}

.header-separator-reverse {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

.header-separator svg {
    display: block;
    width: calc(100% + 1.3px);
}

.header-separator {
    position: absolute;
    width: 100%;
    max-width: 100%;
    bottom: -1px;
    overflow: hidden; /* because svg inside is a bit bigger to cover the entire separator correctly */
}

.svg-white-bg {
    fill: #EBEBEB;
}

/* Cards & grids */
.grid { display: grid; gap: 20px; --gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-3 > :only-child:not(.meeting) { grid-column: 2; }
.grid-4 > :only-child:not(.meeting) { grid-column: 2 / span 2; justify-self: center; inline-size: calc((100% - var(--gap)) / 2); box-sizing: border-box; }
.card { background: var(--color-surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.06); display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; flex-direction: column; align-content: center; }
.soutien { justify-content: center; }
.list { text-align: center; }
.list > * { margin: 0; }
.list_grid { margin: 0 0 32px; }
.card h3 { margin-top: 0; text-align: center; }
.muted { color: var(--color-text-muted); }
.meeting_text { margin-top: 0; margin-bottom: 0; text-align: center; font-size: larger; }
.meeting > p { margin-top: 0; margin-bottom: 0; text-align: center; }

/* List */
.avatar { max-width: 100%; max-height: 100%; }

/* Member presentation */
.member-presentation {
  margin-top: 12px;
  width: 100%;
}

.member-presentation-text {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.08);
  text-align: left;
}

.member-presentation-text p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.5;
}

.btn-read-more {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-read-more:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Calendar buttons */
.calendar-buttons {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 10px;
}

.calendar-buttons-inline {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-calendar:hover {
  background: var(--color-primary-600);
  color: #fff;
  text-decoration: none;
  filter: brightness(0.9);
}

.btn-calendar svg {
  flex-shrink: 0;
}

.btn-calendar-ics {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-calendar-ics:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-calendar-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  color: currentColor;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-calendar-small:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transform: scale(1.1);
}

.btn-calendar-small svg {
  width: 14px;
  height: 14px;
}

.event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  /* gap: 12px; */
  gap: 0;
  width: 100%;
}

.event-header h3 {
  flex: 1;
  margin: 0;
  min-width: 0; /* Allow text to wrap */
}

@media (max-width: 640px) {
  .event-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .calendar-buttons-inline {
    margin-left: 0;
    margin-top: 0;
  }
}

.agenda-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.agenda-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-item-content {
  flex: 1;
}

/* Calendar button styles for ocean section (white text) */
.section.ocean .btn-calendar-small {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.section.ocean .btn-calendar-small:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .6s ease; }
.in-view { opacity: 1; transform: none; }
p.long { text-align: justify;}

/* Footer */
.site-footer { margin-top: 48px; background: #0b1720; color: #d6e0e8; padding-top: 40px; }
.site-footer a { color: #d6e0e8; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; }
.brand-footer { color: var(--color-text-white); }
.brand-footer .brand-bottom { color: var(--color-text-white); font-size: 18px; letter-spacing: .2px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.footnote { color: #8aa1b2; }

/* Forms */
form { display: grid; gap: 12px; }
label { font-weight: 600; }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid #d9dee3; border-radius: 12px; background: #fff; font: inherit; }
textarea { min-height: 140px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.alert { padding: 12px 14px; border-radius: 12px; }
.alert-success { background: #e8f6ef; color: #0d5a36; border: 1px solid #bfe7d1; }
.alert-error { background: #feeceb; color: #8a1f11; border: 1px solid #f7c7c3; }
.error-message {
  color: red;
  font-size: 0.9em;
  margin-top: 0.25em;
}
input.error, textarea.error {
  border-color: red;
}

/* Utilities */
.text-center { text-align: center; }
.surface { background: var(--color-surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--color-accent); font-size: 26px; }

/* Responsive */

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 > :only-child:not(.meeting) { grid-column: auto; justify-self: center; inline-size: auto; box-sizing: border-box; }
  .grid-4, .grid-3, .grid-2, .grid-1, .form-row { grid-template-columns: 1fr; }
  .site-nav { position: fixed; inset: 64px 0 auto 0; background: rgba(255,255,255,.98); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s; border-bottom: 1px solid rgba(0,0,0,.06); }
  .site-nav ul { flex-direction: column; padding: 12px; font-size: medium;}
  .nav-toggle { display: inline-block; }
  .nav-open #nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
}

@media (min-width: 960px) and (max-width: 1080px) {
  .site-nav ul {
    font-size: small;
  }
}

/* Responsive adjustments for hero images */
@media (orientation: landscape) {
  .hero-picture {
    /* right: 0; */
    right: -10%;
    bottom: 0;
    width: auto;
    max-width: 100%;
    max-height: 100%;
  }
  
  .hero-name-slogan {
    top: 15%;
    left: 17%;
    max-width: 37%;
  }
  
  .hero-city {
    bottom: 5%;
    left: 25%;
    max-width: 12%;
  }
  
  .hero-dates {
    bottom: 9%;
    right: 36%;
    max-width: 25%;
  }
}

@media (orientation: portrait) {
  .hero-picture {
    /* right: 0; */
    right: -5%;
    bottom: 0;
    width: auto;
    max-width: 100%;
    max-height: 100%;
  }
  
  .hero-name-slogan {
    top: 15%;
    left: 17%;
    max-width: 37%;
  }
  
  .hero-city {
    bottom: 42%;
    left: 35%;
    max-width: 15%;
  }
  
  .hero-dates {
    bottom: 35%;
    left: 30%;
    max-width: 30%;
    width: max-content;
  }
}

@media (orientation: landscape) and (max-width: 960px) {
  .site-nav ul {
      gap: 0;
      font-size: small;
  }
}

/* @media (orientation: portrait) {
  .hero-picture {
    flex-direction: column;
  }
} */

/* @media (max-width: 960px) {
  .site-nav ul {
    gap: 8px;
  }
}

@media (max-width: 840px) {
  .site-nav ul {
    gap: 6px;
  }
} */
