/* =========================================================
   ELPIS GROUP INTERNATIONAL
   PAGE CANADA — CSS PREMIUM / RESPONSIVE
   Compatible avec le HTML/PHP/JS existant
   ========================================================= */

/* =========================================================
   VARIABLES
   ========================================================= */
:root {
    --elpis-red: #c1121f;
    --elpis-red-dark: #980d17;
    --elpis-red-deep: #760a12;
    --elpis-red-light: #fff4f5;
    --elpis-red-soft: #fff8f8;

    --dark: #111827;
    --dark-soft: #374151;
    --text: #4b5563;
    --text-light: #6b7280;
    --muted: #9ca3af;

    --white: #ffffff;
    --background: #f4f6f9;
    --background-soft: #f8fafc;

    --border: #e5e7eb;
    --border-dark: #d1d5db;

    --shadow-xs: 0 2px 8px rgba(17, 24, 39, .04);
    --shadow-sm: 0 6px 20px rgba(17, 24, 39, .06);
    --shadow: 0 14px 38px rgba(17, 24, 39, .09);
    --shadow-lg: 0 24px 65px rgba(17, 24, 39, .13);
    --shadow-red: 0 12px 28px rgba(193, 18, 31, .18);

    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --transition: all .28s cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   RESET LOCAL
   ========================================================= */
.top-banner,
.slider,
.page-container,
.page-container *,
.slider * {
    box-sizing: border-box;
}

/* =========================================================
   TOP BANNER
   ========================================================= */
.top-banner {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 0;
    overflow: hidden;
    background: var(--dark);
    isolation: isolate;
}

.top-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(17, 24, 39, .04) 0%,
            rgba(17, 24, 39, .08) 55%,
            rgba(17, 24, 39, .22) 100%
        );
}

.top-banner img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    transform: scale(1.001);
    transition: transform 1.1s cubic-bezier(.2, .65, .25, 1);
}

.top-banner:hover img {
    transform: scale(1.025);
}

/* =========================================================
   SLIDER
   ========================================================= */
.slider {
    position: relative;
    width: min(1200px, calc(100% - 40px));
    margin: 55px auto;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.slides {
    display: flex;
    width: 100%;
    transition: transform .65s cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
}

/* =========================================================
   SLIDE
   ========================================================= */
.study-section {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    align-items: stretch;
    min-height: 390px;
    background: var(--white);
}

/* =========================================================
   IMAGE SLIDER
   ========================================================= */
.image-container {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    overflow: hidden;
    background: #e5e7eb;
}

.image-container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 55%,
        rgba(0, 0, 0, .07) 100%
    );
}

.image-container::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 35%;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(0, 0, 0, .10)
    );
}

.image-container img {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    object-position: center;
    transition: transform .8s cubic-bezier(.2, .65, .25, 1);
}

.study-section:hover .image-container img {
    transform: scale(1.035);
}

/* =========================================================
   CONTENU SLIDER
   ========================================================= */
.content {
    position: relative;
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 55px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(193, 18, 31, .035),
            transparent 34%
        ),
        var(--white);
}

.content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--elpis-red),
        var(--elpis-red-dark)
    );
}

.content h1 {
    margin: 0 0 18px;
    color: var(--elpis-red);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.03em;
}

.content p {
    margin: 0 0 15px;
    max-width: 620px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}

.content .subtitle {
    margin-top: -5px;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   CTA
   ========================================================= */
.cta-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    padding: 12px 19px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn i {
    margin-right: 8px;
    font-size: 14px;
}

.btn.primary {
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--elpis-red),
        var(--elpis-red-dark)
    );
    box-shadow: var(--shadow-red);
}

.btn.primary:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 15px 32px rgba(193, 18, 31, .27);
}

.btn.primary:active {
    transform: translateY(-1px);
}

.btn.secondary {
    color: var(--elpis-red);
    background: var(--white);
    border: 1px solid rgba(193, 18, 31, .28);
}

.btn.secondary:hover {
    color: var(--white);
    background: var(--elpis-red);
    border-color: var(--elpis-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(193, 18, 31, .16);
}

/* =========================================================
   NAVIGATION SLIDER
   ========================================================= */
button.prev,
button.next {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--white);
    background: rgba(17, 24, 39, .68);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 50%;
    font-size: 17px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

button.prev:hover,
button.next:hover {
    background: var(--elpis-red);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .20);
}

button.prev:focus-visible,
button.next:focus-visible {
    outline: 3px solid rgba(193, 18, 31, .25);
    outline-offset: 3px;
}

button.prev {
    left: 18px;
}

button.next {
    right: 18px;
}

/* =========================================================
   DOTS
   ========================================================= */
.dots {
    position: absolute;
    left: 50%;
    bottom: 17px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
    padding: 7px 11px;
    background: rgba(17, 24, 39, .58);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0;
    padding: 0;
    display: block;
    background: rgba(255, 255, 255, .55);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot:hover {
    background: var(--white);
    transform: scale(1.15);
}

.dot.active {
    width: 25px;
    background: var(--elpis-red);
    border-radius: 10px;
}

/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */
.page-container {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(320px, 1fr);
    gap: 30px;
    width: min(1400px, calc(100% - 40px));
    margin: 48px auto 75px;
    align-items: start;
}

/* =========================================================
   PANNEAU GAUCHE
   ========================================================= */
.left-panel {
    min-width: 0;
}

/* =========================================================
   SECTION CANADA
   ========================================================= */
.canada-section {
    position: relative;
    padding: 44px;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, .85);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    line-height: 1.8;
}

.canada-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    width: 70px;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--elpis-red),
        #ef4444
    );
    border-radius: 0 0 5px 5px;
}

.canada-section h1 {
    margin: 0 0 24px;
    color: var(--elpis-red);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.03em;
}

.canada-section h2 {
    margin: 40px 0 18px;
    color: var(--dark);
    font-size: 1.62rem;
    line-height: 1.3;
    font-weight: 800;
}

.canada-section h3 {
    margin: 30px 0 15px;
    color: var(--dark-soft);
    font-size: 1.22rem;
    font-weight: 700;
}

.canada-section p {
    margin: 0 0 20px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.85;
}

.canada-section hr {
    height: 1px;
    margin: 40px 0;
    background: linear-gradient(
        90deg,
        transparent,
        var(--border),
        transparent
    );
    border: 0;
}

.canada-section ul {
    margin: 15px 0 25px;
    padding-left: 22px;
}

.canada-section li {
    margin-bottom: 9px;
    color: var(--text);
    line-height: 1.7;
}

.canada-section li::marker {
    color: var(--elpis-red);
    font-weight: 700;
}

/* =========================================================
   PANNEAU DROIT
   ========================================================= */
.right-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 25px;
}

/* =========================================================
   BOX
   ========================================================= */
.box {
    position: relative;
    padding: 25px;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, .85);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    width: 42px;
    height: 3px;
    background: var(--elpis-red);
    border-radius: 0 0 5px 5px;
}

.box:hover {
    border-color: rgba(193, 18, 31, .10);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.box h1,
.box h2,
.box h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--dark);
    line-height: 1.3;
}

.box h2 {
    font-size: 1.3rem;
    font-weight: 800;
}

.box h3 {
    font-size: 1.15rem;
    color: var(--elpis-red);
}

/* =========================================================
   DESTINATIONS
   ========================================================= */
.destinations-box ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.destinations-box li {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--dark-soft);
    background: var(--background-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.destinations-box li i {
    width: 20px;
    color: var(--elpis-red);
    text-align: center;
    transition: var(--transition);
}

.destinations-box li:hover {
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--elpis-red),
        var(--elpis-red-dark)
    );
    border-color: var(--elpis-red);
    transform: translateX(5px);
    box-shadow: 0 7px 18px rgba(193, 18, 31, .14);
}

.destinations-box li:hover i {
    color: var(--white);
}

/* =========================================================
   FORMULAIRE
   ========================================================= */
.box form {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 0;
    border: 0;
}

.box input,
.box select,
.box textarea {
    width: 100%;
    min-height: 47px;
    padding: 12px 14px;
    color: var(--dark);
    background: var(--white);
    border: 1px solid var(--border-dark);
    border-radius: 9px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.box textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.6;
}

.box input::placeholder,
.box textarea::placeholder {
    color: var(--muted);
}

.box input:hover,
.box select:hover,
.box textarea:hover {
    border-color: #b8bec8;
    background: #fcfcfd;
}

.box input:focus,
.box select:focus,
.box textarea:focus {
    border-color: var(--elpis-red);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(193, 18, 31, .08);
}

.box select {
    appearance: auto;
    cursor: pointer;
}

.box button[type="submit"] {
    width: 100%;
    min-height: 49px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 5px;
    padding: 12px 18px;
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--elpis-red),
        var(--elpis-red-dark)
    );
    border: 0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-red);
    transition: var(--transition);
}

.box button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(193, 18, 31, .25);
}

.box button[type="submit"]:active {
    transform: translateY(0);
}

.box button[type="submit"]:focus-visible {
    outline: 3px solid rgba(193, 18, 31, .22);
    outline-offset: 3px;
}

/* =========================================================
   VIDÉOS
   ========================================================= */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 11px;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* =========================================================
   ÉTAPES PRINCIPALES
   ========================================================= */
.steps-section {
    margin: 50px 0;
}

.steps-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 26px;
    color: var(--dark);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.steps-title i {
    color: var(--elpis-red);
    font-size: 1.25rem;
}

/* =========================================================
   GRID ÉTAPES
   ========================================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* =========================================================
   CARD ÉTAPE
   ========================================================= */
.step-card {
    position: relative;
    min-width: 0;
    padding: 29px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    opacity: 1;
    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
}

.step-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--elpis-red),
        #ef4444
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}

.step-card:hover {
    transform: translateY(-7px);
    border-color: rgba(193, 18, 31, .18);
    box-shadow: var(--shadow-lg);
}

.step-card:hover::before {
    transform: scaleX(1);
}

/* =========================================================
   NUMÉRO
   ========================================================= */
.step-number {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
    background: linear-gradient(
        135deg,
        var(--elpis-red),
        var(--elpis-red-dark)
    );
    border-radius: 15px;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(193, 18, 31, .18);
    transition: var(--transition);
}

.step-card:hover .step-number {
    transform: translateY(-2px) scale(1.04);
}

/* =========================================================
   TITRE CARD
   ========================================================= */
.step-card h4 {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

/* =========================================================
   TEXTE CARD
   ========================================================= */
.step-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.75;
}

/* =========================================================
   ACCESSIBILITÉ
   ========================================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   RESPONSIVE — 1200 PX
   ========================================================= */
@media (max-width: 1200px) {
    .page-container {
        grid-template-columns:
            minmax(0, 1.8fr)
            minmax(300px, 1fr);
        gap: 22px;
    }

    .content {
        padding: 42px;
    }

    .canada-section {
        padding: 36px;
    }
}

/* =========================================================
   RESPONSIVE — TABLETTE
   ========================================================= */
@media (max-width: 992px) {
    .top-banner {
        height: 420px;
    }

    .slider {
        width: min(calc(100% - 30px), 850px);
        margin: 35px auto;
        border-radius: 18px;
    }

    .study-section {
        flex-direction: column;
        min-height: auto;
    }

    .image-container {
        flex: none;
        width: 100%;
        height: 300px;
    }

    .image-container img {
        min-height: 300px;
    }

    .content {
        width: 100%;
        padding: 34px;
    }

    .content::before {
        width: 100%;
        height: 4px;
        bottom: auto;
        left: 0;
        background: linear-gradient(
            90deg,
            var(--elpis-red),
            var(--elpis-red-dark)
        );
    }

    .page-container {
        grid-template-columns: 1fr;
        width: min(calc(100% - 30px), 850px);
        margin-top: 30px;
    }

    .right-panel {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 768px) {
    .top-banner {
        height: 330px;
    }

    .slider {
        width: calc(100% - 24px);
        margin: 25px auto;
        border-radius: 15px;
    }

    .image-container {
        height: 230px;
    }

    .image-container img {
        min-height: 230px;
    }

    .content {
        padding: 30px 24px 35px;
    }

    .content h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .content p {
        font-size: 14px;
        line-height: 1.7;
    }

    .cta-buttons {
        width: 100%;
        gap: 9px;
    }

    .btn {
        flex: 1 1 auto;
        min-width: 150px;
        font-size: 13px;
    }

    button.prev,
    button.next {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    button.prev {
        left: 10px;
    }

    button.next {
        right: 10px;
    }

    .dots {
        bottom: 10px;
    }

    .page-container {
        width: calc(100% - 24px);
        margin-top: 25px;
        margin-bottom: 45px;
    }

    .canada-section {
        padding: 28px 22px;
        border-radius: 15px;
    }

    .canada-section h1 {
        font-size: 1.7rem;
    }

    .canada-section h2 {
        font-size: 1.4rem;
    }

    .canada-section p {
        font-size: 14px;
        line-height: 1.75;
    }

    .right-panel {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .box {
        padding: 22px;
        border-radius: 13px;
    }

    .steps-section {
        margin: 38px 0;
    }

    .steps-title {
        font-size: 1.4rem;
    }
}

/* =========================================================
   PETITS SMARTPHONES
   ========================================================= */
@media (max-width: 480px) {
    .top-banner {
        height: 250px;
    }

    .slider {
        width: calc(100% - 16px);
        margin: 18px auto;
    }

    .image-container {
        height: 190px;
    }

    .image-container img {
        min-height: 190px;
    }

    .content {
        padding: 24px 18px 29px;
    }

    .content h1 {
        font-size: 1.5rem;
    }

    .content p {
        font-size: 13px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        min-width: 0;
    }

    button.prev,
    button.next {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    button.prev {
        left: 7px;
    }

    button.next {
        right: 7px;
    }

    .page-container {
        width: calc(100% - 16px);
    }

    .canada-section {
        padding: 23px 17px;
    }

    .canada-section h1 {
        font-size: 1.5rem;
    }

    .canada-section h2 {
        font-size: 1.3rem;
    }

    .canada-section h3 {
        font-size: 1.1rem;
    }

    .canada-section p {
        font-size: 13.5px;
        line-height: 1.7;
    }

    .step-card {
        padding: 24px 20px;
    }

    .step-number {
        width: 52px;
        height: 52px;
        border-radius: 13px;
    }
}

/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */
@media (max-width: 360px) {
    .top-banner {
        height: 220px;
    }

    .content {
        padding: 21px 15px 25px;
    }

    .content h1 {
        font-size: 1.35rem;
    }

    .canada-section {
        padding: 20px 14px;
    }

    .box {
        padding: 18px;
    }

    .box input,
    .box select,
    .box textarea {
        font-size: 13px;
    }
}

/* =========================================================
   RÉDUCTION DES ANIMATIONS
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
