/* ============================================
   THÈME LINUXIEN CHRÉTIEN
   Design : Glassmorphism spirituel & technique
   ============================================ */

/* -- Variables -- */
:root {
  --bg-gradient: linear-gradient(180deg, #1a1c2c 0%, #0d0e14 100%);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);
  --accent: #7bd0ff;
  --accent-soft: rgba(123, 208, 255, 0.15);
  --text-primary: #ffffff;
  --text-body: #e0e0e0;
  --text-muted: #9aa0b4;
  --radius-card: 16px;
  --radius-btn: 8px;
  --transition: 0.3s ease;
  --max-width: 1100px;
  --content-width: 800px;
}

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: 'Newsreader', 'Georgia', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; padding-bottom: 180px; }

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

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

/* -- Typographie -- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', 'Inter', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

p { margin-bottom: 1.4rem; }

/* -- Conteneur -- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -- Glassmorphism -- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 2.5rem;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: 'Manrope', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover { opacity: 1; }

.site-logo .logo-cross {
  color: var(--accent);
  font-size: 1.3rem;
}

.site-nav { display: flex; gap: 0.25rem; }

.site-nav a {
  color: var(--text-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-btn);
  transition: all var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  background: var(--accent-soft);
  opacity: 1;
}

/* ============================================
   HERO (page d'accueil / blog)
   ============================================ */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  border: 1px solid rgba(123, 208, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.82rem;
  font-family: 'Manrope', sans-serif;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 { margin-bottom: 1rem; }

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   LISTE D'ARTICLES (blog.html.twig)
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.post-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 208, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-tag {
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Manrope', sans-serif;
}

.post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--accent); opacity: 1; }

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition);
}

.read-more:hover { gap: 0.6rem; opacity: 1; }

/* ============================================
   ARTICLE (item.html.twig)
   ============================================ */
.article-hero {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  margin-bottom: 3rem;
  position: relative;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.article-hero:hover img { transform: scale(1.02); }

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,14,20,0.8) 0%, transparent 50%);
}

.article-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-header { margin-bottom: 2.5rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-body);
}

.article-content h2,
.article-content h3 { margin: 2rem 0 1rem; }

.article-content p { margin-bottom: 1.4rem; }

.article-content ul,
.article-content ol {
  margin: 0 0 1.4rem 1.5rem;
}

.article-content li { margin-bottom: 0.4rem; }

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  color: var(--text-primary);
  font-style: italic;
}

.article-content pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-btn);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(123, 208, 255, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: #e0e0e0;
}

.article-content img {
  border-radius: var(--radius-card);
  margin: 1.5rem auto;
  transition: transform var(--transition);
}

.article-content img:hover { transform: scale(1.01); }

/* ============================================
   GALERIE (gallery.html.twig)
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 2rem;
  color: white;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ============================================
   CONTACT (contact.html.twig)
   ============================================ */
.hero-contact {
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 0 0 40px 40px;
  margin-bottom: 4rem;
  overflow: hidden;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  inset: 0;
}

.hero-contact-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.hero-contact-content h1 { font-size: clamp(2rem, 5vw, 3rem); }

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: 0.85rem 0;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 1.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form textarea { min-height: 120px; resize: vertical; }

/* ============================================
   BOUTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-btn);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #0d0e14;
}

.btn-primary:hover {
  background: #a0dcff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(123, 208, 255, 0.3);
  opacity: 1;
  color: #0d0e14;
}

.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-nav {
  margin-top: 3rem;
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.pagination li {
  display: flex;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 1rem;
  border-radius: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.08);
  color: #a0a8c0;
  transition: all 0.3s;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.pagination-btn:hover {
  border-color: #7eb8f7;
  color: #7eb8f7;
}

.pagination-btn.active {
  background: #7eb8f7;
  border-color: #7eb8f7;
  color: #0d0e14;
  font-weight: 700;
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination .gap span {
  color: #a0a8c0;
  padding: 0 0.5rem;
  line-height: 40px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: 'Manrope', sans-serif;
}

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

.footer-address { line-height: 1.6; }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); opacity: 1; }

/* ============================================
   RESPONSIVE
   ============================================ */
/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: #e0e0e0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 14, 20, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 1rem 1.5rem;
    gap: 0.25rem;
    z-index: 100;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .site-nav a:last-child { border-bottom: none; }

  .header-inner { position: relative; }

  .posts-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  main { padding-bottom: 100px; }
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-social { justify-content: center; }

  .article-wrapper { padding: 0 0.5rem; }
  .article-header h1 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .glass-panel { padding: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.8rem; }
}

.pagination-nav {
  margin-top: 3rem;
  text-align: center;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  border-radius: var(--radius-btn);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
  margin: 0 0.2rem;
}

.pagination-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0e14;
  font-weight: 700;
}

.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .gap span {
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* ============================================
   GRAV FORM PLUGIN STYLES
   ============================================ */
.form-wrapper {
  width: 100%;
}

.form-field {
  margin-bottom: 1.25rem;
}

/* Labels */
.form-label label,
.form-field > .form-label label {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a0a8c0;
  margin-bottom: 0.5rem;
}

.form-label label .required {
  color: #7eb8f7;
  margin-left: 0.2rem;
}

/* Text / Email inputs */
.form-input-wrapper input[type="text"],
.form-input-wrapper input[type="email"],
.form-input-wrapper input[type="tel"],
.form-input-wrapper input[type="url"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #e0e0e0;
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
  outline: none;
  box-sizing: border-box;
}

.form-input-wrapper input:focus {
  border-color: #7eb8f7;
  background: rgba(126, 184, 247, 0.05);
}

.form-input-wrapper input::placeholder {
  color: rgba(160, 168, 192, 0.5);
}

/* Textarea */
.form-textarea-wrapper {
  width: 100%;
}

.form-textarea-wrapper textarea {
  width: 100%;
  min-height: 150px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #e0e0e0;
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.form-textarea-wrapper textarea:focus {
  border-color: #7eb8f7;
  background: rgba(126, 184, 247, 0.05);
}

.form-textarea-wrapper textarea::placeholder {
  color: rgba(160, 168, 192, 0.5);
}

/* Submit button */
.buttons {
  margin-top: 1.5rem;
}

.buttons .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #7eb8f7;
  color: #0d0e14 !important;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 2rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.buttons .button:hover {
  background: #a8d0ff;
  transform: translateY(-1px);
}

/* Errors */
.form-errors .form-message {
  color: #f87171;
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.form-field.has-errors .form-input-wrapper input,
.form-field.has-errors .form-textarea-wrapper textarea {
  border-color: #f87171;
}

/* Success / error messages */
.notices {
  margin-bottom: 1.5rem;
  text-align: left;
}

.notices p {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.notices.success p,
.notices.green p {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.notices.error p,
.notices.red p {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}

.notices.warning p,
.notices.yellow p {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}


/* Social links in footer */
.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0a8c0;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
}

.footer-social a:hover {
  border-color: #7eb8f7;
  color: #7eb8f7;
  transform: translateY(-2px);
}
