/* ============================================
   NaturalisationGuide - style.css
   ============================================ */

/* --- Variables & Reset --- */
:root {
  --orange: #e8651a;
  --orange-light: #fef3ec;
  --teal: #1a6b6e;
  --teal-light: #e6f4f4;
  --cream: #faf8f5;
  --dark: #1a2332;
  --grey: #6b7280;
  --grey-light: #f3f4f6;
  --border: #e5e7eb;
  --white: #ffffff;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26,35,50,0.08);
  --shadow-hover: 0 6px 24px rgba(26,35,50,0.15);
  --transition: 0.25s ease;
  --header-h: 70px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--dark);
  line-height: 1.3;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* --- Containers --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  height: var(--header-h);
  transition: height var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  height: 56px;
  box-shadow: 0 2px 16px rgba(26,35,50,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Logo */
.site-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.site-logo span.logo-accent {
  color: var(--orange);
}

/* Nav */
.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-nav a:hover { background: var(--grey-light); color: var(--orange); }

.site-nav a.nav-cta {
  background: var(--orange);
  color: var(--white);
  padding: 8px 16px;
}
.site-nav a.nav-cta:hover { background: #c9531a; color: var(--white); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1a2332 0%, #1a6b6e 50%, #e8651a 100%);
  padding: 80px 20px 70px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

.btn-orange {
  background: var(--orange);
  color: var(--white);
}
.btn-orange:hover { background: #c9531a; color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--dark);
}
.btn-white:hover { background: var(--grey-light); color: var(--dark); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ============================================
   SECTIONS HOMEPAGE
   ============================================ */
.section { padding: 60px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin-top: 8px;
}
.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

/* --- À la une (3 cards horizontales) --- */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* --- Cards standard --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}

.cat-dossier     { background: #fff3e0; color: #bf6000; }
.cat-procedure   { background: #e3f2fd; color: #1565c0; }
.cat-droits      { background: #f3e5f5; color: #7b1fa2; }
.cat-profils     { background: #e8f5e9; color: #2e7d32; }

.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.4;
  flex: 1;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--grey);
  margin-bottom: 16px;
  line-height: 1.55;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.card-link:hover { color: #c9531a; }
.card-link::after { content: '→'; }

/* Card featured (header coloré) */
.card-featured { position: relative; }
.card-featured .card-header-band {
  height: 6px;
  background: linear-gradient(90deg, var(--orange), var(--teal));
}

/* ============================================
   ENCART SIMULATEUR (homepage)
   ============================================ */
.simulateur-banner {
  background: linear-gradient(135deg, var(--teal) 0%, var(--dark) 100%);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  color: var(--white);
  margin: 0 0 60px;
}
.simulateur-banner h2 { color: var(--white); margin-bottom: 14px; }
.simulateur-banner p { color: rgba(255,255,255,0.85); margin-bottom: 28px; max-width: 500px; margin-left:auto; margin-right:auto; }

/* ============================================
   ARTICLE LAYOUT (content + sidebar)
   ============================================ */
.article-wrap {
  padding: 40px 0 60px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Article content */
.article-content {
  max-width: 760px;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.7rem;
  color: var(--teal);
}

.article-content p {
  line-height: 1.85;
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}

.article-content ul, .article-content ol {
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

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

/* Blockquote */
blockquote {
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  background: var(--orange-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: #5a3a1a;
}

blockquote p { margin-bottom: 0; }

/* Tip box */
.tip-box {
  background: var(--teal-light);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 2rem 0;
}
.tip-box strong { color: var(--teal); display: block; margin-bottom: 8px; font-size: 0.95rem; }
.tip-box p { margin-bottom: 0; font-size: 0.95rem; line-height: 1.7; }

/* Article header */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.article-header .card-cat { margin-bottom: 16px; font-size: 0.78rem; }
.article-header h1 { margin-bottom: 14px; }
.article-meta {
  font-size: 0.85rem;
  color: var(--grey);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--grey-light);
  padding: 12px 20px;
  font-size: 0.83rem;
  color: var(--grey);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { margin: 0 6px; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.sidebar-widget-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--dark);
}

/* Widget simulateur */
.widget-simulateur {
  background: linear-gradient(135deg, var(--orange) 0%, #c9531a 100%);
  color: var(--white);
}
.widget-simulateur .sidebar-widget-title {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.widget-simulateur p { font-size: 0.88rem; color: rgba(255,255,255,0.9); margin-bottom: 16px; line-height: 1.6; }
.widget-simulateur .btn {
  width: 100%;
  justify-content: center;
  background: var(--white);
  color: var(--orange);
  font-size: 0.9rem;
  padding: 12px 16px;
}
.widget-simulateur .btn:hover { background: var(--grey-light); }

/* Widget catégories */
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { font-size: 0.9rem; color: var(--dark); font-weight: 500; }
.cat-list a:hover { color: var(--orange); }
.cat-list .count {
  float: right;
  font-size: 0.78rem;
  background: var(--grey-light);
  color: var(--grey);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Widget articles liés */
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { font-size: 0.88rem; color: var(--dark); line-height: 1.4; display: block; }
.related-list a:hover { color: var(--orange); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand .site-logo { color: var(--white); font-size: 1.2rem; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 300px; }
.footer-brand a { color: var(--orange); font-weight: 600; }
.footer-brand a:hover { color: #f4894d; }

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.footer-col a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--orange); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr 240px; gap: 32px; }
}

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; margin-top: 40px; }
}

@media (max-width: 640px) {
  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 16px; gap: 4px; }
  .site-nav a { display: block; padding: 10px 14px; }
  .nav-toggle { display: flex; }
  .featured-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .simulateur-banner { padding: 32px 20px; }
  .hero { padding: 60px 20px 50px; }
}

/* ── Ressources grid (section #ressources-fr) ── */
.ressources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.ressource-card {
  background: var(--white, #fff);
  border: 2px solid var(--teal);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--dark);
  display: block;
  transition: all .2s;
}
.ressource-card:hover {
  background: var(--teal);
  color: #fff;
  transform: translateY(-3px);
}
.ressource-card h3 {
  font-size: 1rem;
  font-family: Georgia, serif;
  margin: 0 0 .5rem;
}
.ressource-card p {
  font-size: .85rem;
  margin: 0;
  opacity: .8;
}
@media (max-width: 768px) {
  .ressources-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ressources-grid { grid-template-columns: 1fr; }
}
