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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(95vw, 1200px);
    height: min(95vw, 1200px);
    background: url('../images/logo.png') center center / contain no-repeat;
    opacity: 0.34;
    pointer-events: none;
    z-index: -1;
    animation: bgLogoDrift 60s ease-in-out infinite;
    transform-origin: center center;
    will-change: transform;
}

@keyframes bgLogoDrift {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    15% {
        transform: translate(-52%, -56%) scale(1.05) rotate(0.4deg);
    }
    30% {
        transform: translate(-48%, -60%) scale(1.08) rotate(-0.3deg);
    }
    45% {
        transform: translate(-51%, -55%) scale(1.06) rotate(0.5deg);
    }
    60% {
        transform: translate(-49%, -58%) scale(1.1) rotate(-0.4deg);
    }
    75% {
        transform: translate(-50%, -54%) scale(1.04) rotate(0.2deg);
    }
    90% {
        transform: translate(-50%, -52%) scale(1.02) rotate(-0.2deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }
}

html {
    background: #f5f5f5;
}

body {
    background: transparent !important;
}

header {
    position: relative;
    z-index: 50;
}

/* main doit rester au-dessus du footer : les modales (overlay z-index élevé)
   vivent à l'intérieur de <main> ; si footer partage le même z-index, il se
   peint par-dessus la modale (footer qui chevauche les pop-ups). */
main {
    position: relative;
    z-index: 2;
}
footer {
    position: relative;
    z-index: 1;
}

/* Rendre les sections semi-transparentes pour laisser voir le filigrane */
.features {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(2px);
}

.stats-section {
    background: rgba(248, 249, 250, 0.7) !important;
    backdrop-filter: blur(2px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header — styles dans includes/header.php (site-header-main) */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(-5deg) scale(1.05);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.hero-logo {
    display: block;
    max-width: 220px;
    width: 60%;
    height: auto;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4));
    animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.footer-logo {
    display: block;
    height: 60px;
    width: auto;
    margin: 0 auto 12px;
    opacity: 0.9;
}

/* Navigation — styles gérés dans includes/header.php (site-header-main) */

/* Main */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section — même style que le header */
.hero {
    background: #1a1a2e;
    color: white;
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Effet de lumière subtil en arrière-plan */
.hero::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(102,126,234,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1,
.hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero h1 span,
.hero h2 span {
    background: linear-gradient(135deg, #667eea, #a0b0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.2rem;
    color: rgba(255,255,255,0.7);
}

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

.btn-hero-login {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.85);
    transition: all 0.2s ease;
    background: transparent;
}
.btn-hero-login:hover {
    border-color: rgba(255,255,255,0.7);
    color: white;
    background: rgba(255,255,255,0.08);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #644090;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
    transform: translateY(-2px);
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background: #ccc;
    transform: none;
}

.btn-block {
    width: 100%;
}

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

/* Features */
.features {
    padding: 4rem 0;
    background: white;
}

.features h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Section Diffuser mon contenu */
.promote-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #eef0ff 100%);
}

.promote-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.promote-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.6rem;
}
.promote-header p {
    color: #666;
    font-size: 1.05rem;
}

.promote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.promote-card {
    background: white;
    border-radius: 14px;
    padding: 28px 24px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-top: 3px solid #e0e3ff;
}
.promote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(102,126,234,0.15);
}
.promote-card-featured {
    border-top-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,0.18);
}

.promote-badge-top {
    position: absolute;
    top: -1px; right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.promote-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.promote-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.promote-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.promote-features {
    list-style: none;
    padding: 0;
    margin: 4px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.promote-features li {
    font-size: 0.85rem;
    color: #555;
    padding-left: 18px;
    position: relative;
}
.promote-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 700;
}

.btn-promote {
    display: block;
    text-align: center;
    background: #f0f2ff;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 4px;
}
.btn-promote:hover {
    background: #667eea;
    color: white;
}
.btn-promote-featured {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}
.btn-promote-featured:hover {
    opacity: 0.88;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.promote-pricing-note {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.88rem;
    color: #888;
    background: white;
    padding: 12px 24px;
    border-radius: 30px;
    display: inline-block;
    width: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}
.promote-pricing-note span { color: #ffd700; }

@media (max-width: 768px) {
    .promote-grid { grid-template-columns: 1fr 1fr; }
    .promote-pricing-note { white-space: normal; left: 0; transform: none; }
}
@media (max-width: 500px) {
    .promote-grid { grid-template-columns: 1fr; }
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.stats-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

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

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

/* Dashboard */
.dashboard h2 {
    margin-bottom: 1rem;
}

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

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-box h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.quick-actions {
    margin-top: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
}

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

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

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

.action-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.action-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.auth-card h1,
.auth-card h2 {
    margin-bottom: 0.5rem;
    color: #667eea;
    font-size: 1.8rem;
}

.auth-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group.checkbox input {
    width: auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* Surf Page */
.surf-page h2 {
    margin-bottom: 1rem;
}

.surf-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.surf-timer {
    text-align: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
}

.site-info h3 {
    margin-bottom: 0.5rem;
}

.site-url {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.site-points {
    font-size: 1.1rem;
}

.surf-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.surf-frame {
    margin: 1.5rem 0;
}

.surf-frame iframe {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.surf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 700;
    color: #667eea;
}

.no-sites {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
}

.no-sites h3 {
    margin-bottom: 1rem;
}

/* Websites Page */
.websites-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.add-site-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.add-site-form h3 {
    margin-bottom: 1.5rem;
}

.site-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.site-info p {
    margin-bottom: 0.5rem;
}

.sites-list {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sites-list h3 {
    margin-bottom: 1.5rem;
}

.sites-grid {
    display: grid;
    gap: 1.5rem;
}

.site-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

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

.site-header h4 {
    margin: 0;
}

.site-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.site-status.active {
    background: #d4edda;
    color: #155724;
}

.site-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.site-status.banned {
    background: #ff6b6b;
    color: white;
    border: 1px solid #e74c3c;
}

.site-details p {
    margin-bottom: 0.5rem;
    color: #666;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.no-sites {
    text-align: center;
    color: #666;
}

/* Profile Page */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.profile-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-info h3 {
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.info-item label {
    font-weight: 500;
    color: #666;
}

.info-item span {
    font-weight: 600;
}

.profile-forms {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section h3 {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero h1,
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .websites-layout,
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .surf-info {
        grid-template-columns: 1fr;
    }
    
    .surf-frame iframe {
        height: 300px;
    }
}

/* ==================== STYLES ADMIN COMMUNS ==================== */
.admin-page { padding: 30px 0 60px; }

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-header-row h2 { margin: 0; color: #333; font-size: 1.6rem; }

.admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
}
.admin-card h3 { margin: 0 0 20px; color: #333; font-size: 1.15rem; border-bottom: 1px solid #eee; padding-bottom: 10px; }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; color: #555; margin-bottom: 6px; }
.form-group label small { font-weight: 400; color: #999; }
.form-control {
    width: 100%; padding: 9px 12px;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.95rem; box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
textarea.form-control { resize: vertical; line-height: 1.6; }

.table-responsive { overflow-x: auto; }
.admin-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th {
    background: #f0f2ff; color: #333;
    padding: 10px 14px; text-align: left;
    font-weight: 600; white-space: nowrap;
    border-bottom: 2px solid #ddd;
}
.admin-table td {
    padding: 10px 14px; border-bottom: 1px solid #f0f0f0;
    vertical-align: middle; color: #444;
}
.admin-table tr:hover td { background: #fafbff; }

.actions-cell { white-space: nowrap; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.btn-sm {
    padding: 4px 10px; border-radius: 6px; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; border: none;
    text-decoration: none; display: inline-block;
    transition: opacity 0.2s;
}
.btn-sm:hover { opacity: 0.82; }
.btn-edit   { background: #e8f0fe; color: #1a73e8; }
.btn-toggle { background: #fff3e0; color: #e65100; }
.btn-delete { background: #fce8e6; color: #c62828; }

.status-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 0.78rem; font-weight: 700;
}
.status-badge.active   { background: #e8f5e9; color: #2e7d32; }
.status-badge.inactive { background: #fce8e6; color: #c62828; }
.status-badge.pending  { background: #fff8e1; color: #f57f17; }

.link-preview { color: #667eea; text-decoration: none; font-size: 0.85rem; }
.link-preview:hover { text-decoration: underline; }

.text-muted { color: #999; font-style: italic; }

.pending-section { border-left: 4px solid #f57f17; }
.pending-section h3 { color: #e65100; }
.badge-count {
    display: inline-block; background: #f57f17; color: white;
    font-size: 0.72rem; font-weight: 700; padding: 2px 8px;
    border-radius: 20px; margin-left: 8px; vertical-align: middle;
}
.row-pending { background: #fffde7 !important; }
.premium-mini {
    display: inline-block; background: #ffd700; color: #333;
    font-size: 0.65rem; font-weight: 700; padding: 1px 5px;
    border-radius: 4px; vertical-align: middle;
}
.status-badge.rejected { background: #fce8e6; color: #c62828; }

@media (max-width: 768px) {
    .admin-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .form-row { flex-direction: column; }
    .actions-cell { flex-wrap: wrap; }
}

/* ============================================================
   Tableaux : défilement horizontal sur mobile au lieu de pousser
   toute la page en largeur. Couvre les pages membres (.container)
   et l'admin (.admin-page), classés ou non. Les e-mails n'incluent
   pas cette feuille de style : aucun impact sur eux.
   ============================================================ */
@media (max-width: 768px) {
    .container table,
    .admin-page table,
    table.admin-table,
    table.stats-table,
    table.arch-table,
    table.log-table,
    table.table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   En-tête du site (déplacé depuis includes/header.php pour mise en cache)
   ============================================================ */
/* ===== HEADER SITE ===== */
.site-header-main {
    background: #1a1a2e;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.site-header-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 56px;
    gap: 12px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
    padding: 8px 0;
}
.site-logo img { height: 34px; width: auto; }
.site-logo-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.premium-badge-header {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: stretch;
    flex: 1;
    gap: 0;
}
.snav-item {
    position: relative;
    display: flex;
    align-items: center;
}
.snav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 13px;
    height: 100%;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    box-sizing: border-box;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
}
.snav-link:hover { color: white; background: rgba(255,255,255,0.07); }
.snav-link.active { color: white; border-bottom-color: #667eea; background: rgba(102,126,234,0.12); }

.snav-chevron { font-size: 0.55rem; opacity: 0.7; display: inline-block; }

/* Dropdowns */
.snav-drop {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 2px solid #667eea;
    border-radius: 0 0 10px 10px;
    min-width: 210px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 300;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    pointer-events: none;
}
.snav-item.has-drop:hover .snav-drop,
.snav-item.has-drop.open .snav-drop {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.snav-drop a {
    display: block;
    padding: 10px 16px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.86rem;
    transition: background 0.12s, color 0.12s;
}
.snav-drop a:hover { background: rgba(102,126,234,0.2); color: white; }
.snav-drop a.active { color: #a0b0ff; background: rgba(102,126,234,0.15); }
.snav-drop hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 4px 0; }

/* Droite */
.site-header-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 8px 0;
}

.header-points-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(102,126,234,0.2);
    border: 1px solid rgba(102,126,234,0.4);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s;
}
.header-points-pill:hover { background: rgba(102,126,234,0.35); }
.pts-val  { color: #a0b0ff; font-weight: 800; font-size: 0.9rem; }
.pts-label{ color: rgba(255,255,255,0.5); font-size: 0.72rem; }

.btn-header-buy {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 700;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.btn-header-buy:hover { opacity: 0.88; }

.btn-header-admin {
    background: rgba(255,107,107,0.2);
    color: #ff9898;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-header-admin:hover { background: rgba(255,80,80,0.35); color: white; }

.btn-header-logout {
    color: rgba(255,255,255,0.5);
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn-header-logout:hover { color: #ff9898; background: rgba(255,80,80,0.15); }

.btn-header-login {
    color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s, background 0.15s;
}
.btn-header-login:hover { color: white; background: rgba(255,255,255,0.08); }

/* Hamburger mobile */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Mobile */
@media (max-width: 900px) {
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px; left: 0; right: 0;
        background: #1a1a2e;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding: 12px 0;
        z-index: 100;
        align-items: stretch;
        gap: 0;
    }
    .site-nav.open .snav-item { width: 100%; flex-direction: column; align-items: stretch; }
    .site-nav.open .snav-link { padding: 12px 20px; border-bottom: none; border-left: 3px solid transparent; justify-content: space-between; }
    .site-nav.open .snav-link.active { border-left-color: #667eea; }
    /* Sous-menus repliés par défaut sur mobile : on déplie au clic (accordéon) */
    .site-nav.open .snav-drop {
        position: static; transform: none !important;
        visibility: visible; opacity: 1; pointer-events: auto;
        box-shadow: none; border: none; border-radius: 0;
        background: rgba(255,255,255,0.04);
        margin-left: 16px;
        display: none;
    }
    .site-nav.open .snav-item.has-drop.open .snav-drop { display: block; padding: 4px 0; }
    .site-nav.open .snav-item.has-drop.open .snav-chevron { transform: rotate(180deg); }
    .snav-chevron { transition: transform 0.2s; }
    .site-header-main { position: relative; }
    .site-header-inner { position: relative; flex-wrap: wrap; }
    .hamburger { display: flex; }
    .btn-header-logout, .header-points-pill { display: none; }
}

/* ============================================================
   Pied de page (déplacé depuis includes/footer.php pour mise en cache)
   ============================================================ */
    /* === Rubrique "Ils nous font confiance" === */
    .trust-section {
        background: #fafbff;
        border-top: 1px solid #eceef5;
        border-bottom: 1px solid #eceef5;
        padding: 28px 0;
    }

    .trust-title {
        text-align: center;
        margin: 0 0 20px 0;
        font-size: 1.1em;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #8a90a2;
    }

    .trust-carousel {
        position: relative;
        overflow: hidden;
        width: 100%;
        /* Dégradé sur les bords pour un fondu propre */
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
                mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    }

    /* Le défilement est piloté en JavaScript (requestAnimationFrame) plutôt
       qu'en animation CSS : c'est insensible au figement du compositeur Blink
       (Chrome/Edge) et au réglage « effets d'animation » de Windows. */
    .trust-track {
        display: flex;
        width: max-content;
        align-items: center;
        gap: 90px;
        will-change: transform;
    }

    .trust-item {
        flex: 0 0 auto;
    }

    .trust-item img {
        height: 110px;
        width: auto;
        max-width: 260px;
        object-fit: contain;
        display: block;
        filter: grayscale(100%);
        opacity: 0.65;
        transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .trust-item img:hover {
        filter: grayscale(0%);
        opacity: 1;
        transform: scale(1.05);
    }

    @media (max-width: 768px) {
        .trust-track { gap: 50px; }
        .trust-item img { height: 70px; max-width: 180px; }
    }

    .trust-reward {
        text-align: center;
        color: #777;
        font-size: 0.85em;
        margin: -8px 0 18px;
    }
    .trust-reward strong { color: #28a745; }

    .trust-empty {
        text-align: center;
        color: #aaa;
        font-style: italic;
        margin: 0 0 12px;
    }

    .trust-cta {
        text-align: center;
        margin-top: 14px;
    }
    .trust-cta a {
        display: inline-block;
        font-size: 0.85em;
        font-weight: 600;
        color: #667eea;
        text-decoration: none;
        padding: 5px 14px;
        border: 1px solid #d6dbf5;
        border-radius: 20px;
        transition: background 0.15s, color 0.15s;
    }
    .trust-cta a:hover { background: #667eea; color: #fff; }

    .footer-links {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-bottom: 15px;
    }

    .footer-links a {
        color: #007bff;
        text-decoration: none;
    }

    .footer-links a:hover {
        text-decoration: underline;
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-bottom: 15px;
    }

    .social-links a {
        color: #007bff;
        text-decoration: none;
    }

    .social-links a:hover {
        text-decoration: underline;
    }

    .social-icon {
        width: 24px;
        height: 24px;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .social-links a:hover .social-icon {
        transform: scale(1.1);
        color: #0056b3;
    }
