:root {
    --color-navy: #1a237e;
    --color-navy-light: #3f51b5;
    --color-blue: #1e88e5;
    --color-blue-dark: #1565c0;
    --color-accent: #ffc107;
    --color-accent-dark: #ff9800;
    --color-error: #e53935;
    --color-success: #4caf50;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg-light: #f8f9fa;
    --color-border: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

img {
    width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    color: var(--color-navy);
    padding: 0.85rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(26,35,126,0.08);
    border-bottom: 1px solid var(--color-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-navy);
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-menu a:hover {
    background: var(--color-bg-light);
    color: var(--color-navy);
}

.nav-menu li.active > a {
    color: var(--color-navy);
    font-weight: 600;
    background: rgba(26,35,126,0.08);
}

.nav-login {
    color: white !important;
    background: var(--color-navy) !important;
    font-weight: 600 !important;
}

.nav-login:hover {
    background: var(--color-navy-light) !important;
}

.nav-admin-link {
    color: var(--color-blue-dark) !important;
    font-weight: 600 !important;
}

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #1a237e;
    margin: 3px 0;
    transition: 0.3s;
}

/* Carousel container */
.carousel-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar - overlay on carousel */
.sidebar {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    width: 200px;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

.sidebar-item {
    font-size: 18px;
    font-weight: 500;
    color: #666;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px 0;
    border-radius: 5px;
    width: 100%;
}

.sidebar-item.active {
    color: #1e88e5;
    font-weight: 700;
    transform: translateX(10px);
    background: rgba(30, 136, 229, 0.1);
    padding-left: 10px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1s ease, transform 1s ease;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slide1 {
    background-image: url('/images/discuter.jpg');
    background-size: cover;
    background-position: top;
}

.slide2 {
    background-image: url('/images/elaguer.jpg');
    background-size: cover;
    background-position: bottom;
}

.slide3 {
    background-image: url('/images/batir.jpg');
    background-size: cover;
    background-position: center;
}

.slide4 {
    background-image: url('/images/accompagner.jpg');
    background-size: cover;
    background-position: center;
}

.slide5 {
    background-image: url('/images/transcender.jpg');
    background-size: cover;
    background-position: center;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 20px;
    right: 50px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.control-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.control-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #333;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    color: #1a237e;
    margin-bottom: 2rem;
}

.about-intro {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.vocation-title {
    color: #e53935;
    margin: 2rem 0 1rem 0;
}

.vocation-list {
    list-style: none;
    padding-left: 0;
}

.vocation-list li {
    margin-bottom: 0.8rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 20px;
    padding: 3rem;
    min-height: 400px;
}

/* DÉBAT Section */
.debat-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.debat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.debat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.debat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #e53935, #ffc107);
}

.debat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.debat-letter {
    font-size: 3rem;
    font-weight: bold;
    color: #e53935;
    margin-bottom: 1rem;
    text-align: center;
}

/* Upcoming Section */
.upcoming-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
    color: white;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.upcoming-item {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.upcoming-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.upcoming-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Newsletter Section */
.newsletter-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    text-align: center;
}

.newsletter-title {
    color: #333;
    margin-bottom: 1rem;
}

.newsletter-description {
    color: #333;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    min-width: 200px;
}

.newsletter-message {
    margin-top: 1rem;
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
}

.newsletter-message.success {
    display: block;
    background: #4caf50;
    color: white;
}

.newsletter-message.error {
    display: block;
    background: #f44336;
    color: white;
}

/* Footer */
footer {
    background: #1a237e;
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #ffc107;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #3f51b5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #e53935;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #3f51b5;
    padding-top: 2rem;
    margin-top: 2rem;
}

/* Section titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1a237e;
}

.section-title-white {
    color: white;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle-white {
    color: rgba(255,255,255,0.9);
}

/* Error page */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
    padding-top: 80px;
}

.error-content {
    text-align: center;
    color: white;
}

.error-content h1 {
    font-size: 8rem;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(229, 57, 53, 0); }
}

/* Responsive */
@media (max-width: 1400px) {
    .sidebar {
        max-width: 90vw;
        left: 30px;
    }
}

@media (max-width: 1100px) {
    .nav-menu {
        gap: 0.15rem;
    }

    .nav-menu a {
        padding: 0.55rem 0.65rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        bottom: 0;
        left: 0;
        top: auto;
        transform: none;
        width: 100%;
        max-width: none;
        height: 70px;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 10px 20px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    }

    .sidebar-item {
        margin: 0;
        font-size: 14px;
        transform: none !important;
        text-align: center;
        padding: 5px 8px;
        flex: 1;
    }

    .sidebar-item.active {
        color: #1e88e5;
        font-weight: 700;
        border-bottom: 3px solid #1e88e5;
        background: transparent;
        padding-left: 8px;
    }

    .carousel-container {
        height: 320px;
    }

    .about-visual {
        min-height: auto;
        padding: 1.5rem;
    }

    .controls {
        bottom: 20px;
        right: 20px;
    }

    .control-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 20px 1.5rem;
        gap: 0.25rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.12);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu.active li {
        width: 100%;
    }

    .nav-menu.active a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .mobile-menu {
        display: flex;
        gap: 5px;
        z-index: 1001;
    }

    .mobile-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-input {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .sidebar-item {
        font-size: 12px;
        padding: 5px 4px;
    }

    .slide {
        font-size: 28px;
    }
}

@media (max-width: 400px) {
    .sidebar-item {
        font-size: 10px;
        padding: 5px 2px;
    }
}

/* === Home magazine === */

/* Carousel "à la une" dynamique */
.hc-carousel {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 420px;
    overflow: hidden;
    margin-top: 78px;
}

.hc-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--color-navy);
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    align-items: flex-end;
}

.hc-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hc-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26,35,126,0) 0%, rgba(26,35,126,0.85) 100%);
}

.hc-slide-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 3rem;
    max-width: 700px;
}

.hc-slide-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.25;
}

.hc-slide-content p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 1.2rem;
}

.hc-empty {
    height: 40vh;
    min-height: 260px;
    margin-top: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.hc-dots {
    position: absolute;
    z-index: 3;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.hc-dot.active {
    background: white;
    transform: scale(1.3);
}

.hc-controls {
    position: absolute;
    z-index: 3;
    bottom: 16px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.hc-controls button {
    background: rgba(255,255,255,0.85);
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.hc-controls button:hover {
    background: white;
    transform: scale(1.1);
}

/* Espaces publicitaires */
.ad-banner {
    padding: 2rem 0;
}

.ad-banner a {
    display: block;
}

.ad-banner img {
    border-radius: 12px;
    max-height: 180px;
    object-fit: cover;
}

.ad-sidebar-slot {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-sidebar-slot img {
    border-radius: 12px;
    max-height: 260px;
    object-fit: cover;
}

/* Sections d'aperçu par rubrique */
.preview-section {
    padding: 60px 0;
}

.preview-section.bg-light {
    background: var(--color-bg-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 {
    color: var(--color-navy);
    font-size: 1.8rem;
}

.section-header a {
    color: var(--color-blue-dark);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.section-header a:hover {
    text-decoration: underline;
}

.preview-with-sidebar {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.preview-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.preview-card-image {
    height: 150px;
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    background-size: cover;
    background-position: center;
}

.preview-card-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-card-meta {
    font-size: 0.78rem;
    color: var(--color-blue-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.preview-card-body h3 {
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.preview-card-body p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    flex: 1;
}

.preview-empty {
    color: var(--color-text-light);
    font-style: italic;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .hc-carousel {
        height: 55vh;
        min-height: 340px;
        margin-top: 70px;
    }

    .hc-slide-content {
        padding: 1.5rem;
    }

    .hc-slide-content h2 {
        font-size: 1.6rem;
    }

    .preview-with-sidebar {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hc-slide-content h2 {
        font-size: 1.3rem;
    }

    .hc-slide-content p {
        font-size: 0.9rem;
    }
}
