/*
Theme Name: Les Courants Libres
Theme URI: https://courantslibres.fr
Author: Les Courants Libres
Author URI: https://courantslibres.fr
Description: Thème classique pour une association de pêche engagée dans la protection des rivières.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: les-courants-libres
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ink: #142f32;
  --river: #2f6263;
  --river-deep: #21494b;
  --cream: #f1ede3;
  --paper: #f8f6ef;
  --orange: #c85b35;
  --line: rgba(20, 47, 50, 0.18);
  --white-line: rgba(255, 255, 255, 0.32);
  --sans: "DM Sans", sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: var(--cream); }
.skip-link:focus { top: 1rem; }

.site-header { position: absolute; z-index: 20; inset: 0 0 auto; height: 110px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(1.25rem, 4.5vw, 5rem); color: #fff; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: .8rem; font-size: .77rem; font-weight: 700; line-height: 1.05; letter-spacing: .03em; text-transform: uppercase; }
.brand-mark { width: 43px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.main-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.75rem); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.main-nav a { position: relative; padding: .5rem 0; }
.nav-list { display: contents; margin: 0; padding: 0; list-style: none; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .35s cubic-bezier(.16,1,.3,1); }
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }
.header-cta { justify-self: end; padding: .8rem 1.25rem; border: 1px solid rgba(255,255,255,.55); border-radius: 100px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s, transform .3s; }
.header-cta:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }
.menu-toggle { display: none; }

.hero { position: relative; min-height: min(900px, 100dvh); display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); overflow: hidden; background: var(--river-deep); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0 50% 0 0; opacity: .16; background-image: repeating-linear-gradient(120deg, transparent 0 43px, rgba(255,255,255,.15) 44px); }
.hero-content { position: relative; z-index: 2; align-self: center; padding: 9rem 3rem 6rem clamp(1.5rem, 7.6vw, 8.5rem); }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.75rem; font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { width: 28px; height: 1px; background: currentColor; }
.hero h1, .manifesto h2, .section-heading h2, .join-content h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; line-height: .9; }
.hero h1 { max-width: 680px; font-size: clamp(4.1rem, 7vw, 8.2rem); }
h1 em, h2 em { color: #d7c7a1; font-weight: 400; }
.hero-copy { max-width: 490px; margin: 2rem 0 0; color: rgba(255,255,255,.75); font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 2rem; margin-top: 2.6rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.25rem; min-width: 205px; padding: 1rem 1.1rem 1rem 1.35rem; border-radius: 2px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: transform .3s cubic-bezier(.16,1,.3,1), background .3s; }
.button:active, .calendar-button:active { transform: scale(.98); }
.button-primary { color: #fff; background: var(--orange); }
.button-primary:hover { background: #ae492a; transform: translateY(-2px); }
.button span { font-size: 1.05rem; }
.text-link { border-bottom: 1px solid rgba(255,255,255,.45); padding: .65rem 0; font-size: .77rem; font-weight: 600; }
.text-link span { margin-left: .7rem; }
.hero-visual { position: relative; min-height: 100%; overflow: hidden; clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
.hero-image, .bento-photo, .join-visual { background-color: #687a71; background-position: center; background-size: cover; }
.hero-image { position: absolute; inset: 0; filter: saturate(.72) contrast(1.03); background-image: linear-gradient(90deg, rgba(33,73,75,.52), rgba(33,73,75,.04)), url("https://images.pexels.com/photos/1904769/pexels-photo-1904769.jpeg?auto=compress&cs=tinysrgb&w=1600"); }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,39,40,.13), transparent 45%, rgba(15,39,40,.5)); }
.river-lines { position: absolute; z-index: 2; inset: 0; opacity: .32; pointer-events: none; }
.river-lines svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: .7; }
.hero-note { position: absolute; z-index: 3; left: 12%; bottom: 6.5%; display: flex; gap: 1rem; color: #fff; }
.hero-note-number { padding-top: .15rem; font: .7rem var(--sans); opacity: .6; }
.hero-note p { margin: 0; padding-left: 1rem; border-left: 1px solid var(--white-line); font: italic 1rem/1.4 var(--serif); }
.hero-note strong { font-weight: 400; }
.hero-roundel { position: absolute; z-index: 3; right: 7%; bottom: 7%; width: 110px; height: 110px; color: #fff; animation: float 5s ease-in-out infinite; }
.hero-roundel text { fill: currentColor; font: 8px var(--sans); letter-spacing: 2px; }
.roundel-fish { fill: none; stroke: currentColor; stroke-width: 1; }
.hero-index { position: absolute; z-index: 3; left: 2.5rem; bottom: 2rem; color: rgba(255,255,255,.35); font: .58rem/1.5 var(--sans); letter-spacing: .16em; }

.manifesto { display: grid; grid-template-columns: .42fr 1.2fr .65fr; gap: clamp(2rem, 5vw, 6rem); max-width: 1500px; margin: auto; padding: clamp(7rem, 11vw, 11rem) clamp(1.5rem, 6vw, 6.5rem); }
.section-kicker { align-self: start; padding-top: .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.section-kicker::before { content: "02"; display: block; margin-bottom: 3rem; color: var(--orange); }
.manifesto h2, .section-heading h2, .join-content h2 { font-size: clamp(3rem, 5vw, 6.2rem); }
.manifesto h2 em, .section-heading h2 em, .join-content h2 em { color: var(--orange); }
.manifesto-content > p { max-width: 610px; margin: 2.2rem 0 0; color: #536666; font-size: 1.05rem; line-height: 1.8; }
.stats { margin: .5rem 0 0; }
.stats div { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.stats div:last-child { border-bottom: 1px solid var(--line); }
.stats dt { font: 2.25rem var(--serif); }
.stats dd { margin: .25rem 0 0; color: #657373; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }

.news-section { padding: clamp(6rem, 9vw, 9rem) clamp(1.25rem, 5vw, 5.5rem); background: var(--cream); }
.section-heading { max-width: 1380px; margin: 0 auto clamp(3rem, 6vw, 5rem); display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading > p { max-width: 390px; margin: 0 0 .5rem; color: #637171; line-height: 1.7; }
.section-heading .eyebrow { margin-bottom: 1.4rem; }
.bento-grid { max-width: 1380px; margin: auto; display: grid; grid-template-columns: 1.15fr .85fr .85fr; grid-template-rows: 370px 315px; gap: 1rem; }
.bento { position: relative; overflow: hidden; min-width: 0; padding: 1.75rem; background: var(--paper); border: 1px solid rgba(20,47,50,.08); }
.bento-feature { grid-row: 1 / 3; padding: 0; color: #fff; }
.feature-photo { position: absolute; inset: 0; background-image: url("https://images.pexels.com/photos/709552/pexels-photo-709552.jpeg?auto=compress&cs=tinysrgb&w=1400"); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.bento-feature:hover .feature-photo { transform: scale(1.035); }
.bento-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,40,41,.12), rgba(13,40,41,.8)); }
.bento-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: start; justify-content: space-between; padding: 2rem; }
.tag { display: inline-flex; padding: .45rem .65rem; border: 1px solid var(--line); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tag-light { border-color: rgba(255,255,255,.5); }
.meta { margin: 0 0 .85rem; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; opacity: .7; }
.bento h3 { margin: 0; font: 400 1.65rem/1.1 var(--serif); }
.bento-feature h3 { max-width: 520px; margin-bottom: 1.5rem; font-size: clamp(2.3rem, 3.5vw, 4rem); }
.arrow-link { display: inline-flex; gap: 1rem; align-items: center; padding-bottom: .35rem; border-bottom: 1px solid currentColor; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.arrow-link span { transition: transform .3s; }
.arrow-link:hover span { transform: translate(3px, -3px); }
.bento-agenda { display: flex; flex-direction: column; background: var(--river); color: #fff; }
.bento-topline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bento-agenda .tag { border-color: rgba(255,255,255,.25); }
.event-status { font-size: .63rem; opacity: .82; }
.event-status i { display: inline-block; width: 6px; height: 6px; margin-right: .35rem; border-radius: 50%; background: #d6bc7c; animation: pulse 2s ease-in-out infinite; }
.event-date { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.event-date strong { font: 4.6rem/.8 var(--serif); }
.event-date span { font-size: .67rem; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.bento-agenda h3 { margin-top: 1rem; font-size: 1.75rem; }
.bento-agenda > p { margin: .45rem 0 1.3rem; font-size: .75rem; opacity: .7; }
.calendar-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; cursor: pointer; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; transition: background .3s, color .3s; }
.calendar-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.calendar-button:hover { background: #fff; color: var(--ink); }
.bento-brief { background: #d8d4c5; }
.brief-illustration { height: 114px; margin: -1rem -1rem .9rem; }
.brief-illustration svg { width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 1; }
.brief-illustration .fish { fill: rgba(20,47,50,.08); }
.brief-illustration .second { opacity: .5; }
.bento-brief h3 { margin: 1rem 0 .7rem; }
.bento-brief .arrow-link { position: absolute; bottom: 1.5rem; }
.bento-dates { grid-column: 2 / 4; padding: 1.3rem 1.75rem; }
.bento-dates .bento-topline { padding-bottom: .75rem; }
.bento-topline > a { font-size: .65rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-transform: uppercase; }
.date-list { list-style: none; margin: 0; padding: 0; }
.date-list li { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); transition: padding-left .3s cubic-bezier(.16,1,.3,1); }
.date-list li:hover { padding-left: .5rem; }
.date-list time { font-size: .58rem; letter-spacing: .08em; }
.date-list time { text-transform: uppercase; }
.date-list time strong { display: block; float: left; margin-right: .35rem; font: 1.65rem/1 var(--serif); }
.date-list div { display: flex; flex-direction: column; gap: .16rem; }
.date-list b { font-size: .85rem; }
.date-list div span { color: #6b7674; font-size: .68rem; }
.date-list .empty-event { grid-template-columns: 1fr; min-height: 145px; place-content: center; text-align: center; }
.date-list li > a { font-size: .8rem; }
.bento-quote { display: none; }

.join-section { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 760px; background: var(--ink); color: #fff; }
.join-visual { min-height: 620px; background-image: linear-gradient(90deg, rgba(20,47,50,.05), rgba(20,47,50,.45)), url("https://images.pexels.com/photos/1630039/pexels-photo-1630039.jpeg?auto=compress&cs=tinysrgb&w=1400"); filter: saturate(.7); }
.join-content { align-self: center; padding: 6rem clamp(2rem, 7vw, 8rem); }
.join-content > p:not(.eyebrow) { max-width: 500px; color: rgba(255,255,255,.65); line-height: 1.75; }
.join-content ul { list-style: none; margin: 2.5rem 0; padding: 0; }
.join-content li { padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.17); font-size: .9rem; }
.join-content li:last-child { border-bottom: 1px solid rgba(255,255,255,.17); }
.join-content li span { display: inline-block; width: 42px; color: #d7c7a1; font-size: .62rem; }

footer { display: grid; grid-template-columns: 1fr 1.2fr .8fr; gap: 3rem; align-items: end; padding: 4rem clamp(1.5rem, 5vw, 5.5rem); background: #0e2628; color: rgba(255,255,255,.73); }
.footer-brand { display: flex; align-items: center; gap: .9rem; color: #fff; }
.footer-brand p { font: 1.35rem var(--serif); }
.footer-contact { display: flex; flex-direction: column; gap: .6rem; }
.footer-contact span { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-contact a { color: #fff; font: clamp(1.2rem, 2vw, 2rem) var(--serif); text-decoration: underline; text-underline-offset: 7px; }
.footer-meta { text-align: right; font-size: .67rem; line-height: 1.7; }

.toast { position: fixed; z-index: 50; right: 1.5rem; bottom: 1.5rem; max-width: 340px; padding: 1rem 1.2rem; transform: translateY(calc(100% + 2rem)); opacity: 0; background: var(--paper); border-left: 4px solid var(--orange); box-shadow: 0 18px 50px rgba(9,30,31,.18); font-size: .8rem; transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .22s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.content-shell { width: min(900px, calc(100% - 2.5rem)); min-height: 55vh; margin: 0 auto; padding: 10rem 0 6rem; }
.content-shell h1 { margin: 0 0 2rem; font: 400 clamp(3rem, 7vw, 6rem)/.95 var(--serif); letter-spacing: -.045em; }
.content-shell article + article { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.content-shell .entry-content { color: #536666; line-height: 1.8; }
.content-shell .entry-content a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.content-shell .post-meta { margin-bottom: .75rem; color: #6b7674; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.content-shell .pagination { margin-top: 3rem; }
.entry-featured-image { width: 100%; height: auto; margin-bottom: 2.5rem; }
.archive-event-list { margin-top: 3rem; border-top: 1px solid var(--line); }
.archive-event { display: grid; grid-template-columns: 110px 1fr auto; gap: 2rem; align-items: center; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.archive-event time { display: flex; align-items: center; gap: .7rem; text-transform: uppercase; }
.archive-event time strong { font: 2.4rem var(--serif); }
.archive-event time span, .archive-event p { color: #6b7674; font-size: .72rem; }
.archive-event h2 { margin: 0; font: 400 1.65rem var(--serif); }
.archive-event p { margin: .3rem 0 0; }
.event-details { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-details p { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding: 1.25rem; border-right: 1px solid var(--line); }
.event-details p:last-child { border-right: 0; }
.event-details strong { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.event-details span { font: 1.2rem var(--serif); }
.event-page-calendar { max-width: 320px; margin-bottom: 2.5rem; color: #fff; background: var(--river); }
.error-page p:not(.eyebrow) { max-width: 52ch; margin-bottom: 2rem; color: #536666; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes pulse { 0%,100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-cta { display: none; }
  .menu-toggle { justify-self: end; display: grid; gap: 6px; width: 42px; height: 42px; place-content: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: transparent; }
  .menu-toggle span:not(.sr-only) { display: block; width: 17px; height: 1px; background: currentColor; transition: transform .3s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.5rem; padding: 6rem 8vw; transform: translateY(-100%); opacity: 0; background: var(--ink); font: 400 clamp(2.1rem, 6vw, 4rem) var(--serif); letter-spacing: -.02em; text-transform: none; transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .3s; }
  .main-nav.is-open { transform: translateY(0); opacity: 1; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-content { padding-left: 3rem; }
  .manifesto { grid-template-columns: .25fr 1fr; }
  .stats { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); }
  .stats div:last-child { border-bottom: none; }
  .bento-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 470px 350px auto; }
  .bento-feature { grid-column: 1 / 3; grid-row: auto; }
  .bento-dates { grid-column: 1 / 3; }
}

@media (max-width: 760px) {
  .site-header { position: absolute; height: 82px; padding: 0 1.2rem; }
  .brand-mark { width: 35px; }
  .main-nav { padding: 6rem 2rem; font-size: 2.1rem; }
  .hero { min-height: 850px; display: block; }
  .hero-content { position: absolute; z-index: 4; inset: auto 0 0; padding: 7rem 1.25rem 4.5rem; background: linear-gradient(0deg, rgba(19,49,51,.98) 5%, rgba(19,49,51,.82) 60%, transparent); }
  .hero h1 { font-size: clamp(3.6rem, 18vw, 5.2rem); }
  .hero-copy { max-width: 34ch; margin-top: 1.4rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1rem; margin-top: 1.6rem; }
  .hero-visual { min-height: 520px; clip-path: none; }
  .hero-image { background-position: 60% center; }
  .hero-note, .hero-roundel, .hero-index { display: none; }
  .manifesto { display: block; padding: 6rem 1.25rem; }
  .section-kicker { margin-bottom: 2rem; }
  .section-kicker::before { margin-bottom: 1rem; }
  .manifesto h2, .section-heading h2, .join-content h2 { font-size: clamp(3rem, 14vw, 4.5rem); }
  .stats { display: grid; grid-template-columns: 1fr; margin-top: 3rem; }
  .stats div:last-child { border-bottom: 1px solid var(--line); }
  .news-section { padding: 5.5rem 1.1rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 1.75rem; }
  .bento-grid { display: grid; grid-template-columns: 1fr; grid-template-rows: none; gap: .8rem; }
  .bento, .bento-feature, .bento-dates { grid-column: auto; grid-row: auto; min-height: 360px; }
  .bento-feature { min-height: 560px; }
  .bento-dates { min-height: auto; }
  .bento-brief { min-height: 390px; }
  .date-list li { grid-template-columns: 54px 1fr auto; }
  .join-section { display: grid; grid-template-columns: 1fr; }
  .join-visual { min-height: 480px; }
  .join-content { padding: 5rem 1.25rem; }
  footer { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 1.25rem; }
  .footer-meta { text-align: left; }
  .toast { right: 1rem; bottom: 1rem; left: 1rem; max-width: none; }
  .archive-event { grid-template-columns: 75px 1fr auto; gap: .8rem; }
  .archive-event time { align-items: flex-start; flex-direction: column; gap: 0; }
  .event-details { grid-template-columns: 1fr; }
  .event-details p { border-right: 0; border-bottom: 1px solid var(--line); }
  .event-details p:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
