/* ═══════════════════════════════════════════════════════════════════════════
   IMAY — Styles globaux du site vitrine
   ═══════════════════════════════════════════════════════════════════════════ */

#page-accueil,
#page-methode,
#page-services,
#page-entreprise,
#page-realisations,
#page-contact {
    main {
        padding: 0;
        margin: 0;
    }

    footer {
        margin-top: 0;
    }
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

.imay-section {
    padding: 80px 0;
}

.imay-section--alt {
    background-color: rgb(var(--background-secondary));
}

.imay-section--dark {
    background: linear-gradient(135deg, #0F172A 0%, rgb(var(--blue-primary)) 100%);
    color: #F1F5F9;
}

.imay-section--dark h1,
.imay-section--dark h2,
.imay-section--dark h3,
.imay-section--dark p {
    color: #F1F5F9;
}

.imay-section--dark .text-muted {
    color: #CBD5E1 !important;
}

@media (max-width: 768px) {
    .imay-section {
        padding: 48px 0;
    }
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.imay-hero {
    padding: 96px 0 80px;
    text-align: center;
}

.imay-hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.imay-hero .imay-hero__baseline {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 16px;
    color: #CBD5E1;
    font-weight: 500;
}

.imay-hero .imay-hero__intro {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto 32px;
    color: #94A3B8;
}

@media (max-width: 768px) {
    .imay-hero {
        padding: 64px 0 48px;
    }
    .imay-hero h1 {
        font-size: 1.85rem;
    }
    .imay-hero .imay-hero__baseline {
        font-size: 1.05rem;
    }
}

/* ─── Titres de section ──────────────────────────────────────────────────── */

.imay-section__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgb(var(--text-primary));
}

.imay-section__subtitle {
    font-size: 1.1rem;
    color: rgb(var(--text-secondary));
    max-width: 640px;
    line-height: 1.7;
}

.imay-section__subtitle--center {
    margin: 0 auto 48px;
    text-align: center;
}

@media (max-width: 768px) {
    .imay-section__title {
        font-size: 1.55rem;
    }
}

/* ─── Boutons ─────────────────────────────────────────────────────────────── */

.imay-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.imay-btn--primary {
    background-color: #FFFFFF;
    color: rgb(var(--blue-primary));
}

.imay-btn--primary:hover {
    background-color: #E2E8F0;
    color: rgb(var(--blue-primary));
    text-decoration: none;
}

.imay-btn--secondary {
    background-color: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
}

.imay-btn--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    text-decoration: none;
}

.imay-btn--blue {
    background-color: rgb(var(--blue-primary));
    color: #FFFFFF;
}

.imay-btn--blue:hover {
    opacity: 0.9;
    color: #FFFFFF;
    text-decoration: none;
}

.imay-btn--outline {
    background-color: transparent;
    color: rgb(var(--blue-primary));
    border-color: rgb(var(--blue-primary));
}

.imay-btn--outline:hover {
    background-color: rgb(var(--blue-primary));
    color: #FFFFFF;
    text-decoration: none;
}

/* ─── Cartes ──────────────────────────────────────────────────────────────── */

.imay-card {
    background: rgb(var(--background-secondary));
    border: 1px solid rgba(var(--text-secondary), 0.12);
    border-radius: 10px;
    padding: 28px 24px;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.imay-card:hover {
    box-shadow: 0 8px 30px rgba(var(--text-primary), 0.08);
    transform: translateY(-2px);
}

.imay-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(var(--blue-primary), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: rgb(var(--blue-primary));
}

.imay-card__icon svg {
    width: 24px;
    height: 24px;
    fill: rgb(var(--blue-primary));
}

.imay-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: rgb(var(--text-primary));
}

.imay-card__text {
    font-size: 0.93rem;
    line-height: 1.65;
    color: rgb(var(--text-secondary));
    margin-bottom: 0;
}

/* Carte cliquable (réalisations) */
.imay-card--link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.imay-card--link:hover {
    text-decoration: none;
}

.imay-card__tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(var(--blue-primary), 0.08);
    color: rgb(var(--blue-primary));
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ─── Grille de cartes ────────────────────────────────────────────────────── */

.imay-grid {
    display: grid;
    gap: 24px;
}

.imay-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.imay-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.imay-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .imay-grid--3,
    .imay-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .imay-grid--2,
    .imay-grid--3,
    .imay-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ─── Blocs valeurs ───────────────────────────────────────────────────────── */

.imay-value {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.imay-value__number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(var(--blue-primary));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.imay-value__content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgb(var(--text-primary));
}

.imay-value__content p {
    font-size: 0.93rem;
    color: rgb(var(--text-secondary));
    line-height: 1.65;
    margin-bottom: 0;
}

/* ─── Étapes (méthode) ────────────────────────────────────────────────────── */

.imay-steps {
    position: relative;
    padding-left: 48px;
}

.imay-steps::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(var(--blue-primary), 0.15);
}

.imay-step {
    position: relative;
    margin-bottom: 48px;
}

.imay-step:last-child {
    margin-bottom: 0;
}

.imay-step__number {
    position: absolute;
    left: -48px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(var(--blue-primary));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 1;
}

.imay-step h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgb(var(--text-primary));
}

.imay-step ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.imay-step ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgb(var(--text-secondary));
}

.imay-step ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(var(--blue-primary));
}

/* ─── Service blocs ───────────────────────────────────────────────────────── */

.imay-service {
    padding: 40px 0;
    border-bottom: 1px solid rgba(var(--text-secondary), 0.1);
}

.imay-service:last-child {
    border-bottom: none;
}

.imay-service h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: rgb(var(--text-primary));
}

.imay-service__item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgb(var(--text-primary));
}

.imay-service__item p {
    font-size: 0.93rem;
    line-height: 1.65;
    color: rgb(var(--text-secondary));
}

.imay-service__note {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(var(--blue-primary), 0.04);
    border-left: 3px solid rgb(var(--blue-primary));
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: rgb(var(--text-tertiary));
    font-style: italic;
}

/* ─── Réalisations ────────────────────────────────────────────────────────── */

.imay-real {
    background: rgb(var(--background-secondary));
    border: 1px solid rgba(var(--text-secondary), 0.12);
    border-radius: 10px;
    padding: 28px 24px;
    height: 100%;
}

.imay-real__type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(var(--blue-primary), 0.08);
    color: rgb(var(--blue-primary));
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.imay-real h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgb(var(--text-primary));
}

.imay-real__detail {
    margin-bottom: 10px;
}

.imay-real__detail strong {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(var(--text-tertiary));
    display: block;
    margin-bottom: 2px;
}

.imay-real__detail p {
    font-size: 0.93rem;
    line-height: 1.6;
    color: rgb(var(--text-secondary));
    margin-bottom: 0;
}

.imay-real__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgb(var(--blue-primary));
    text-decoration: none;
    transition: opacity 0.2s;
}
.imay-real__link:hover {
    opacity: 0.8;
    color: rgb(var(--blue-primary));
}

.imay-card__visit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgb(var(--blue-primary));
    cursor: pointer;
}
.imay-card__visit:hover {
    opacity: 0.8;
}

/* ─── Formulaire ──────────────────────────────────────────────────────────── */

.imay-form .form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: rgb(var(--text-primary));
    margin-bottom: 6px;
}

.imay-form .form-control,
.imay-form .form-select {
    border: 1px solid rgba(var(--text-secondary), 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.93rem;
    color: rgb(var(--text-primary));
    background-color: rgb(var(--background-secondary));
    transition: border-color 0.2s, box-shadow 0.2s;
}

.imay-form .form-control:focus,
.imay-form .form-select:focus {
    border-color: rgb(var(--blue-primary));
    box-shadow: 0 0 0 3px rgba(var(--blue-primary), 0.1);
}

.imay-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.imay-form .invalid-feedback {
    font-size: 0.82rem;
}

/* ─── Bloc rassurance / citation ──────────────────────────────────────────── */

.imay-quote {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 24px;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    color: rgb(var(--text-tertiary));
    border-top: 2px solid rgba(var(--blue-primary), 0.15);
    border-bottom: 2px solid rgba(var(--blue-primary), 0.15);
}

/* ─── Footer override ─────────────────────────────────────────────────────── */

footer {
    background: #0F172A !important;
}

/* ─── Dark mode overrides ─────────────────────────────────────────────────── */

/* Sections hero/CTA : gradient plus sombre pour se distinguer du fond principal */
html:has(body[data-theme='sombre']) .imay-section--dark {
    background: linear-gradient(135deg, #0B0E18 0%, #12203A 100%);
}

/* Bouton primaire (fond blanc, texte bleu) : garder texte foncé pour contraste */
html:has(body[data-theme='sombre']) .imay-btn--primary {
    color: #1E3A8A;
}
html:has(body[data-theme='sombre']) .imay-btn--primary:hover {
    color: #1E3A8A;
}

/* Bouton bleu plein : fond plus soutenu pour contraste texte blanc */
html:has(body[data-theme='sombre']) .imay-btn--blue {
    background-color: #3B82F6;
}

/* Bouton outline hover : fond plus soutenu */
html:has(body[data-theme='sombre']) .imay-btn--outline:hover {
    background-color: #3B82F6;
}

/* Pastilles numérotées (valeurs, étapes) : bleu plus soutenu pour texte blanc */
html:has(body[data-theme='sombre']) .imay-value__number,
html:has(body[data-theme='sombre']) .imay-step__number {
    background: #3B82F6;
}

/* Cartes : ombre adaptée au fond sombre (lueur subtile) */
html:has(body[data-theme='sombre']) .imay-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Icônes/tags : opacité renforcée pour visibilité sur fond sombre */
html:has(body[data-theme='sombre']) .imay-card__icon {
    background: rgba(var(--blue-primary), 0.14);
}
html:has(body[data-theme='sombre']) .imay-card__tag,
html:has(body[data-theme='sombre']) .imay-real__type {
    background: rgba(var(--blue-primary), 0.14);
}

/* Note de service : fond plus visible */
html:has(body[data-theme='sombre']) .imay-service__note {
    background: rgba(var(--blue-primary), 0.08);
}

/* Footer sombre : plus profond que le fond principal */
html:has(body[data-theme='sombre']) footer {
    background: #0A0C10 !important;
}

/* ─── Utilitaires ─────────────────────────────────────────────────────────── */

.imay-mb-0 { margin-bottom: 0; }
.imay-mt-48 { margin-top: 48px; }
.imay-text-center { text-align: center; }
