/* ========================================
   RATIONS CIVILES FRANÇAISES
   Design System & Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --color-navy: #1a2744;
    --color-navy-light: #253553;
    --color-red: #e63946;
    --color-red-dark: #c92d3a;
    --color-cream: #f5f0e6;
    --color-cream-dark: #ebe5d8;
    --color-charcoal: #2d2d2d;
    --color-gray: #6b7280;
    --color-gray-light: #9ca3af;
    --color-white: #ffffff;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-red);
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-navy);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--color-red);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-nav {
    background: var(--color-red);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
}

.btn-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-navy);
}

.header-flag {
    display: flex;
    height: 4px;
}

.header-flag span {
    flex: 1;
}

.flag-blue {
    background: #002654;
}

.flag-white {
    background: #ffffff;
}

.flag-red {
    background: #ed2939;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    color: var(--color-white);
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.nav-links a:hover {
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--transition-fast);
}

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 74px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 50%, var(--color-navy) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 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.03'%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");
    opacity: 0.5;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-text {
    color: var(--color-white);
}

.hero-badge {
    display: inline-block;
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid var(--color-red);
    color: var(--color-red);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero-title .accent {
    color: var(--color-red);
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.85;
    margin-bottom: var(--space-2xl);
    max-width: 480px;
}

.hero-form .form-group {
    display: flex;
    gap: var(--space-sm);
    max-width: 450px;
}

.form-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-red);
}

.form-notice {
    font-size: 0.8125rem;
    opacity: 0.6;
    margin-top: var(--space-sm);
}

.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    backdrop-filter: blur(10px);
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.hero-image-badge {
    position: absolute;
    bottom: 0;
    right: var(--space-xl);
    transform: translateY(50%);
    background: var(--color-red);
    color: var(--color-white);
    font-weight: 600;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-white);
    opacity: 0.6;
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========================================
   FEATURES
   ======================================== */

.features {
    padding: var(--space-4xl) 0;
    background: var(--color-cream);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    background: var(--color-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.feature-title {
    font-size: 1.25rem;
    color: var(--color-navy);
    margin-bottom: var(--space-md);
}

.feature-desc {
    font-size: 0.9375rem;
    color: var(--color-gray);
    line-height: 1.7;
}

/* ========================================
   HERITAGE
   ======================================== */

.heritage {
    padding: var(--space-4xl) 0;
    background: var(--color-navy);
    color: var(--color-white);
}

.heritage-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.heritage-image {
    position: relative;
}

.heritage-image-frame {
    aspect-ratio: 4/3;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.3) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.heritage-image-frame::after {
    content: '🎖️';
    font-size: 8rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.heritage-text .section-tag {
    color: var(--color-red);
}

.heritage-text .section-title {
    color: var(--color-white);
}

.heritage-desc {
    font-size: 1.0625rem;
    opacity: 0.85;
    margin-bottom: var(--space-lg);
    max-width: 500px;
}

.heritage-stats {
    display: flex;
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-red);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   USAGES
   ======================================== */

.usages {
    padding: var(--space-4xl) 0;
    background: var(--color-cream-dark);
}

.usages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.usage-card {
    background: var(--color-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.usage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.usage-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.usage-title {
    font-size: 1.125rem;
    color: var(--color-navy);
    margin-bottom: var(--space-sm);
}

.usage-desc {
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* ========================================
   CTA
   ======================================== */

.cta {
    padding: var(--space-4xl) 0;
    background:
        linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
    color: var(--color-white);
}

.cta-content {
    text-align: center;
    max-width: 600px;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: var(--space-lg);
}

.cta-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-2xl);
}

.cta-form .form-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.cta-form .form-input {
    flex: 1;
}

.cta-form .btn-primary {
    background: var(--color-navy);
}

.cta-form .btn-primary:hover {
    background: var(--color-navy-light);
}

.cta-form .form-notice {
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--color-navy);
    color: var(--color-white);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.footer-tagline {
    font-size: 0.9375rem;
    opacity: 0.7;
    margin-bottom: var(--space-xl);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-links a {
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright {
    font-size: 0.8125rem;
    opacity: 0.5;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-white);
    padding: var(--space-3xl);
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: var(--space-md);
}

.modal-text {
    color: var(--color-gray);
    margin-bottom: var(--space-xl);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .usages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .heritage-content {
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        background: var(--color-navy);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-2xl);
    }

    .hero-form .form-group {
        flex-direction: column;
        max-width: 100%;
    }

    .hero-image {
        order: -1;
    }

    .hero-image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }

    .hero-scroll {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .heritage-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .heritage-image {
        order: -1;
    }

    .heritage-image-frame {
        max-width: 300px;
        margin: 0 auto;
    }

    .heritage-desc {
        margin: 0 auto var(--space-lg);
    }

    .heritage-stats {
        justify-content: center;
    }

    .usages-grid {
        grid-template-columns: 1fr;
    }

    .cta-form .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .heritage-stats {
        gap: var(--space-lg);
    }
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

.lang-switcher {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    background: transparent;
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: var(--color-red);
    color: var(--color-white);
    opacity: 1;
}

/* Mobile language switcher */
@media (max-width: 768px) {
    .lang-switcher {
        margin: var(--space-md) 0;
        justify-content: center;
    }

    .lang-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
    }
}
/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 1px solid var(--accent-color);
    border-radius: 2px; /* Slight rounding but keeping it sharp/military */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 90; /* Below modal (100) but above content */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--accent-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
