/* ==========================================================================
   Conseil Séduction - CSS Modernisé 2026
   Compatible avec la structure HTML existante
   ========================================================================== */

/* Reset de base */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    background-color: #f5f5f5;
}

/* ==========================================================================
   Structure principale - CENTRAGE
   ========================================================================== */

#wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

#bg {
    background: #fff;
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   Header avec image de fond
   ========================================================================== */

#header {
    background: url('images/header-bg.jpg') center center no-repeat;
    background-size: cover;
    height: 180px;
    position: relative;
}

/* Si pas d'image, afficher un header coloré */
#header:empty::before {
    content: 'Conseil-Seduction.fr';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

#nav1 {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    padding: 0;
}

#nav1 ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#nav1 ul li {
    margin: 0;
}

#nav1 ul li a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

#nav1 ul li a:hover {
    background: #e74c3c;
    text-decoration: none;
}

/* ==========================================================================
   Page et Container
   ========================================================================== */

#page {
    padding: 25px 30px;
    background: #f5f5f5;
}

#container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px 40px;
    overflow: hidden;
}

/* ==========================================================================
   Contenu principal
   ========================================================================== */

#content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
}

#center {
    flex: 1;
    min-width: 0;
    padding-left: 25px;
    padding-right: 20px;
}

/* Gérer les #center imbriqués (structure ancienne) */
#center #center {
    flex: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

#welcome {
    margin-bottom: 20px;
}

/* ==========================================================================
   Typographie
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

h1 {
    font-size: 1.8rem;
    color: #e74c3c;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 10px;
    margin-top: 0;
}

h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    border-left: 4px solid #e74c3c;
    padding-left: 15px;
    margin-top: 30px;
}

h3 {
    font-size: 1.2rem;
    color: #e74c3c;
}

h4 {
    font-size: 1.1rem;
    color: #555;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

strong, b {
    font-weight: 600;
    color: #2c3e50;
}

i, em {
    font-style: italic;
}

u {
    text-decoration-color: #e74c3c;
}

/* ==========================================================================
   Images
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#center img {
    margin: 20px 0;
}

/* Images flottantes */
img[align="left"],
img[style*="float:left"],
img[style*="float: left"] {
    float: left;
    margin: 0 20px 15px 0;
    max-width: 200px;
}

img[align="right"],
img[style*="float:right"],
img[style*="float: right"] {
    float: right;
    margin: 0 0 15px 20px;
    max-width: 200px;
}

/* ==========================================================================
   Tableaux
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

td, th {
    padding: 15px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

/* Table Matrix (pilule bleue/rouge) */
table td img {
    max-width: 250px;
}

table td:last-child {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #00ff00;
    padding: 20px;
}

table td:last-child a {
    color: #00ff00;
}

/* ==========================================================================
   Sidebar (colonne droite)
   ========================================================================== */

#right {
    width: 280px;
    flex-shrink: 0;
}

#sidebar {
    position: sticky;
    top: 20px;
}

#sidebar h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e74c3c;
}

#sidebar h3:first-of-type {
    margin-top: 0;
}

#sidebar p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Menu vertical sidebar */
ul.vmenu,
.vmenu {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

ul.vmenu li,
.vmenu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

ul.vmenu li:last-child,
.vmenu li:last-child {
    border-bottom: none;
}

ul.vmenu li a,
.vmenu li a {
    display: block;
    padding: 10px 5px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

ul.vmenu li a:hover,
.vmenu li a:hover {
    color: #e74c3c;
    padding-left: 12px;
    background: #fafafa;
    text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

#footerWrapper {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    margin-top: 30px;
}

#footer {
    padding: 25px 20px;
    text-align: center;
    color: #fff;
}

#footer p {
    margin: 0;
    font-size: 0.9rem;
}

#footer a {
    color: #fff;
    text-decoration: none;
}

#footer a:hover {
    color: #e74c3c;
}

/* ==========================================================================
   Classes utilitaires
   ========================================================================== */

.clear {
    clear: both;
}

p[style*="clear:both"],
p[style*="clear: both"] {
    clear: both;
    height: 20px !important;
}

/* ==========================================================================
   Vidéos YouTube
   ========================================================================== */

iframe[src*="youtube"] {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Container responsive pour vidéos */
p:has(iframe[src*="youtube"]) {
    position: relative;
    width: 100%;
}

/* ==========================================================================
   Listes
   ========================================================================== */

ul, ol {
    margin: 15px 0;
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    #content {
        flex-direction: column;
    }
    
    #center {
        width: 100%;
        order: 1;
        padding-left: 0;
        padding-right: 0;
    }
    
    #right {
        width: 100%;
        order: 2;
    }
    
    #sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    #wrapper {
        margin: 0;
        box-shadow: none;
    }
    
    #header {
        height: 120px;
    }
    
    #header:empty::before {
        font-size: 1.8rem;
    }
    
    #nav1 ul {
        flex-direction: column;
    }
    
    #nav1 ul li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #page {
        padding: 15px;
    }
    
    #container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Images flottantes sur mobile */
    img[align="left"],
    img[style*="float:left"],
    img[style*="float: left"],
    img[align="right"],
    img[style*="float:right"],
    img[style*="float: right"] {
        float: none;
        display: block;
        max-width: 100%;
        margin: 15px auto;
    }
    
    /* Table Matrix sur mobile */
    table {
        display: block;
    }
    
    table tr {
        display: flex;
        flex-direction: column;
    }
    
    table td {
        display: block;
        width: 100%;
    }
    
    table td img {
        max-width: 200px;
        margin: 0 auto;
        display: block;
    }
    
    /* Sidebar en grille sur tablette */
    #sidebar h3 {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.95rem;
    }
    
    #header {
        height: 100px;
    }
    
    #header:empty::before {
        font-size: 1.5rem;
    }
    
    #page {
        padding: 10px;
    }
    
    #container {
        padding: 15px 12px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.15rem;
        padding-left: 10px;
    }
}

/* ==========================================================================
   Impression
   ========================================================================== */

@media print {
    #nav1,
    #right,
    #sidebar,
    #footerWrapper,
    iframe {
        display: none !important;
    }
    
    #wrapper {
        box-shadow: none;
        max-width: 100%;
    }
    
    #content {
        display: block;
    }
    
    #center {
        width: 100%;
        padding: 0;
    }
    
    a {
        color: #333;
    }
    
    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #666;
    }
}

/* ==========================================================================
   Accessibilité
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Améliorations SEO et performance
   ========================================================================== */

/* Lazy loading fade-in */
img[loading="lazy"] {
    opacity: 1;
}

/* Amélioration du contraste pour accessibilité */
a:visited {
    color: #7b1fa2;
}

/* Style pour les liens externes */
a[target="_blank"]::after {
    content: ' ↗';
    font-size: 0.8em;
}

a[href^="http"]:not([href*="conseil-seduction.fr"])::after {
    content: ' ↗';
    font-size: 0.8em;
}