/* Variables CSS */
:root {
    --primary: #8B1538;
    --primary-dark: #6B0F2A;
    --primary-light: #A01B45;
    --text: #2C3E50;
    --text-light: #7F8C8D;
    --bg: #FFFFFF;
    --bg-light: #F8F9FA;
    --border: #E9ECEF;
    --success: #27AE60;
    --warning: #F39C12;
    --danger: #E74C3C;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Header */
header {
    background: var(--bg);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
    background: transparent;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Bande rouge statique centrée */
.tagline-banner {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
}

.tagline-text {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Navigation Desktop */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s;
    border-radius: 3px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Page Title */
.page-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    margin: 2rem 0;
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.service-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.service-description {
    font-size: 0.875rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.report-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--danger);
    background: rgba(231, 76, 60, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.report-count.low {
    color: var(--success);
    background: rgba(39, 174, 96, 0.1);
}

.report-count.medium {
    color: var(--warning);
    background: rgba(243, 156, 18, 0.1);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
}

.status-indicator.operational {
    background: var(--success);
}

/* Service Header */
.service-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.service-header .service-logo {
    width: 100px;
    height: 100px;
}

.service-title h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.service-title p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.visit-site {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.visit-site:hover {
    background: var(--primary);
    color: white;
}

/* Chart Section */
.chart-section {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.report-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.report-button:hover {
    background: var(--primary-dark);
}

#reportsChart {
    width: 100%;
    max-height: 300px;
}

/* Comments Section */
.comments-section {
    margin: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.comment-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-button:hover {
    background: var(--primary-dark);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.comment-text {
    color: var(--text);
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Publicités */
.ad-space {
    margin: 2rem 0;
    text-align: center;
}

.ad-horizontal,
.ad-vertical {
    background: var(--bg-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.ad-horizontal {
    height: 90px;
}

.ad-vertical {
    height: 250px;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    margin-top: auto;
    padding: 2rem 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

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

.footer-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Messages */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.message.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border: 2px solid var(--danger);
}

/* Test Connexion Page */
.test-widget {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin: 2rem 0;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.widget-content {
    padding: 2rem;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

.info-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Accordéon */
.accordion-section {
    margin: 2rem 0;
}

.accordion-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.accordion-item:hover {
    border-color: var(--primary);
}

.accordion-header {
    background: var(--bg-light);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(139, 21, 56, 0.05);
}

.accordion-item.active .accordion-header {
    background: var(--primary);
    color: white;
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.accordion-body {
    padding: 1.5rem;
    line-height: 1.8;
    color: var(--text);
}

.accordion-body h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.accordion-body p {
    margin-bottom: 1rem;
}

.accordion-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
}

.section-icon {
    display: inline-block;
    font-size: 2rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Speed Levels */
.speed-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.speed-level {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.speed-level.slow {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
}

.speed-level.medium {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--warning);
}

.speed-level.good {
    background: rgba(39, 174, 96, 0.1);
    border-color: var(--success);
}

.speed-level.excellent {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.speed-value {
    font-weight: 600;
    font-family: monospace;
}

.speed-label {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Solutions */
.solutions {
    display: grid;
    gap: 1.5rem;
}

.solution-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.solution-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solution-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.solution-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Tips grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.tip-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tip-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    margin: 0 auto 1rem auto;
}

.tip-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.tip-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Bannière d'alerte */
.alert-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
}

.alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.alert-content h3 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 1rem;
}

.alert-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #856404;
}

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

.alert-tip {
    margin-top: 1rem;
    margin-bottom: 0;
    color: #856404;
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
}

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

.faq-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

.faq-item h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.faq-item p {
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* Call to action box */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 {
    margin-top: 0;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
    font-size: 1.125rem;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem 1rem;
    }

    .logo {
        width: 45px;
        height: 45px;
    }

    .tagline-banner {
        padding: 0.5rem 1rem;
    }

    .tagline-text {
        font-size: 0.875rem;
    }

    .burger-menu {
        display: flex;
    }

    nav {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 72px);
        background: var(--bg);
        box-shadow: -2px 0 10px var(--shadow);
        transition: right 0.3s;
        z-index: 999;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 2rem 0;
        gap: 0;
    }

    nav ul li {
        border-bottom: 1px solid var(--border);
    }

    nav a {
        display: block;
        padding: 1rem 1.5rem;
    }

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

    .service-card {
        padding: 1rem;
    }

    .service-logo {
        width: 50px;
        height: 50px;
    }

    .service-name {
        font-size: 1rem;
    }

    .service-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .service-header .service-logo {
        width: 80px;
        height: 80px;
    }

    .service-title h1 {
        font-size: 1.5rem;
    }

    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .report-button {
        width: 100%;
    }

    .comment-form {
        padding: 1.5rem;
    }

    .comment {
        padding: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .widget-header {
        padding: 1rem;
    }

    .widget-header h2 {
        font-size: 1.25rem;
    }

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

    .widget-content {
        padding: 1.5rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

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

    .accordion-header {
        padding: 1rem;
        font-size: 1rem;
    }

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

    .speed-levels {
        gap: 0.5rem;
    }

    .speed-level {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

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

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

    .alert-banner {
        flex-direction: column;
        padding: 1rem;
    }

    .alert-icon {
        text-align: center;
    }

    .cta-box {
        padding: 1.5rem;
    }

    .cta-box h3 {
        font-size: 1.5rem;
    }

    .cta-box p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .iframe-wrapper {
        min-height: 300px;
    }

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

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

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

    .tip-card {
        padding: 1rem;
    }
}

* Page politique de confidentialité */
.privacy-content {
    background: var(--bg);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.privacy-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.privacy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.privacy-section h2 {
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.privacy-section h3 {
    color: var(--text);
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.privacy-section p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text);
}

.privacy-section ul {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

.privacy-section li {
    margin-bottom: 0.75rem;
    color: var(--text);
}

.privacy-section strong {
    color: var(--primary);
    font-weight: 600;
}

.privacy-section a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

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

/* Mobile politique confidentialité */
@media (max-width: 768px) {
    .privacy-content {
        padding: 1.5rem;
    }

    .privacy-section h2 {
        font-size: 1.5rem;
    }

    .privacy-section h3 {
        font-size: 1.125rem;
    }

    .privacy-section ul {
        margin-left: 1.5rem;
    }
}
