/* =========================================================
   Résidence Fiscale Plus - Vintage Retro CSS Theme
   Brand: Professionnel, fiable, discret, moderne, rassurant
   Style: Vintage Retro (retro colors, vintage fonts, nostalgic elements)
   ========================================================= */

/* --------------------
   FONT IMPORTS
--------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Open+Sans:wght@400;700&family=Roboto+Slab:wght@700&display=swap');

:root {
  /* Brand Colors */
  --primary: #20406A;
  --secondary: #F3F5F7;
  --accent: #B8861B;
  --accent-light: #D0A03D;
  --vintage-red: #B94E48;
  --vintage-green: #5A7D7C;
  --vintage-blue: #6A8CA4;
  --vintage-bg: #F8F4E3;
  --vintage-brown: #7C5C36;
  --vintage-orange: #E2A76F;
  --vintage-shadow: rgba(32, 64, 106, 0.08);
  --white: #fff;
  --black: #222;
  --text-dark: #2B2B2B;
  --text-light: #fff;
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --shadow: 0 4px 24px var(--vintage-shadow);
  --transition: all 0.25s cubic-bezier(.4,0,.2,1);
  --section-spacing: 60px;
  --container-max: 1100px;
  --pattern-url: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" fill="%23F8F4E3"/><circle cx="20" cy="20" r="2" fill="%23B8861B"/><circle cx="0" cy="0" r="2" fill="%23B8861B"/><circle cx="40" cy="40" r="2" fill="%23B8861B"/></svg>');
  /* Fonts */
  --font-display: 'Montserrat', 'Roboto Slab', serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

html {
  box-sizing: border-box;
  font-size: 18px;
  background: var(--vintage-bg);
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--pattern-url), var(--vintage-bg);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* --------------------
   LAYOUT CONTAINERS
--------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --------------------
   HEADER & NAVIGATION
--------------------- */
header {
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 2px 12px rgba(32,64,106,0.07);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding-top: 0;
  padding-bottom: 0;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav a {
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s;
}
nav a:not(.cta-btn):hover,
nav a:not(.cta-btn):focus {
  color: var(--accent);
}
nav a.cta-btn {
  background: var(--accent);
  color: var(--white);
  border-radius: var(--border-radius-sm);
  padding: 10px 22px;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(184,134,27,0.08);
  border: none;
  margin-left: 12px;
  transition: var(--transition);
  text-shadow: 0 1px 0 #b8861b44;
}
nav a.cta-btn:hover,
nav a.cta-btn:focus {
  background: var(--accent-light);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(184,134,27,0.16);
}
nav img {
  height: 38px;
  margin-right: 18px;
  filter: drop-shadow(0 2px 2px #0001);
}

/* Hamburger menu button */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 18px;
  box-shadow: 0 2px 8px rgba(184,134,27,0.08);
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--accent-light);
  color: var(--primary);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, var(--vintage-bg) 80%, var(--accent-light) 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 40px 24px 24px 24px;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.7,0,.3,1);
  box-shadow: 0 0 0 100vw rgba(32,64,106,0.10);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 2.2rem;
  align-self: flex-end;
  margin-bottom: 24px;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.mobile-nav a {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px dashed var(--accent-light);
  transition: color 0.2s;
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--vintage-red);
}

/* Hide nav on mobile, show burger */
@media (max-width: 1024px) {
  nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --------------------
   FOOTER
--------------------- */
footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 0;
  margin-top: 60px;
  border-top: 6px double var(--accent);
}
footer .container {
  padding-top: 32px;
  padding-bottom: 32px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 0;
}
footer nav a {
  color: var(--accent-light);
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: underline dotted;
  transition: color 0.2s;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--white);
}
footer img {
  height: 32px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 2px #0001);
}
footer p {
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: center;
}

/* --------------------
   SECTIONS & SPACING
--------------------- */
section {
  margin-bottom: var(--section-spacing);
  padding: 40px 20px;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
section:nth-child(even) {
  background: var(--vintage-bg);
}

/* Decorative retro pattern for hero/cta */
section:first-of-type {
  background: linear-gradient(120deg, var(--vintage-bg) 80%, var(--accent-light) 100%);
  border-bottom: 6px double var(--accent);
}
section:last-of-type {
  background: linear-gradient(120deg, var(--vintage-bg) 80%, var(--accent-light) 100%);
  border-top: 6px double var(--accent);
}

/* --------------------
   TYPOGRAPHY
--------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.3rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #b8861b22;
  margin-bottom: 18px;
}
h2 {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--vintage-brown);
  margin-bottom: 14px;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vintage-red);
}
h4, h5, h6 {
  font-size: 1.1rem;
  font-weight: 700;
}
p, ul, ol {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}
ul, ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
ul li, ol li {
  margin-bottom: 8px;
  font-family: var(--font-body);
  position: relative;
}
ul li::before {
  content: '\25A0';
  color: var(--accent);
  font-size: 0.7em;
  margin-right: 8px;
  vertical-align: middle;
}
ol li::marker {
  color: var(--accent);
  font-weight: bold;
}
a {
  color: var(--vintage-blue);
  text-decoration: underline;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--vintage-red);
}
strong {
  color: var(--vintage-brown);
  font-weight: 700;
}

/* --------------------
   BUTTONS & CTA
--------------------- */
.cta-btn, button.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 13px 32px;
  margin-top: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(184,134,27,0.10);
  cursor: pointer;
  text-shadow: 0 1px 0 #b8861b44;
  transition: var(--transition);
  outline: none;
  position: relative;
  z-index: 1;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--accent-light);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(184,134,27,0.16);
  transform: translateY(-2px) scale(1.03);
}

/* --------------------
   FLEXBOX LAYOUTS
--------------------- */
.feature-grid, .card-container, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.feature-grid > div, .card {
  background: var(--secondary);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px rgba(32,64,106,0.06);
  padding: 24px 20px;
  flex: 1 1 220px;
  min-width: 220px;
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-grid > div:hover, .card:hover {
  box-shadow: 0 6px 24px rgba(32,64,106,0.13);
  transform: translateY(-4px) scale(1.02);
}
.card-container {
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--vintage-orange);
  color: var(--text-dark);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px rgba(184,134,27,0.10);
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  position: relative;
  border-left: 6px solid var(--accent);
  transition: box-shadow 0.2s, transform 0.2s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(184,134,27,0.18);
  transform: translateY(-2px) scale(1.01);
}
.testimonial-card p {
  color: var(--primary);
  font-style: italic;
  margin: 0 0 0 0;
  flex: 1;
}
.testimonial-card span {
  color: var(--vintage-brown);
  font-weight: 700;
  font-size: 0.98em;
  margin-left: 12px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --------------------
   RESPONSIVE DESIGN
--------------------- */
@media (max-width: 1024px) {
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
  .feature-grid > div, .card {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  .container {
    padding: 0 10px;
  }
  section {
    padding: 28px 8px;
    margin-bottom: 36px;
  }
  .content-wrapper {
    gap: 16px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .testimonial-card {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  footer .content-wrapper {
    gap: 10px;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }
  h2 {
    font-size: 1.1rem;
  }
  nav a.cta-btn, .cta-btn {
    font-size: 1rem;
    padding: 10px 18px;
  }
}

/* --------------------
   MICRO-INTERACTIONS
--------------------- */
section, .card, .feature-grid > div, .testimonial-card {
  transition: box-shadow 0.2s, transform 0.2s;
}
section:hover, .card:hover, .feature-grid > div:hover, .testimonial-card:hover {
  box-shadow: 0 8px 32px rgba(32,64,106,0.13);
}

/* --------------------
   RETRO ELEMENTS
--------------------- */
section, .card, .feature-grid > div, .testimonial-card {
  border: 2px solid #e2a76f33;
  border-radius: var(--border-radius);
  background-clip: padding-box;
}
section {
  border-width: 2px 2px 6px 2px;
  border-bottom: 6px double var(--accent);
}
section:nth-child(even) {
  border-bottom: 2px solid #e2a76f33;
  border-top: 6px double var(--accent);
}

/* Retro divider */
hr {
  border: none;
  border-top: 4px double var(--accent);
  margin: 32px 0;
}

/* Retro badge */
.badge {
  display: inline-block;
  background: var(--vintage-red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95em;
  border-radius: 12px;
  padding: 3px 12px;
  margin-left: 8px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px #b94e4822;
}

/* --------------------
   FORMS (if any)
--------------------- */
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 2px solid var(--accent-light);
  border-radius: var(--border-radius-sm);
  background: var(--secondary);
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  outline: none;
}
label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
}

/* --------------------
   COOKIE CONSENT BANNER
--------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--vintage-bg);
  color: var(--primary);
  border-top: 4px double var(--accent);
  box-shadow: 0 -2px 16px rgba(32,64,106,0.10);
  z-index: 99999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px 16px;
  font-size: 1rem;
  animation: cookie-slide-in 0.7s cubic-bezier(.7,0,.3,1);
}
@keyframes cookie-slide-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  margin: 0;
  flex: 1 1 0;
  font-size: 1rem;
}
.cookie-banner .cookie-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-left: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(184,134,27,0.10);
}
.cookie-banner .cookie-btn:hover,
.cookie-banner .cookie-btn:focus {
  background: var(--accent-light);
  color: var(--primary);
}
.cookie-banner .cookie-btn.reject {
  background: var(--vintage-red);
  color: var(--white);
}
.cookie-banner .cookie-btn.reject:hover,
.cookie-banner .cookie-btn.reject:focus {
  background: #a13c38;
  color: var(--white);
}
.cookie-banner .cookie-btn.settings {
  background: var(--vintage-green);
  color: var(--white);
}
.cookie-banner .cookie-btn.settings:hover,
.cookie-banner .cookie-btn.settings:focus {
  background: #40605f;
  color: var(--white);
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.98rem;
    padding: 18px 8px;
  }
  .cookie-banner .cookie-btn {
    margin-left: 0;
    margin-top: 6px;
  }
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(32,64,106,0.18);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(32,64,106,0.18);
  padding: 36px 28px 28px 28px;
  max-width: 420px;
  width: 90vw;
  position: relative;
  animation: modal-slide-in 0.4s cubic-bezier(.7,0,.3,1);
}
@keyframes modal-slide-in {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-modal h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 18px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cookie-modal .cookie-category label {
  font-size: 1rem;
  color: var(--primary);
  font-family: var(--font-display);
  margin-bottom: 0;
}
.cookie-modal .cookie-toggle {
  width: 38px;
  height: 22px;
  background: var(--secondary);
  border-radius: 12px;
  position: relative;
  border: 2px solid var(--accent-light);
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}
.cookie-modal .cookie-toggle input {
  display: none;
}
.cookie-modal .cookie-toggle .slider {
  position: absolute;
  left: 2px; top: 2px;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  transition: left 0.2s, background 0.2s;
}
.cookie-modal .cookie-toggle input:checked + .slider {
  left: 18px;
  background: var(--vintage-green);
}
.cookie-modal .cookie-category.essential label {
  color: var(--vintage-brown);
  font-weight: 700;
}
.cookie-modal .cookie-category.essential .cookie-toggle {
  opacity: 0.6;
  pointer-events: none;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  justify-content: flex-end;
}
.cookie-modal .cookie-btn {
  min-width: 120px;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}
.cookie-modal .cookie-modal-close:hover,
.cookie-modal .cookie-modal-close:focus {
  color: var(--accent);
}

/* --------------------
   MISC
--------------------- */
::-webkit-scrollbar {
  width: 10px;
  background: var(--vintage-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 8px;
}

/* Hide outline for mouse, show for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* --------------------
   PRINT
--------------------- */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  section { box-shadow: none; border: none; }
}
