/* ============================================================
   FEUILLE DE STYLE PRINCIPALE : main.css
   Projet 4IWPB - Maquette de Presse 
   Étudiante : Nisrine Benhamidi Sayer
============================================================ */
/* ============================================================
   1. VARIABLES CSS ET CONFIGURATION GLOBALE
============================================================ */
:root {
    --primary-color: #002966;
    --primary-dark: #001f4d;
    --dark-color: #111111;
    --light-color: #f8f9fa;
    --text-color: #222222;
    --border-color: #dcdcdc;
    --footer-color: #cccccc;
    --transition-speed: 0.3s;
    --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   2. TYPOGRAPHIE ET COMPOSANTS DE LA CHARTE
============================================================ */
h1, h2, h3, h4, h5, h6, .main-title, .footer-author-name {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

nav a, .navbar-nav .nav-link, .menu-editions a, .article-meta,
.calendar-table, .small-edition-text, footer ul {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
}

.text-blue { color: var(--primary-color); }
.border-blue { border-color: var(--primary-color); }
.bg-blue { background-color: var(--primary-color); color: #ffffff; }
.shadow-sm { box-shadow: var(--shadow-light); }
p { margin-bottom: 1.2rem; }

/* ============================================================
   3. SUPPRESSION DES ARRONDIS (ZÉRO ARRONDI BOOTSTRAP)
============================================================ */
html body .btn, 
html body .form-control, 
html body .form-select, 
html body .badge, 
html body .table, 
html body .card,
html body .dropdown-menu, 
html body .input-group .btn, 
html body .input-group .form-control,
html body .input-group-text, 
html body input, 
html body select, 
html body button, 
html body textarea {
    border-radius: 0;
}

/* ============================================================
   4. HEADER ET NAVIGATION PRINCIPALE
============================================================ */
header { background-color: #ffffff; }
header .main-title { font-size: 3.8rem; letter-spacing: -1px; }
header .small-edition-text span { font-size: 0.75rem; letter-spacing: 1px; }
header .btn-subscribe-header, header .btn-login-header { font-size: 0.7rem; letter-spacing: 0.5px; }
header .menu-editions a { transition: color var(--transition-speed) ease; }
header .menu-editions a:hover { color: var(--primary-color); text-decoration: underline; }

.navbar { background-color: #ffffff; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.navbar-nav .nav-link {
    position: relative;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
    padding-bottom: 4px;
}
.navbar-nav .nav-link:hover { color: var(--primary-dark); }
.navbar-nav .nav-link::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
    background-color: var(--primary-color); transition: width var(--transition-speed) ease;
}
.navbar-nav .nav-link:hover::after { width: 100%; }

/* ============================================================
   5. LIVE BADGE ET COMPOSANTS ANIMÉS
============================================================ */
.badge-live { color: #dc3545; font-weight: bold; letter-spacing: 1px; animation: pulse-live 1.5s infinite; }
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
article { transition: background-color var(--transition-speed) ease; padding: 0.5rem; }
article:hover { background-color: var(--light-color); }
article img { transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease; }
article img:hover { transform: scale(1.02); opacity: 0.92; }

/* ============================================================
   6. PAGE ARTICLE COMPLET ET DÉTAILS
============================================================ */
.article-summary {
    font-style: italic; background-color: var(--light-color);
    border-left: 5px solid var(--primary-color); padding: 1.25rem; font-size: 1.15rem;
}
.article-content { column-gap: 2rem; }
.article-content p { text-align: justify; margin-bottom: 1.5rem; }

/* Lettrine ciblée sur le premier paragraphe pour éviter les bugs en preview */
.article-content > p:first-of-type::first-letter {
    font-size: 2rem; font-weight: bold; color: var(--primary-color);
    float: left; line-height: 1; padding-right: 6px;
}
.article-content h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-meta { font-size: 0.8rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.article-content blockquote {
    border-left: 4px solid var(--primary-color); padding-left: 1rem;
    margin: 2rem 0; font-style: italic; color: #555555;
}
section article::after { content: ""; display: block; width: 100%; height: 1px; background-color: var(--border-color); margin-top: 1rem; }

/* ============================================================
   7. SIDEBAR ET TABLEAU CALENDRIER
============================================================ */
.widget-sidebar { background-color: #ffffff; }
.widget-sidebar ul li { padding-bottom: 0.4rem; }
.calendar-table th { background-color: var(--light-color); font-weight: bold; }
.calendar-table td { transition: background-color 0.2s ease; cursor: pointer; }
.calendar-table td:hover { background-color: #e9f2ff; }
.calendar-table td.bg-primary { background-color: var(--primary-color); color: #ffffff; }

/* ============================================================
   8. CONFIGURATEUR ET FORMULAIRES (PAGE CUSTOM)
============================================================ */
.preview-area { min-height: 550px; border-width: 2px; }
.preview-scrollable { height: 650px; overflow-y: scroll; }
aside#options-1, aside#options-2 { background-color: var(--light-color); }
aside#options-1 .form-label, aside#options-2 .form-label { color: #444444; font-weight: bold; }

.form-select, .form-control, .form-range { border-color: var(--primary-color); }
.form-select:focus, .form-control:focus {
    border-color: var(--primary-color); box-shadow: 0 0 0 0.1rem rgba(0,41,102, 0.25);
}
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: #ffffff; font-weight: bold; }
.btn-primary:hover { 
    background-color: var(--primary-dark); 
    border-color: var(--primary-dark); /* Corregido: ya no es #0a58ca */
}
.btn-outline-danger:hover { background-color: #dc3545; color: #ffffff; }

/* ============================================================
   9. EDITORIAL FOOTER
============================================================ */
footer.bg-dark { background-color: var(--dark-color); border-top: 6px solid var(--primary-color); color: #ffffff; }
footer h6 { color: #ffcc00; letter-spacing: 1px; }
footer ul li { color: var(--footer-color); padding-bottom: 0.3rem; position: relative; padding-left: 12px; }
footer ul li::before { content: "•"; position: absolute; left: 0; color: var(--primary-color); }
footer .footer-subtitle { font-family: 'Roboto', sans-serif; color: #999999; font-size: 0.9rem; }
footer .footer-author-name { color: #ffffff; font-size: 1.6rem; }
footer .input-newsletter { background-color: #222222; border-color: #444444; color: #ffffff; border-right: 0; }
footer .input-newsletter:focus { background-color: #333333; color: #ffffff; border-color: var(--primary-color); box-shadow: none; }
footer .btn-submit-newsletter { border-left: 0; }
/* ============================================================
   10. MEDIAS ET ACCESSIBILITÉ
============================================================ */
img { max-width: 100%; display: block; }
.img-fluid { object-fit: cover; }
table { border-collapse: collapse; }
table th, table td { vertical-align: middle; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
button {
    cursor: pointer;
}
.btn,
.nav-link,
article img,
.calendar-table td {
    transition:
        color var(--transition-speed) ease,
        background-color var(--transition-speed) ease,
        transform var(--transition-speed) ease,
        opacity var(--transition-speed) ease;
}