/* ==========================================================================
   Bloc Text Editor - Styles CSS
   ========================================================================== */

/* Conteneur principal */
.bloc-text-editor {
    position: relative;
    width: 100%;
}

/* Conteneurs selon la largeur */
.bloc-text-editor .container-editeur {
    margin: 0 auto;
    padding: 0 20px;
}

/* Largeurs de contenu */
.bloc-text-editor.largeur-normale .container-editeur {
    max-width: 1200px;
}

.bloc-text-editor.largeur-large .container-editeur {
    max-width: 1400px;
}

.bloc-text-editor.pleine-largeur .container-editeur {
    max-width: none;
    padding: 0 40px;
}

/* ==========================================================================
   Styles pour le contenu généré par l'éditeur WordPress
   ========================================================================== */

/* Styles pour la classe .teditor ajoutée dans le PHP */
.teditor .contenu-editeur .container,
.contenu-editeur .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Roboto', sans-serif;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Header */
.contenu-editeur .header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 3px solid #ff5722;
}

.contenu-editeur .header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.contenu-editeur .site-name {
    font-size: 1.2rem;
    color: #ff5722;
    font-weight: 600;
}

/* Sections */
.contenu-editeur .section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.contenu-editeur .section:last-child {
    border-bottom: none;
}

.contenu-editeur .section h2 {
    font-size: 1.8rem;
    color: #ff5722;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 20px;
}

.contenu-editeur .section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #ff5722;
    border-radius: 2px;
}

/* Encadrés de mise en évidence */
.contenu-editeur .highlight {
    background-color: #fff3e0;
    border-left: 4px solid #ff5722;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.1);
}

.contenu-editeur .highlight p {
    margin: 0;
    font-weight: 500;
    color: #333;
}

/* Liste de définitions */
.contenu-editeur .definition-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.contenu-editeur .definition-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.contenu-editeur .definition-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contenu-editeur .definition-term {
    font-weight: 700;
    color: #ff5722;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.contenu-editeur .definition-item p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Contact info */
.contenu-editeur .contact-info {
    background-color: #e8f5e8;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.contenu-editeur .contact-info p {
    margin-bottom: 10px;
    font-weight: 600;
}

.contenu-editeur .contact-info ul {
    margin: 0;
    padding-left: 25px;
}

.contenu-editeur .contact-info li {
    margin-bottom: 8px;
    color: #333;
}

/* Footer */
.contenu-editeur .footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #ff5722;
    text-align: center;
    color: #666;
}

.contenu-editeur .footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Centrage du contenu */
.bloc-text-editor.contenu-centre .contenu-editeur {
    text-align: center;
    padding: 5%;
}

/* Fond gris */
.bloc-text-editor.fond-gris {
    background-color: #f8f9fa;
}

/* Espacements verticaux */
.bloc-text-editor.espacement-petit {
    padding: 20px 0;
}

.bloc-text-editor.espacement-normal {
    padding: 40px 0;
}

.bloc-text-editor.espacement-grand {
    padding: 80px 0;
}

/* Contenu de l'éditeur */
.contenu-editeur {
    line-height: 1.7;
    font-size: 1rem;
    color: #333;
}

/* Reset des styles par défaut */
.contenu-editeur * {
    max-width: 100%;
}

/* Styles pour les éléments du contenu WYSIWYG */
.contenu-editeur h1,
.contenu-editeur h2,
.contenu-editeur h3,
.contenu-editeur h4,
.contenu-editeur h5,
.contenu-editeur h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
}

.contenu-editeur h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

.contenu-editeur h2 {
    font-size: 2rem;
    border-bottom: 2px solid #ff5722;
    padding-bottom: 0.5rem;
}

.contenu-editeur h3 {
    font-size: 1.5rem;
    color: #ff5722;
}

.contenu-editeur h4 {
    font-size: 1.25rem;
}

.contenu-editeur h5 {
    font-size: 1.1rem;
}

.contenu-editeur h6 {
    font-size: 1rem;
}

.contenu-editeur p {
    margin-bottom: 1.5em;
    line-height: 1.7;
}

.contenu-editeur ul,
.contenu-editeur ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.contenu-editeur li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.contenu-editeur blockquote {
    border-left: 4px solid #ff5722;
    margin: 2em 0;
    padding: 1em 2em;
    background-color: #f8f9fa;
    font-style: italic;
    color: #666;
}

.contenu-editeur blockquote p:last-child {
    margin-bottom: 0;
}

/* Liens */
.contenu-editeur a {
    color: #ff5722;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contenu-editeur a:hover {
    color: #e64a19;
    text-decoration: none;
}

/* Images */
.contenu-editeur img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5em 0;
}

.contenu-editeur .aligncenter {
    display: block;
    margin: 1.5em auto;
}

.contenu-editeur .alignleft {
    float: left;
    margin: 0 1.5em 1.5em 0;
}

.contenu-editeur .alignright {
    float: right;
    margin: 0 0 1.5em 1.5em;
}

/* Tableaux */
.contenu-editeur table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.contenu-editeur table th {
    background-color: #ff5722;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    text-align: left;
}

.contenu-editeur table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.contenu-editeur table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.contenu-editeur table tr:hover {
    background-color: #e8f5e8;
}

/* Code */
.contenu-editeur code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.contenu-editeur pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
}

.contenu-editeur pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Séparateur horizontal */
.contenu-editeur hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #ff5722, transparent);
    margin: 3em 0;
}

/* Message d'administration */
.bloc-vide {
    padding: 2em;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
    text-align: center;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .bloc-text-editor.pleine-largeur .container-editeur {
        padding: 0 20px;
    }
    
    .bloc-text-editor.espacement-grand {
        padding: 40px 0;
    }
    
    .contenu-editeur h1 {
        font-size: 2rem;
    }
    
    .contenu-editeur h2 {
        font-size: 1.7rem;
    }
    
    .contenu-editeur h3 {
        font-size: 1.4rem;
    }
    
    .contenu-editeur .alignleft,
    .contenu-editeur .alignright {
        float: none;
        display: block;
        margin: 1.5em auto;
    }
    
    .contenu-editeur table {
        font-size: 0.9rem;
    }
    
    .contenu-editeur table th,
    .contenu-editeur table td {
        padding: 8px 12px;
    }
}