/* ADAMA 76 — Feuille de style principale */

:root {
  --bleu: #002395;
  --bleu-sombre: #001a70;
  --rouge: #EF4135;
  --blanc: #ffffff;
  --gris-fond: #f0f2f5;
  --gris-bordure: #dee2e6;
  --texte: #212529;
  --texte-sec: #6c757d;
  --ombre: 0 2px 10px rgba(0, 35, 149, 0.08);
  --rayon: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--gris-fond);
}

/* ─── Bandeau tricolore ─── */
.tricolor {
  height: 6px;
  background: linear-gradient(to right,
    var(--bleu) 33.33%,
    var(--blanc) 33.33%, var(--blanc) 66.66%,
    var(--rouge) 66.66%);
}

/* ─── Header ─── */
header {
  background: var(--bleu);
  color: var(--blanc);
  padding: 1.5rem;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.header-brand {
  text-decoration: none;
  color: var(--blanc);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  height: 68px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 4px;
}

.brand-tagline {
  font-size: 0.875rem;
  opacity: 0.8;
  font-style: italic;
}

/* ─── Navigation ─── */
nav {
  background: var(--bleu-sombre);
  border-bottom: 3px solid var(--rouge);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
}

nav a {
  color: #b0bef0;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

nav a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--blanc);
}

nav a.active {
  color: var(--blanc);
  border-bottom-color: var(--rouge);
}

/* ─── Main ─── */
main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.25rem;
  min-height: 60vh;
}

/* ─── Hero ─── */
.hero {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-top: 5px solid var(--bleu);
}

.hero h1 {
  font-size: 1.6rem;
  color: var(--bleu);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.hero p {
  color: var(--texte-sec);
  max-width: 680px;
  font-size: 1rem;
}

/* ─── Titre de section ─── */
.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bleu);
  border-left: 4px solid var(--rouge);
  padding-left: 0.75rem;
  margin-bottom: 1.25rem;
}

/* ─── Grille de cartes ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.card {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--texte);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 4px solid var(--bleu);
  transition: transform 0.2s, box-shadow 0.2s, border-top-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 35, 149, 0.14);
  border-top-color: var(--rouge);
}

.card-icon { font-size: 1.75rem; }

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bleu);
  margin-top: 0.2rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--texte-sec);
  line-height: 1.5;
}

/* ─── Sections de documents ─── */
.doc-section {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.doc-section-header {
  background: var(--bleu);
  color: var(--blanc);
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--gris-bordure);
  text-decoration: none;
  color: var(--texte);
  transition: background 0.12s, color 0.12s;
}

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

.doc-item:hover {
  background: #eef1fb;
  color: var(--bleu);
}

.doc-icon {
  width: 2rem;
  text-align: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--rouge);
}

.doc-label { flex: 1; font-size: 0.95rem; }

.doc-tag {
  font-size: 0.73rem;
  background: var(--gris-fond);
  color: var(--texte-sec);
  border: 1px solid var(--gris-bordure);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Boîtes d'information ─── */
.info-box {
  background: #eef1fb;
  border-left: 4px solid var(--bleu);
  padding: 0.9rem 1.25rem;
  border-radius: 0 var(--rayon) var(--rayon) 0;
  margin-bottom: 1.5rem;
  color: var(--texte-sec);
  font-size: 0.9rem;
}

.warn-box {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  padding: 0.9rem 1.25rem;
  border-radius: 0 var(--rayon) var(--rayon) 0;
  margin-bottom: 1.5rem;
  color: #7c4a00;
  font-size: 0.9rem;
}

/* ─── Bulletins ─── */
.bulletin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.bulletin-card {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: var(--texte);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  border-bottom: 3px solid var(--gris-bordure);
  transition: transform 0.18s, box-shadow 0.18s, border-bottom-color 0.18s;
}

.bulletin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  border-bottom-color: var(--rouge);
}

.bulletin-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bleu);
  line-height: 1.2;
}

.bulletin-date { font-size: 0.8rem; color: var(--texte-sec); }

.bulletin-ico { font-size: 1.4rem; color: var(--rouge); }

/* ─── Contact ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.75rem;
  border-top: 4px solid var(--bleu);
}

.president-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--bleu);
  display: block;
  margin: 0 auto 1.1rem;
}

.contact-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bleu);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.1rem;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  color: var(--texte-sec);
}

.contact-ico {
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
  margin-top: 0.1rem;
}

.contact-line a { color: var(--bleu); text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

/* ─── Bloc générique ─── */
.content-block {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ─── Footer ─── */
footer {
  background: var(--bleu);
  color: rgba(255,255,255,0.72);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
  line-height: 1.9;
}

.footer-inner { max-width: 1000px; margin: 0 auto; }
footer strong { color: rgba(255,255,255,0.95); }
footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
footer a:hover { text-decoration: underline; }

hr.footer-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 0.75rem auto;
  max-width: 300px;
}

.admin-float-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1500;
  background: var(--rouge);
  color: var(--blanc);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  box-shadow: 0 16px 30px rgba(0,0,0,0.28);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.admin-float-btn:hover {
  transform: translateY(-2px);
  background: #d63020;
}

@media (max-width: 700px) {
  .admin-float-btn {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.88rem;
  }
}

/* ─── Visionneuse modale ─── */
.viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.viewer-modal.open { display: flex; }

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.viewer-box {
  position: relative;
  background: var(--blanc);
  border-radius: var(--rayon);
  width: 92vw;
  max-width: 1020px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
}

.viewer-header {
  background: var(--bleu);
  color: var(--blanc);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.viewer-title {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.viewer-btn {
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s;
  font-family: inherit;
}

.viewer-btn-dl {
  background: var(--rouge);
  color: var(--blanc);
}

.viewer-btn-dl:hover { background: #d63020; color: var(--blanc); }

.viewer-btn-close {
  background: rgba(255,255,255,0.18);
  color: var(--blanc);
  font-size: 1rem;
  padding: 0.4rem 0.7rem;
}

.viewer-btn-close:hover { background: rgba(255,255,255,0.3); }

.viewer-btn-lg {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  margin-top: 0.5rem;
}

.viewer-body {
  flex: 1;
  overflow: hidden;
  background: #525659;
  position: relative;
}

#viewer-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.viewer-video-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1rem;
  color: var(--blanc);
  text-align: center;
  padding: 2.5rem;
}

.viewer-video-icon { font-size: 3.5rem; opacity: 0.8; }

.viewer-video-msg strong { font-size: 1.15rem; }

.viewer-video-msg p { font-size: 0.95rem; opacity: 0.75; max-width: 420px; line-height: 1.5; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .hero { padding: 1.5rem; }
  .hero h1 { font-size: 1.3rem; }
  .brand-name { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  nav a { padding: 0.65rem 0.85rem; font-size: 0.85rem; }
  .brand-name { letter-spacing: 2px; }
}
