/**
 * ═══════════════════════════════════════════════════════════
 * ROUND TRIP INSTITUT - HEADER & FOOTER ULTRA MODERNES
 * Pour Divi 5 Theme Builder
 * Design inspiré de Kaplan International
 * ═══════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════
   HEADER - NAVIGATION MODERNE
   ═══════════════════════════════════════════════════════════ */

/* Container principal du header */
.rti-header {
    background: var(--rti-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Header sticky au scroll */
.rti-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Top bar - Barre supérieure avec CTA */
/* ═══════════════════════════════════════
   TOPBAR - Barre d'info en haut
   ═══════════════════════════════════════ */
.rti-header-topbar {
    background: linear-gradient(135deg, var(--rti-red) 0%, var(--rti-red-dark) 100%);
    padding: 0;
    color: var(--rti-white);
    font-family: 'Inter', sans-serif;
}

.rti-topbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    min-height: 44px;
}

.rti-topbar-left {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Contact links */
.rti-topbar-contact,
a.rti-topbar-contact,
a.rti-topbar-contact:link,
a.rti-topbar-contact:visited {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.rti-topbar-contact:first-child {
    padding-left: 0;
}

.rti-topbar-contact:hover,
a.rti-topbar-contact:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Icônes dans les contacts */
.rti-topbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.rti-topbar-icon svg,
.rti-topbar-contact svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Texte & sous-texte */
.rti-topbar-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.rti-topbar-sub {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

/* Partie droite */
.rti-topbar-right {
    display: flex;
    align-items: stretch;
}

/* Bouton CTA */
.rti-topbar-cta,
a.rti-topbar-cta,
a.rti-topbar-cta:link,
a.rti-topbar-cta:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--rti-blue);
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.rti-topbar-cta:hover,
a.rti-topbar-cta:hover {
    background: var(--rti-red);
    color: #fff !important;
}

.rti-topbar-cta svg,
.rti-topbar-cta .rti-topbar-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile : masquer texte secondaire */
@media (max-width: 768px) {
    .rti-topbar-sub {
        display: none;
    }
    .rti-topbar-contact {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    .rti-topbar-cta {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Main navigation */
.rti-header-nav {
    background: var(--rti-white);
    padding: 1rem 0;
}

.rti-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.rti-logo {
    display: flex;
    align-items: center;
}

.rti-logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.rti-logo:hover img {
    transform: scale(1.05);
}

/* Menu principal */
.rti-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rti-menu-item {
    position: relative;
}

.rti-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    color: var(--rti-gray-800);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.rti-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--rti-blue);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.rti-menu-link:hover {
    color: var(--rti-blue);
}

.rti-menu-link:hover::after {
    width: 80%;
}

.rti-menu-item.current-menu-item .rti-menu-link,
.rti-menu-item.current_page_item .rti-menu-link {
    color: var(--rti-blue);
}

.rti-menu-item.current-menu-item .rti-menu-link::after,
.rti-menu-item.current_page_item .rti-menu-link::after {
    width: 80%;
}

/* Sous-menu / Dropdown */
.rti-menu-item.has-submenu > .rti-menu-link::before {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.rti-menu-item.has-submenu:hover > .rti-menu-link::before {
    transform: rotate(180deg);
}

.rti-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--rti-white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.rti-menu-item:hover > .rti-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rti-submenu-item {
    position: relative;
}

.rti-submenu-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--rti-gray-700);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.rti-submenu-link:hover {
    background: var(--rti-blue-ultra-light);
    color: var(--rti-blue);
    border-left-color: var(--rti-blue);
    padding-left: 2rem;
}

/* Boutons CTA dans le menu */
.rti-nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.rti-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rti-nav-btn-primary {
    background: var(--rti-blue);
    color: var(--rti-white);
}

.rti-nav-btn-primary:hover {
    background: var(--rti-blue-dark);
    color: var(--rti-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 74, 127, 0.3);
}

.rti-nav-btn-secondary {
    background: transparent;
    color: var(--rti-red);
    border: 2px solid var(--rti-red);
}

.rti-nav-btn-secondary:hover {
    background: var(--rti-red);
    color: var(--rti-white);
    transform: translateY(-2px);
}

/* Menu mobile toggle */
.rti-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.rti-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--rti-blue);
    transition: all 0.3s ease;
}

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

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

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

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - MENU MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .rti-topbar-left,
    .rti-topbar-right {
        gap: 1rem;
    }

    .rti-topbar-contact {
        font-size: 0.8125rem;
    }

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

    .rti-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        background: var(--rti-white);
        flex-direction: column;
        align-items: stretch;
        padding: 6rem 2rem 2rem;
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.4s ease;
        z-index: 9998;
    }

    .rti-menu.active {
        right: 0;
    }

    .rti-menu-item {
        border-bottom: 1px solid var(--rti-gray-200);
    }

    .rti-menu-link {
        padding: 1rem 0;
        justify-content: space-between;
    }

    .rti-menu-link::after {
        display: none;
    }

    .rti-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--rti-gray-50);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .rti-menu-item.submenu-open > .rti-submenu {
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .rti-nav-cta {
        flex-direction: column;
        margin-left: 0;
        margin-top: 2rem;
    }

    .rti-nav-btn {
        width: 100%;
        justify-content: center;
    }

    /* Overlay pour fermer le menu */
    .rti-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9997;
    }

    .rti-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 640px) {
    .rti-topbar-content {
        flex-direction: column;
        text-align: center;
    }

    .rti-topbar-left,
    .rti-topbar-right {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER - PIED DE PAGE ULTRA MODERNE
   ═══════════════════════════════════════════════════════════ */

.rti-footer {
    background: var(--rti-gray-900);
    color: var(--rti-white);
    padding-top: 4rem;
}

/* Footer Main - Section principale */
.rti-footer-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.rti-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Colonne footer */
.rti-footer-col h3 {
    color: var(--rti-white) !important;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

/* Force texte blanc dans TOUT le footer (surcharge Divi presets) */
.et-l--footer h3,
.et-l--footer .rti-footer-col h3,
footer .rti-footer-col h3 {
    color: var(--rti-white) !important;
}

.et-l--footer .rti-footer-links a,
footer .rti-footer-links a {
    color: var(--rti-gray-400) !important;
}

.et-l--footer .rti-footer-links a:hover,
footer .rti-footer-links a:hover {
    color: var(--rti-blue) !important;
}

.et-l--footer .rti-footer-contact-item,
footer .rti-footer-contact-item {
    color: var(--rti-gray-400) !important;
}

.et-l--footer .rti-footer-contact-item strong,
footer .rti-footer-contact-item strong {
    color: var(--rti-white) !important;
}

/* Force texte blanc pour tous les paragraphes et textes du footer */
.et-l--footer .rti-footer-col p,
footer .rti-footer-col p,
.et-l--footer .rti-footer-col,
footer .rti-footer-col {
    color: var(--rti-gray-400) !important;
}

/* Force modules Divi dans le footer à avoir du texte blanc */
.et-l--footer .et_pb_text,
.et-l--footer .et_pb_text p,
.et-l--footer .et_pb_text h3,
.et-l--footer .et_pb_text h2,
.et-l--footer .et_pb_text h1 {
    color: var(--rti-white) !important;
}

/* Liens dans modules Divi du footer */
.et-l--footer .et_pb_text a {
    color: var(--rti-gray-400) !important;
}

.et-l--footer .et_pb_text a:hover {
    color: var(--rti-blue) !important;
}

.rti-footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--rti-blue), var(--rti-red));
}

.rti-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rti-footer-links li {
    margin-bottom: 0.75rem;
}

.rti-footer-links a {
    color: var(--rti-gray-400);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rti-footer-links a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.rti-footer-links a:hover {
    color: var(--rti-blue);
    padding-left: 1rem;
}

.rti-footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact dans le footer */
.rti-footer-contact {
    margin-bottom: 1.5rem;
}

.rti-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--rti-gray-400);
    font-size: 0.9375rem;
}

.rti-footer-contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--rti-blue);
}

.rti-footer-contact-item a {
    color: var(--rti-white);
    text-decoration: none;
    transition: color 0.3s;
}

.rti-footer-contact-item a:hover {
    color: var(--rti-blue);
}

/* Newsletter */
.rti-footer-newsletter {
    margin-top: 2rem;
}

.rti-newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rti-newsletter-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--rti-gray-700);
    background: var(--rti-gray-800);
    color: var(--rti-white);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.rti-newsletter-input:focus {
    outline: none;
    border-color: var(--rti-blue);
    background: var(--rti-gray-900);
}

.rti-newsletter-input::placeholder {
    color: var(--rti-gray-500);
}

.rti-newsletter-btn {
    padding: 0.875rem 1.75rem;
    background: var(--rti-blue);
    color: var(--rti-white);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rti-newsletter-btn:hover {
    background: var(--rti-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(164, 36, 59, 0.4);
}

/* Réseaux sociaux */
.rti-footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.rti-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--rti-gray-800);
    color: var(--rti-white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.rti-social-link:hover {
    background: var(--rti-blue);
    color: var(--rti-white);
    transform: translateY(-3px);
}

.rti-social-link svg {
    width: 20px;
    height: 20px;
}

/* Footer Bottom */
.rti-footer-bottom {
    border-top: 1px solid var(--rti-gray-800);
    padding: 2rem 0;
}

.rti-footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.rti-footer-copyright {
    color: var(--rti-gray-500);
    font-size: 0.875rem;
}

.rti-footer-legal {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rti-footer-legal a {
    color: var(--rti-gray-500);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s;
}

.rti-footer-legal a:hover {
    color: var(--rti-blue);
}

/* Accréditations */
.rti-footer-accreditations {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rti-gray-800);
}

.rti-accreditations-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.rti-accreditation-logo {
    opacity: 0.6;
    transition: opacity 0.3s;
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
}

.rti-accreditation-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - FOOTER
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .rti-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .rti-footer {
        padding-top: 3rem;
    }

    .rti-footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .rti-newsletter-form {
        flex-direction: column;
    }

    .rti-newsletter-btn {
        width: 100%;
    }

    .rti-footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .rti-footer-legal {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .rti-footer-social {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════
   UTILITAIRES
   ═══════════════════════════════════════════════════════════ */

/* Espacement pour le contenu quand header sticky */
body.has-sticky-header {
    padding-top: 140px; /* Hauteur du header */
}

@media (max-width: 1024px) {
    body.has-sticky-header {
        padding-top: 120px;
    }
}

/* Animation de chargement */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rti-header,
.rti-footer {
    animation: fadeIn 0.5s ease;
}
