/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --danger-color: #dc2626;
    --success-color: #059669;

    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;

    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;

    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --border-radius: 8px;
    --border-radius-lg: 12px;

    --max-width: 1200px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Prévenir débordement texte */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* === HEADER === */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

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

.logo-text strong {
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* === ALERT BANNER === */
.alert-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #fbbf24;
    padding: 0.75rem 0;
}

.alert-banner .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-text {
    color: #92400e;
    font-weight: 500;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero-title {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* === QUICK INFO === */
.quick-info {
    padding: 4rem 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

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

.info-card.urgent {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.info-card p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.info-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.info-link:hover {
    gap: 0.5rem;
}

/* === CONTENT SECTION === */
.content-section {
    padding: 4rem 0;
    background: var(--bg-gray-50);
}

.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    max-width: 100%;
    overflow-wrap: break-word;
}

.content-main h2 {
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content-main h3 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-main p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.content-main ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-main li {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.highlight-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
}

.highlight-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* === TABLE === */
.comparison-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
}

thead {
    background: var(--primary-color);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--bg-gray-50);
}

/* === SIDEBAR === */
.sidebar-box {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-box h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.sidebar-box p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-box li:last-child {
    border-bottom: none;
}

.sidebar-box a {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.sidebar-box a:hover {
    color: var(--primary-color);
}

.sidebar-box.cta {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary-color);
}

/* === CTA SECTION === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
}

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

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form button {
    white-space: nowrap;
}

.newsletter-disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* === FOOTER === */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-col p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* === RESPONSIVE === */

/* Tablettes et écrans moyens */
@media (max-width: 968px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .nav {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .content-main {
        padding: 2rem 1.5rem;
    }
}

/* Tablettes portrait et grands mobiles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Header */
    .header {
        padding: 0.75rem 0;
    }

    .logo a {
        font-size: 1.1rem;
    }

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

    .nav {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 0.4rem 0;
    }

    /* Hero */
    .hero {
        padding: 2.5rem 0;
    }

    .hero-content {
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    /* Sections */
    .quick-info,
    .content-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-icon {
        font-size: 2.5rem;
    }

    /* Content */
    .content-main {
        padding: 1.5rem;
    }

    .content-main h2 {
        font-size: 1.5rem;
    }

    .content-main h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }

    /* Tableaux responsive */
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem;
        min-width: 600px;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 0 1rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    /* Typographie */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    /* CTA */
    .cta-section {
        padding: 3rem 0;
    }
}

/* Mobiles */
@media (max-width: 640px) {
    /* Prévenir tout débordement */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    /* Header - Menu mobile */
    .header .container {
        flex-wrap: wrap;
        position: relative;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }

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

    /* Alert banner */
    .alert-banner .container {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .alert-icon {
        font-size: 1rem;
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.85rem 1.25rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

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

    /* Sections */
    .quick-info,
    .content-section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .info-card {
        padding: 1.25rem;
    }

    .info-card h3,
    .info-card h4 {
        font-size: 1.1rem;
    }

    /* Content */
    .content-main {
        padding: 1rem;
        border-radius: var(--border-radius);
        max-width: 100%;
        overflow-x: hidden;
    }

    .content-main h2 {
        font-size: 1.3rem;
        padding-bottom: 0.4rem;
        word-break: break-word;
        hyphens: auto;
    }

    .content-main h3 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
        word-break: break-word;
        hyphens: auto;
    }

    .content-main h4 {
        font-size: 0.95rem;
        word-break: break-word;
    }

    .content-main p,
    .content-main li {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .highlight-box {
        padding: 1rem;
        margin: 1.25rem 0;
    }

    /* Sidebar */
    .sidebar-box {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    /* Tableaux - scroll horizontal avec indicateur */
    .comparison-table {
        position: relative;
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
    }

    table {
        font-size: 0.8rem;
        min-width: 500px;
    }

    th, td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 2.5rem 0;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .footer-col ul {
        padding: 0;
    }

    /* Typographie globale */
    body {
        font-size: 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.15rem; }
    h4 { font-size: 1rem; }
}

/* Très petits mobiles */
@media (max-width: 400px) {
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 10px;
        max-width: 100vw;
    }

    .hero-title {
        font-size: 1.4rem;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 0.85rem;
    }

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

    .stat-label {
        font-size: 0.8rem;
    }

    .info-card {
        padding: 1rem;
    }

    .info-icon {
        font-size: 2rem;
    }

    .content-main {
        padding: 0.85rem;
        max-width: 100%;
    }

    .content-main h2 {
        font-size: 1.2rem;
    }

    .content-main h3 {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.7rem 0.9rem;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.35rem;
    }
}