/*
Theme Name: The Algerian Reporters
Theme URI: https://thealgerianreporters.com
Author: RedOne
Description: Thème sur mesure pour The Algerian Reporters - site d'actualités, reportages, vidéos et podcasts.
Version: 0.1
Requires PHP: 7.4
Text Domain: algerian-reporters
*/

/* ==========================================
   ETAPE 0 : SQUELETTE MINIMAL
   On ajoutera tout le design section par section.
   Pour l'instant, juste de quoi vérifier que
   le thème s'active correctement.
   ========================================== */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;

    /* Fond avec un peu de profondeur au lieu d'un noir plat :
       - un degrade radial tres subtil (plus clair au centre-haut)
       - une texture de fines lignes diagonales, tres discrete
       Le tout reste tres sombre, juste moins "plat". */
    background-color: #0d0d0d;
    background-image:
        radial-gradient(ellipse 1200px 600px at 50% 0%, rgba(225, 18, 44, 0.06), transparent 70%),
        repeating-linear-gradient(
            135deg,
            rgba(255,255,255,0.015) 0px,
            rgba(255,255,255,0.015) 1px,
            transparent 1px,
            transparent 26px
        );
    background-attachment: fixed;
}

.tar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tar-placeholder {
    border: 2px dashed #e1122c;
    padding: 30px;
    text-align: center;
    border-radius: 6px;
    color: #e1122c;
    font-weight: bold;
}

/* ==========================================
   ETAPE 1 : HEADER (logo + menu)
   ========================================== */

.tar-header {
    background: #0d0d0d;
    border-bottom: 3px solid #e1122c;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tar-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* --- Logo --- */

.tar-header__logo img {
    display: block;
    max-height: 60px;
    width: auto;
}

.tar-header__logo-fallback {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 1px;
}

/* --- Menu (desktop) --- */

.tar-nav {
    display: flex;
}

.tar-menu {
    list-style: none;
    display: flex;
    gap: 26px;
    margin: 0;
    padding: 0;
}

.tar-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 2px;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.tar-menu li a:hover,
.tar-menu li a:focus {
    color: #e1122c;
    border-bottom-color: #e1122c;
}

/* --- Bouton hamburger (masqué sur desktop) --- */

.tar-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.tar-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tar-menu-toggle--active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.tar-menu-toggle--active span:nth-child(2) {
    opacity: 0;
}
.tar-menu-toggle--active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   RESPONSIVE : version mobile du menu
   ========================================== */

@media (max-width: 1024px) {

    .tar-menu-toggle {
        display: flex;
    }

    .tar-nav {
        display: none;
        width: 100%;
        order: 3;
    }

    .tar-nav.tar-nav--open {
        display: block;
        margin-top: 14px;
    }

    .tar-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .tar-menu li {
        width: 100%;
    }

    .tar-menu li a {
        display: block;
        padding: 12px 4px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-left: 3px solid transparent;
    }

    .tar-menu li a:hover,
    .tar-menu li a:focus {
        border-bottom-color: rgba(255,255,255,0.1);
        border-left-color: #e1122c;
        background: rgba(225,18,44,0.08);
    }

    .tar-header__logo img {
        max-height: 46px;
    }
}

/* ==========================================
   ETAPE 2 : PAGE D'ACCUEIL
   ========================================== */

/* --- Bandeau "Dernières actualités" défilant --- */

.tar-ticker {
    background: #e1122c;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
}

.tar-ticker__label {
    flex-shrink: 0;
    background: #0d0d0d;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 10px 18px;
}

.tar-ticker__track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tar-ticker__track {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    animation: tar-ticker-scroll 30s linear infinite;
}

.tar-ticker__track li {
    padding: 8px 40px 8px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
    gap: 6px;
}

.tar-ticker__track a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    line-height: 1;
    gap: 6px;
}

.tar-ticker__track a:hover {
    text-decoration: underline;
}

.tar-ticker__thumb {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

@keyframes tar-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Slider "a la une" (hero) --- */

.tar-hero {
    position: relative;
    margin: 30px 0 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #151515;
    aspect-ratio: 16 / 9;
}

.tar-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease;
    z-index: 1;
}

.tar-hero-slide--active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.tar-hero-slide__media {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tar-hero-slide__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tar-hero__media-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a0a0e);
}

/* Texte en overlay, en bas de l'image, avec degrade sombre pour la lisibilite */
.tar-hero__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 70px 24px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0) 100%);
    z-index: 2;
    pointer-events: none; /* laisse cliquer sur l'image en dessous, sauf sur les liens texte */
}

.tar-hero__content a {
    pointer-events: auto;
}

.tar-hero__title {
    margin: 12px 0 12px;
    font-size: 28px;
    line-height: 1.2;
}

.tar-hero__title a {
    color: #ffffff;
    text-decoration: none;
}

.tar-hero__title a:hover {
    color: #e1122c;
}

.tar-hero__excerpt {
    color: #e2e2e2;
    font-size: 15px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 0 8px;
}

/* --- Points de navigation du slider --- */

.tar-hero-dots {
    position: absolute;
    bottom: 16px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.tar-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tar-hero-dot:hover {
    background: rgba(255,255,255,0.7);
}

.tar-hero-dot--active {
    background: #e1122c;
    transform: scale(1.2);
}

/* --- Badge de categorie --- */

.tar-badge {
    display: inline-block;
    background: #e1122c;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
}

/* --- Meta (date / auteur) --- */

.tar-meta {
    color: #9a9a9a;
    font-size: 12px;
    margin-top: 6px;
}

/* --- Icone Play (articles video/podcast/live) --- */

.tar-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    background: rgba(225, 18, 44, 0.9);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding-left: 3px; /* recentre visuellement le triangle ▶ */
}

.tar-play-icon--large {
    width: 74px;
    height: 74px;
    font-size: 26px;
}

/* --- Sections (Latest Reports / Latest Videos) --- */

.tar-section {
    margin-bottom: 50px;
}

.tar-section__title {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid #e1122c;
    padding-left: 12px;
    margin-bottom: 20px;
}

/* --- Grille 2 colonnes --- */

.tar-grid--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tar-card {
    background: #151515;
    border-radius: 6px;
    overflow: hidden;
}

.tar-card__media {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.tar-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tar-card__media-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a0a0e);
}

.tar-card__content {
    padding: 14px 16px 18px;
}

.tar-card__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.tar-card__title a {
    color: #ffffff;
    text-decoration: none;
}

.tar-card__title a:hover {
    color: #e1122c;
}

/* --- Responsive : grille en 1 colonne sur mobile --- */

@media (max-width: 700px) {
    .tar-grid--2col {
        grid-template-columns: 1fr;
    }

    .tar-hero__title {
        font-size: 22px;
    }
}

/* ==========================================
   FOOTER
   ========================================== */

.tar-footer {
    margin-top: 60px;
    border-top: 3px solid #e1122c;
    background: #0a0a0a;
}

.tar-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 20px;
    text-align: center;
}

.tar-footer-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 0 12px;
    padding: 0;
}

.tar-footer-menu li a {
    color: #cfcfcf;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tar-footer-menu li a:hover {
    color: #e1122c;
}

.tar-footer__copyright {
    margin: 0;
    color: #9a9a9a;
    font-size: 13px;
    letter-spacing: 0.3px;
}
