/* ==================== RESET & BASE ==================== */


:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --bg-light: #ecf0f1;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #dfe6e9;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-light);
    min-height: 100vh;
}

/* ==================== HEADER ==================== */
.site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 2rem 1rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    text-align: center;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.site-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-top: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

/* ==================== NAVIGATION ==================== */
.main-nav {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    background: var(--bg-light);
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

/* ==================== MAIN WRAPPER ==================== */
.main-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.widget-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.top-sites {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-site-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition);
}

.top-site-item:hover {
    background: #e8f4f8;
    transform: translateX(5px);
}

.rank {
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.top-site-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    flex: 1;
}

.top-site-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);
}

.top-site-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.payment-img {
    width: 100%;
    border-radius: 8px;
}

.ad-widget {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==================== FLASH NEWS ==================== */
.flash-news {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flash-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.flash-content {
    flex: 1;
    overflow: hidden;
}

.flash-item {
    font-weight: 500;
    padding: 0 2rem;
}

/* ==================== AD SECTIONS ==================== */
.ad-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-block {
    width: 100%;
}

/* ==================== FEATURED SITES ==================== */
.featured-sites {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-icon {
    font-size: 2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.featured-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.featured-item img {
    width: 70px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.featured-name {
    font-size: 0.8rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
}

/* ==================== RANKING TABLE ==================== */
.ranking-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.ranking-table-wrapper {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ranking-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.ranking-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.ranking-table tbody tr:hover {
    background: #f8f9fa;
}

.ranking-table tbody tr.top-three {
    background: linear-gradient(90deg, #fff3cd 0%, #ffffff 100%);
}

.ranking-table td {
    padding: 1rem;
}

.rank-col {
    width: 80px;
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
}

.top-three .rank-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 8px rgba(245, 87, 108, 0.4);
}

.site-col {
    width: 50%;
}

.site-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.site-details {
    flex: 1;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.site-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.stats-col {
    width: 100px;
    text-align: center;
}

.stat-value {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.stat-value.in {
    background: #d4edda;
    color: #155724;
}

.stat-value.out {
    background: #cce5ff;
    color: #004085;
}

.action-col {
    width: 120px;
    text-align: center;
}

.visit-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.visit-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .ranking-table {
        font-size: 0.85rem;
    }
    
    .site-logo {
        width: 60px;
        height: 40px;
    }
    
    .main-wrapper {
        padding: 1rem;
        gap: 1rem;
    }
}
/* ============================================
   CPLEMAIRE — Annuaire Hippique
   style.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ---------- Reset & variables ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --vert-fonce:  #1a4a2e;
    --vert-moyen: #2d7a4f;
    --vert-clair:  #4caf78;
    --or:          #c8963c;
    --or-clair:    #f0c96a;
    --brun:        #5c3a1e;
    --creme:       #faf7f0;
    --creme-bord:  #e8dfc8;
    --blanc:       #ffffff;
    --texte:       #2c2410;
    --texte-sec:   #5a4e38;
    --ombre:       0 2px 12px rgba(0,0,0,.12);
    --radius:      6px;
    --font-titre:  'Playfair Display', Georgia, serif;
    --font-corps:  'Source Sans 3', 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */
body {
    background-color: #f0ebe0;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,150,60,.08) 0%, transparent 70%);
    color: var(--texte);
    font-family: var(--font-corps);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
}

a {
    color: var(--vert-moyen);
    text-decoration: none;
    transition: color .2s;
}
a:hover { color: var(--or); }

/* ---------- Conteneur principal ---------- */
#conteneur {
    width: 1020px;
    margin: 0 auto;
    padding: 0 10px 40px;
}

/* ---------- Header ---------- */
header {
    width: 1000px;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: var(--ombre);
    margin-bottom: 0;
    position: relative;
}

header img {
    display: block;
    width: 100% !important;
    height: 150px !important;
    object-fit: cover;
}

header::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vert-fonce), var(--or), var(--vert-fonce));
}

/* ---------- Barre de navigation (espace sous header) ---------- */
/* Le div spacer inline reste tel quel, on le neutralise visuellement */

/* ---------- Mise en page 2 colonnes ---------- */
#bloc_left,
#main {
    float: left;
    vertical-align: top;
}

#bloc_left {
    width: 270px !important;
    background: var(--blanc);
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--ombre);
    min-height: 600px;
}

#main {
    width: 700px;
    margin-left: 20px;
    background: var(--blanc);
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--ombre);
    min-height: 600px;
}

/* Clearfix sur le conteneur */
#conteneur::after {
    content: '';
    display: table;
    clear: both;
}

/* ---------- Menu nav ---------- */
#bloc_left ul {
    list-style: none;
    margin-bottom: 22px;
}

#bloc_left ul li {
    border-bottom: 1px solid var(--creme-bord);
}
#bloc_left ul li:first-child {
    border-top: 1px solid var(--creme-bord);
}

#bloc_left ul li a {
    display: block;
    padding: 9px 12px;
    font-family: var(--font-corps);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--texte);
    letter-spacing: .3px;
    text-transform: uppercase;
    border-left: 3px solid transparent;
    transition: all .2s;
}

#bloc_left ul li a:hover,
#bloc_left ul li a.current {
    color: var(--vert-moyen);
    border-left-color: var(--vert-moyen);
    background: #f3faf6;
    padding-left: 16px;
}

/* ---------- Blocs encadrés sidebar (.fj) ---------- */
.fj {
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    padding: 14px 12px;
    margin-bottom: 18px;
    background: var(--creme);
}

.fj h3 {
    font-family: var(--font-titre);
    font-size: 13px;
    font-weight: 700;
    color: var(--vert-fonce);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--or);
}

/* Tableau TOP 5 */
.fj table {
    width: 100% !important;
    border-collapse: collapse;
}

.fj table tr {
    transition: background .15s;
}
.fj table tr:hover { background: rgba(45,122,79,.06); }

.fj table td {
    padding: 5px 4px;
    font-size: 13px;
    color: var(--texte-sec);
    vertical-align: middle;
}

.fj table td:first-child {
    width: 22px;
    font-weight: 700;
    color: var(--or);
    font-family: var(--font-titre);
    font-size: 14px;
}

.fj table td a {
    font-size: 12.5px;
    color: var(--texte);
}
.fj table td a:hover { color: var(--vert-moyen); }

.fj table img {
    border-radius: 3px;
    border: 1px solid var(--creme-bord);
    object-fit: contain;
}

/* Image paiement */
.fj img[src*="paiement"] {
    display: block;
    max-width: 100%;
    margin-top: 4px;
}

/* ---------- Blocs pub sidebar (.moi1) ---------- */
.moi1 {
    background: var(--creme);
    border: 1px dashed var(--creme-bord);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
}

/* ---------- Zone contenu principal (#main) ---------- */
#main h1, #main h2 {
    font-family: var(--font-titre);
    color: var(--vert-fonce);
    margin-bottom: 16px;
}

#main h1 {
    font-size: 22px;
    border-bottom: 2px solid var(--or);
    padding-bottom: 8px;
}

#main h2 { font-size: 18px; }

#main p {
    margin-bottom: 14px;
    color: var(--texte-sec);
}

/* Tableaux dans main */
#main table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

#main table th {
    background: var(--vert-fonce);
    color: var(--blanc);
    padding: 9px 12px;
    text-align: left;
    font-family: var(--font-corps);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .3px;
}

#main table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--creme-bord);
    color: var(--texte-sec);
}

#main table tr:hover td { background: #f6faf7; }

/* Formulaires dans main */
#main form {
    max-width: 560px;
}

#main label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--texte);
    margin-bottom: 5px;
    margin-top: 14px;
}

#main input[type="text"],
#main input[type="email"],
#main input[type="url"],
#main textarea,
#main select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    font-family: var(--font-corps);
    font-size: 14px;
    color: var(--texte);
    background: var(--creme);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

#main input[type="text"]:focus,
#main input[type="email"]:focus,
#main input[type="url"]:focus,
#main textarea:focus,
#main select:focus {
    border-color: var(--vert-moyen);
    box-shadow: 0 0 0 3px rgba(45,122,79,.12);
    background: var(--blanc);
}

#main textarea { resize: vertical; min-height: 110px; }

#main input[type="submit"],
#main button[type="submit"] {
    margin-top: 18px;
    padding: 10px 28px;
    background: var(--vert-fonce);
    color: var(--blanc);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-corps);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .4px;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

#main input[type="submit"]:hover,
#main button[type="submit"]:hover {
    background: var(--vert-moyen);
    transform: translateY(-1px);
}

/* Messages de retour */
.msg-ok {
    background: #eaf6ee;
    border-left: 4px solid var(--vert-clair);
    color: var(--vert-fonce);
    padding: 10px 14px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 16px;
    font-size: 14px;
}

.msg-err {
    background: #fdf0ef;
    border-left: 4px solid #c0392b;
    color: #7b2218;
    padding: 10px 14px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--texte-sec);
    transition: all .2s;
}

.pagination a:hover,
.pagination span.active {
    background: var(--vert-fonce);
    color: var(--blanc);
    border-color: var(--vert-fonce);
}

/* ---------- Cartes annuaire ---------- */
.site-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--creme-bord);
}

.site-card:last-child { border-bottom: none; }

.site-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--creme-bord);
    border-radius: var(--radius);
    background: var(--creme);
    flex-shrink: 0;
}

.site-card h4 {
    font-family: var(--font-titre);
    font-size: 15px;
    color: var(--vert-fonce);
    margin-bottom: 4px;
}

.site-card p {
    font-size: 13px;
    color: var(--texte-sec);
    margin-bottom: 6px;
}

.site-card .badge {
    display: inline-block;
    background: var(--vert-fonce);
    color: var(--blanc);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .3px;
}

/* ---------- Scrollbar discrète ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--creme-bord); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--or); }