/*
Theme Name:  Taulignan
Theme URI:   https://www.taulignan.fr
Author:      Mairie de Taulignan
Author URI:  https://www.taulignan.fr
Description: Thème officiel de la Ville de Taulignan (Drôme Provençale). Charte graphique lavande, rubriques municipales colorées, compatible mobile.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taulignan
Tags:        municipality, lavender, responsive, custom-colors, custom-menu
*/

@font-face {
    font-family: 'Afacad Flux';
    src: url('/wp-content/uploads/fonts/Afacad-Flux.woff2') format('woff2'),
         url('/wp-content/uploads/fonts/Afacad-Flux.woff')  format('woff');
    font-weight: normal;
    font-style:  normal;
    font-display: swap;
}


/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --lav:        #7b5ea7;
  --lav-l:      #c9aee8;
  --lav-d:      #2e1f4a;
  --lav-dark:   #1a0f2e;
  --border:     rgba(192,156,230,0.18);
  --border-acc: rgba(192,156,230,0.4);
  --tm:         #f3edfb;
  --mu:         rgba(243,237,251,0.62);
  --di:         rgba(243,237,251,0.35);
  --bg:         #f5f2ef;
  --text:       #1a1510;
  --muted:      #666;
  --white:      #ffffff;

  /* Rubriques */
  --c-mairie:      #a0173a;
  --c-hommages:    #6b6b6b;
  --c-finances:    #c0442a;
  --c-cadre:       #7a7228;
  --c-education:   #c08820;
  --c-activites:   #6b4fa0;
  --c-infos:       #1a5f8a;
  --c-option:      #1a6b4a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--lav); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: 'Afacad Flux';
  line-height: 1.2;
}

h1 { font-size: clamp(32px, 6vw, 56px); }
h2 { font-size: clamp(22px, 4vw, 36px); }
h3 { font-size: clamp(18px, 3vw, 24px); }
h4 { font-size: 18px; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--lav-dark);
  border-bottom: 2px solid var(--lav);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Afacad Flux';
  font-size: 18px; color: #fff;
  flex-shrink: 0;
}

.site-name {
  font-family: 'Afacad Flux';
  font-size: 17px;
  color: var(--lav-l);
  white-space: nowrap;
}

/* Navigation principale */
#main-nav {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#main-nav::-webkit-scrollbar { display: none; }

#main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#main-nav ul li a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.14);
  transition: opacity 0.15s;
}
#main-nav ul li a:hover { opacity: 0.75; text-decoration: none; }

/* Hamburger mobile */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  margin-left: auto;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid #e4e0db;
  padding: 0.65rem 1rem;
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.breadcrumb a { color: var(--lav); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep { color: #ccc; }

/* ============================================================
   HERO — PAGE D'ACCUEIL
   ============================================================ */
.hero-home {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 8rem;
  background:
    radial-gradient(ellipse 65% 50% at 15% 85%, rgba(123,94,167,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 85% 15%, rgba(60,100,60,0.13) 0%, transparent 55%),
    linear-gradient(170deg, #1a0f2e 0%, #2e1f4a 50%, #1c2e1e 100%);
  overflow: hidden;
}

.hero-home::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04; pointer-events: none;
}

.hero-lavande {
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  opacity: 0.2; pointer-events: none;
  width: 100%; max-width: 800px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(160,123,200,0.14);
  border: 1px solid rgba(160,123,200,0.45);
  border-radius: 999px; padding: 7px 20px;
  font-size: 11px; font-weight: 500;
  color: var(--lav-l);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 2rem; position: relative;
  animation: fadeDown 0.8s ease both;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%; background: var(--lav-l);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero-home h1 {
  color: var(--tm);
  line-height: 1.08;
  margin-bottom: 0.6rem;
  position: relative;
  animation: fadeDown 0.9s 0.1s ease both;
}
.hero-home h1 em { color: var(--lav-l); font-style: italic; }

.hero-sub {
  font-size: 12px; color: var(--di);
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 1.4rem;
  animation: fadeDown 0.9s 0.2s ease both;
}

.hero-desc {
  font-size: 16px; color: var(--mu);
  max-width: 480px; line-height: 1.8;
  margin-bottom: 2.2rem; font-weight: 300;
  animation: fadeDown 0.9s 0.3s ease both;
}

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lav); color: #fff;
  border: none; border-radius: 999px;
  padding: 13px 28px;
  font-family: 'Lato', sans-serif;
  font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: fadeDown 0.9s 0.4s ease both;
  box-shadow: 0 4px 24px rgba(123,94,167,0.35);
}
.btn-cta:hover {
  background: var(--lav-l); color: #1a0f2e;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ============================================================
   STATS STRIP
   ============================================================ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  background: var(--lav-d);
  padding: 1.4rem 0.8rem;
  text-align: center;
}
.stat-num {
  font-family: 'Afacad Flux';
  font-size: 26px; color: var(--lav-l);
  font-weight: 600; display: block;
}
.stat-label {
  font-size: 10px; color: var(--di);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 4px; display: block;
}

/* ============================================================
   RUBRIQUES — GRILLE ACCUEIL
   ============================================================ */
.rubriques-intro {
  background: var(--white);
  border-bottom: 1px solid #e0dcd8;
  padding: 2rem 1.5rem;
  text-align: center;
}
.rubriques-intro h2 { color: var(--text); margin-bottom: 0.5rem; }
.rubriques-intro p {
  font-size: 14px; color: #777;
  max-width: 520px; margin: 0 auto;
  font-weight: 300; line-height: 1.7;
}

.rubriques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1px;
  background: #e0dcd8;
}

a.rcard {
  display: block;
  background: var(--white);
  padding: 1.6rem 1.4rem 1.8rem;
  border-left: 5px solid transparent;
  text-decoration: none; color: inherit;
  transition: background 0.18s;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}
a.rcard:hover { background: #fdfaff; text-decoration: none; }
a.rcard:active { background: #f8f5ff; }

.rcard-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 0.9rem; }
.rcard-swatch { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; margin-top: 2px; }
.rcard-meta { flex: 1; }
.rcard-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; margin-bottom: 2px; }
.rcard-title { font-family: 'Afacad Flux'; font-size: 17px; font-weight: 600; line-height: 1.2; }
.rcard-subtitle { font-size: 11px; font-style: italic; opacity: 0.45; margin-top: 2px; }

.rcard-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 0.9rem; }
.rtag { font-size: 11px; border-radius: 999px; padding: 3px 10px; font-weight: 500; opacity: 0.82; }

.rcard-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 6px 14px;
  border: 1.5px solid;
}

/* ============================================================
   HERO — PAGES RUBRIQUE
   ============================================================ */
.rubrique-hero {
  padding: 2.5rem 1.5rem 3rem;
  position: relative; overflow: hidden;
}
.rubrique-hero::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.rubrique-hero::after {
  content: ''; position: absolute; right: 40px; bottom: -60px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.rubrique-hero-inner { max-width: 800px; margin: 0 auto; position: relative; }

.rh-cat {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.12);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 0.7rem;
}
.rh-title {
  font-family: 'Afacad Flux';
  font-size: clamp(26px, 5vw, 44px); font-weight: 600;
  color: #fff; line-height: 1.1; margin-bottom: 0.4rem;
}
.rh-sub { font-size: 13px; color: rgba(255,255,255,0.55); font-style: italic; margin-bottom: 1.4rem; }

.wip-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px; padding: 7px 16px;
  font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 500;
}

/* ============================================================
   SOUS-THÈMES — LISTE (pages rubrique)
   ============================================================ */
.sous-themes-section {
  max-width: 800px; margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}
.st-section-title {
  font-family: 'Afacad Flux';
  font-size: 18px; margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

a.st-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border-radius: 12px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0,0,0,0.07);
  border-left: 4px solid;
  text-decoration: none; color: inherit;
  margin-bottom: 10px;
  transition: box-shadow 0.18s, transform 0.15s, background 0.15s;
  -webkit-tap-highlight-color: rgba(0,0,0,0.06);
}
a.st-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  transform: translateX(3px);
  background: #fdfbff;
  text-decoration: none;
}

.st-icon { font-size: 26px; flex-shrink: 0; width: 36px; text-align: center; }
.st-body { flex: 1; min-width: 0; }
.st-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.st-wip { font-size: 12px; color: #aaa; font-weight: 300; }
.st-arrow { color: rgba(0,0,0,0.2); flex-shrink: 0; }

/* ============================================================
   PAGE SOUS-THÈME — CONTENU
   ============================================================ */
.subtag-hero {
  padding: 2.5rem 1.5rem 3.5rem;
  position: relative; overflow: hidden;
}
.subtag-hero-inner { max-width: 800px; margin: 0 auto; position: relative; }
.hero-icon { font-size: 44px; display: block; margin-bottom: 0.8rem; line-height: 1; }

.wip-box {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px; padding: 1rem 1.4rem;
  max-width: 520px;
}
.wip-box p { font-size: 14px; color: rgba(255,255,255,0.9); line-height: 1.7; font-weight: 300; }
.wip-box strong { color: #fff; font-weight: 600; }

.page-content {
  max-width: 800px; width: 100%;
  margin: 0 auto; padding: 2rem 1rem 2.5rem;
}

.desc-card {
  background: var(--white);
  border-radius: 12px;
  border-left: 4px solid;
  padding: 1.4rem 1.6rem; margin-bottom: 1.2rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.desc-card h2 { font-size: 18px; margin-bottom: 0.6rem; font-family: 'Playfair Display', serif; }
.desc-card p { font-size: 14px; color: #555; line-height: 1.75; font-weight: 300; }

.placeholder-box {
  background: var(--white);
  border: 2px dashed rgba(0,0,0,0.12);
  border-radius: 12px; padding: 2.5rem 1.5rem;
  text-align: center; color: #aaa; margin-top: 1.2rem;
}
.placeholder-box .ph-icon { font-size: 34px; margin-bottom: 0.7rem; opacity: 0.4; display: block; }
.placeholder-box h3 { font-family: 'Afacad Flux'; font-size: 17px; margin-bottom: 0.5rem; }
.placeholder-box p { font-size: 13px; line-height: 1.7; font-weight: 300; }

/* ============================================================
   CONTENU WORDPRESS (articles, pages)
   ============================================================ */
.entry-content {
  max-width: 800px; margin: 2rem auto; padding: 0 1rem;
}
.entry-content h2, .entry-content h3 { margin: 1.5rem 0 0.8rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1rem 2rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote {
  border-left: 4px solid var(--lav);
  padding: 0.8rem 1.2rem; margin: 1.2rem 0;
  background: rgba(123,94,167,0.06);
  border-radius: 0 8px 8px 0;
  font-style: italic; color: #555;
}
.entry-content img { border-radius: 10px; margin: 1rem 0; }
.entry-content a { color: var(--lav); }

/* ============================================================
   RETOUR / FOOTER PAGES
   ============================================================ */
.page-footer-bar {
  background: var(--white);
  border-top: 1px solid #e4e0db;
  padding: 1.4rem 1rem;
}
.page-footer-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.page-footer-inner p { font-size: 13px; color: #777; line-height: 1.6; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 9px 18px;
  font-size: 13px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.15s, transform 0.12s;
}
.btn:hover { opacity: 0.82; transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--lav); color: #fff; }
.btn-secondary { background: transparent; color: var(--lav); border: 1.5px solid var(--lav); }

/* ============================================================
   VIDÉO
   ============================================================ */
.video-section {
  background: var(--lav-d);
  padding: 3rem 1.5rem;
}
.video-label { text-align: center; margin-bottom: 1.5rem; }
.video-eyebrow {
  font-size: 11px; color: #a07bc8;
  letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.5rem;
}
.video-label h2 { color: var(--tm); }
.video-wrap {
  max-width: 800px; margin: 0 auto;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-acc);
  aspect-ratio: 16/9;
  box-shadow: 0 0 50px rgba(123,94,167,0.25);
}
.video-wrap video, .video-wrap iframe {
  width: 100%; height: 100%;
  display: block; background: #1a0f2e; border: none;
}

/* ============================================================
   FOOTER SITE
   ============================================================ */
#site-footer {
  background: var(--lav-dark);
  border-top: 2px solid var(--lav);
  padding: 1.5rem;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.footer-brand {
  font-family: 'Afacad Flux';
  font-size: 17px; color: var(--lav-l);
}
.footer-copy { font-size: 11px; color: var(--di); letter-spacing: 0.05em; }
.footer-copy a { color: var(--lav-l); }

/* ============================================================
   WIDGETS SIDEBAR
   ============================================================ */
.widget { margin-bottom: 2rem; }
.widget-title {
  font-family: 'Afacad Flux';
  font-size: 16px; color: var(--text);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--lav);
}
.widget ul { list-style: none; }
.widget ul li { padding: 0.3rem 0; border-bottom: 1px solid #eee; font-size: 14px; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--lav); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  #main-nav {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--lav-dark);
    border-bottom: 2px solid var(--lav);
    padding: 1rem;
    z-index: 199;
  }
  #main-nav.open { display: block; }
  #main-nav ul { flex-direction: column; gap: 6px; }
  #main-nav ul li a { display: block; padding: 10px 16px; border-radius: 8px; }

  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .rubriques-grid { grid-template-columns: 1fr; }
  #site-footer { flex-direction: column; text-align: center; align-items: center; }
  .page-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .stat-num { font-size: 20px; }
  .btn-row { flex-direction: column; }
}


