/* ===== VARIABLES ===== */
:root {
    --iset-primary: #003366;
    --iset-secondary: #0066cc;
    --iset-accent: #ff9900;
    --iset-green: #28a745;
    --iset-green-light: #d4edda;
    --iset-light: #f0f7ff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,51,102,0.1);
    --shadow-lg: 0 10px 20px rgba(0,51,102,0.15);
    --shadow-hover: 0 15px 30px rgba(0,51,102,0.2);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== HEADER REDESIGN ===== */
.tp-header {
    background: linear-gradient(135deg, var(--iset-primary) 0%, var(--iset-secondary) 100%);
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.tp-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    pointer-events: none;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* Logo redimensionné */
.iset-logo {
    background: var(--white);
    padding: 8px 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: auto;
    flex-shrink: 0;
}

.iset-logo img {
    width: 40px;
    height: auto;
}

.logo-text {
    color: var(--iset-primary);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Titre principal */
.tp-title {
    flex: 1;
}

.tp-title h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    letter-spacing: 0.3px;
}

.tp-subtitle {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.tp-subtitle i {
    color: var(--iset-accent);
    margin-right: 5px;
}

/* Badge durée */
.duration-badge {
    background: var(--iset-accent);
    color: var(--iset-primary);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(255,153,0,0.3);
    white-space: nowrap;
}

.duration-badge i {
    color: var(--iset-primary);
    font-size: 14px;
}

/* Barre d'info compacte */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    padding: 8px 20px;
    border-radius: 40px;
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    position: relative;
    z-index: 2;
    font-size: 14px;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.teacher-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.teacher-info i {
    color: var(--iset-accent);
    font-size: 14px;
}

.competence-badge-compact {
    background: var(--iset-green);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.25);
}

.competence-badge-compact i {
    font-size: 14px;
}

/* ===== BANDE VERTE ===== */
.green-strip {
    background: linear-gradient(90deg, var(--iset-green), #34ce57);
    padding: 12px 0;
    position: relative;
    overflow: hidden;
}

.green-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to { left: 200%; }
}

.green-strip p {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.green-strip i {
    margin: 0 8px;
    font-size: 14px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 40px 0;
    flex: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.section-title h2 {
    color: var(--iset-primary);
    font-size: 28px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--iset-primary), var(--iset-green));
    border-radius: 2px;
}

.section-title p {
    color: var(--gray-600);
    font-size: 16px;
}

/* ===== GRILLE EXERCICES ===== */
.exercices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.exercice-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    position: relative;
}

.exercice-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--iset-green);
}

.exercice-header {
    background: linear-gradient(135deg, var(--iset-primary), var(--iset-secondary));
    color: var(--white);
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}

.exercice-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}

.exercice-number {
    display: inline-block;
    background: var(--iset-accent);
    color: var(--iset-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.exercice-header h3 {
    font-size: 20px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.exercice-header h3 i {
    color: var(--iset-green);
    font-size: 18px;
}

.exercice-header p {
    opacity: 0.9;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.exercice-body {
    padding: 20px;
}

.exercice-enonce {
    background: var(--gray-100);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--iset-green);
}

.exercice-enonce h4 {
    color: var(--iset-primary);
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.exercice-enonce h4 i {
    color: var(--iset-green);
    font-size: 14px;
}

.exercice-enonce p {
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.exercice-enonce ul {
    color: var(--gray-600);
    font-size: 13px;
    padding-left: 18px;
    margin-top: 5px;
}

.exercice-enonce li {
    margin-bottom: 4px;
}

.interface-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed var(--gray-200);
}

.btn-interface {
    background: linear-gradient(135deg, var(--iset-primary), var(--iset-secondary));
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,51,102,0.2);
}

.btn-interface:hover {
    background: linear-gradient(135deg, var(--iset-green), var(--iset-primary));
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.25);
}

.btn-interface i {
    font-size: 14px;
    transition: transform 0.3s;
}

.btn-interface:hover i {
    transform: translateX(4px);
}

.event-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.event-tag {
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.event-tag i {
    color: var(--iset-green);
    font-size: 9px;
}

/* ===== FOOTER ===== */
.tp-footer {
    background: var(--iset-primary);
    color: var(--white);
    padding: 30px 0 15px;
    margin-top: 40px;
    position: relative;
}

.tp-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--iset-accent), var(--iset-green), var(--iset-secondary));
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-info i {
    color: var(--iset-green);
    font-size: 14px;
}

.footer-copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}

.footer-copyright p {
    opacity: 0.8;
    font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .header-main {
        flex-wrap: wrap;
    }
    
    .tp-title {
        min-width: 100%;
        order: 3;
        margin-top: 10px;
        text-align: center;
    }
    
    .tp-subtitle {
        justify-content: center;
    }
    
    .info-bar {
        flex-direction: column;
        gap: 10px;
        border-radius: 20px;
        padding: 15px;
    }
    
    .teacher-info {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .exercices-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .tp-title h1 {
        font-size: 20px;
    }
    
    .tp-subtitle {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.exercice-card {
    animation: fadeIn 0.4s ease-out forwards;
}

.exercice-card:nth-child(1) { animation-delay: 0.1s; }
.exercice-card:nth-child(2) { animation-delay: 0.15s; }
.exercice-card:nth-child(3) { animation-delay: 0.2s; }
.exercice-card:nth-child(4) { animation-delay: 0.25s; }
.exercice-card:nth-child(5) { animation-delay: 0.3s; }
.exercice-card:nth-child(6) { animation-delay: 0.35s; }