/*
Theme Name: Mairie de Conques-sur-Orbiel
Theme URI: https://conques-sur-orbiel.fr
Author: Service Informatique & Communication
Description: Thème ergonomique, accessible et administrable conçu pour la Mairie de Conques-sur-Orbiel.
Version: 1.0.1
Text Domain: mairie-conques
*/

:root {
  --primary-color: #b91c1c;       /* Rouge identifié sur l'esquisse pour les actualités */
  --primary-dark: #991b1b;
  --secondary-color: #1e3a8a;     /* Bleu institutionnel */
  --accent-alert: #dc2626;        /* Alerte / Urgence */
  --bg-light: #f8fafc;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --border-color: #e2e8f0;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- BANDEAU D'URGENCE --- */
.emergency-alert {
  background-color: #fee2e2;
  border-left: 6px solid var(--accent-alert);
  padding: 0.85rem 1.5rem;
  margin: 1rem 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.emergency-alert-title {
  font-weight: 700;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- HEADER PRINCIPAL --- */
.site-header {
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  background: #fff;
}

.top-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

.header-brand img {
  max-height: 70px;
  width: auto;
}

.header-brand h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--bg-light);
  border-radius: 50%;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: bold;
}

.header-search form {
  display: flex;
}

.header-search input[type="search"] {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
}

.header-search button {
  padding: 0.45rem 0.85rem;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}

/* --- TUILES D'ACCÈS RAPIDE (NAVIGATION) --- */
.quick-access-section {
  padding: 2.5rem 0 1.5rem;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-card,
.quick-access-grid li a {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  width: 100%;
}

.quick-access-grid li {
  display: flex;
}

.quick-card:hover,
.quick-access-grid li a:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  background: #fff;
  color: var(--primary-color);
}

.quick-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

/* --- BANDEAU & SECTION ACTUALITÉS --- */
.section-banner-title {
  background-color: var(--primary-color);
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: 2rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: white;
  margin-bottom: 1.5rem;
}

.news-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-card.sticky-post {
  border: 2px solid var(--primary-color);
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  background: #fee2e2;
  color: var(--primary-dark);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.news-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.news-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.news-footer-link {
  text-align: right;
  margin-bottom: 2.5rem;
}

.news-footer-link a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
}

/* --- AGENDA & FRISE DE FOND --- */
.agenda-section {
  margin-bottom: 3rem;
}

.agenda-frieze {
  background-color: #0f172a;
  background-size: cover;
  background-position: center bottom;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 2.5rem 1.5rem;
  color: #fff;
  position: relative;
  min-height: 220px;
}

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.agenda-item {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agenda-date {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  text-align: center;
  min-width: 65px;
}

.agenda-date .day { font-size: 1.3rem; font-weight: bold; line-height: 1; }
.agenda-date .month { font-size: 0.75rem; text-transform: uppercase; }

/* --- FOOTER & PARTENAIRES --- */
.site-footer {
  background: #f1f5f9;
  border-top: 3px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 3rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  align-items: center;
}

.footer-info h4, .footer-partners h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.footer-partners-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.footer-partners-list img {
  height: 40px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(80%);
  transition: all 0.2s;
}

.footer-partners-list img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.footer-bottom {
  background: #0f172a;
  color: #cbd5e1;
  padding: 1rem 0;
  font-size: 0.85rem;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 868px) {
  .news-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .top-header-bar { flex-direction: column; align-items: flex-start; }
}
