:root{--bg:#f6f7f7;--ink:#18222d;--muted:#6b7782;--line:#e5eaed;--accent:#d89d66;--deep:#14202d;--chat:#263c51;--easing:cubic-bezier(.2,.8,.2,1)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}img{max-width:100%}[hidden]{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.site-header{height:88px;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:0 max(36px,calc((100vw - 1280px)/2));color:#fff;border-bottom:1px solid rgba(255,255,255,.2)}.brand{display:inline-flex;align-items:center}.brand img{display:block;width:145px;height:58px;object-fit:contain;object-position:left center;filter:brightness(0) invert(1)}.site-header nav{display:flex;align-items:center;gap:38px;font-size:12px;letter-spacing:.11em;text-transform:uppercase;font-weight:750}.site-header nav a{opacity:.86;transition:opacity .2s}.site-header nav a:hover{opacity:1}
.hero{position:relative;background:#192734;min-height:650px;height:min(815px,94svh);display:flex;align-items:center;justify-content:center;isolation:isolate;color:#fff;overflow:hidden}.hero-media,.hero-shade{position:absolute;inset:0;z-index:-1}.hero-media{background:#31363a url('explore.jpg') center/cover no-repeat}.hero-media video{display:block;width:100%;height:100%;object-fit:cover}.hero-shade{background:linear-gradient(110deg,rgba(16,23,32,.81) 2%,rgba(15,23,31,.52) 55%,rgba(16,24,32,.6)),linear-gradient(0deg,rgba(7,16,25,.35),transparent 35%)}.hero-content{text-align:center;width:min(940px,calc(100% - 52px));padding:110px 0 95px}.eyebrow{font-size:11px;letter-spacing:.23em;font-weight:780;display:inline-flex;align-items:center;gap:12px;color:#f4d5b9}.eyebrow-dot{width:7px;height:7px;border-radius:50%;background:#eeb780;box-shadow:0 0 0 5px rgba(244,183,127,.15)}.hero h1{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(52px,7vw,96px);line-height:1.1;letter-spacing:-2.5px;margin:23px auto}.hero h1 em{font-weight:400;color:#f2c69f}.hero-content>p:not(.search-hint){font-size:16px;line-height:1.85;max-width:620px;color:#e2e8e9;margin:0 auto 29px}#search-form{width:min(700px,100%);margin:0 auto;display:flex;align-items:center;background:#fff;border:1px solid rgba(255,255,255,.7);border-radius:14px;padding:7px 7px 7px 19px;box-shadow:0 20px 55px rgba(0,0,0,.17);gap:12px}.search-icon{font-size:27px;line-height:1;color:#8a9aa5;transform:rotate(-26deg);display:inline-block}#search-form input{width:100%;flex:1;min-width:0;padding:14px 0;border:0;background:transparent;outline:none;color:#1e3243;font-size:15px}#search-form input::placeholder{color:#91a0aa;opacity:1}#search-form button[type=submit]{background:#233747;color:white;border:0;border-radius:10px;padding:16px 23px;font-size:13px;font-weight:760;letter-spacing:.015em;white-space:nowrap}#search-form button[type=submit]:hover{background:#345168}.search-hint{margin-top:19px;color:rgba(255,255,255,.73);font-size:12px}.search-example{border:0;background:none;color:#fff;font-size:inherit;padding:1px 3px;text-decoration:underline;text-decoration-color:rgba(255,255,255,.45);text-underline-offset:3px}.scroll-cue{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);font-size:10px;letter-spacing:.18em;text-transform:uppercase;font-weight:700;color:rgba(255,255,255,.83);white-space:nowrap}.scroll-cue span{margin-left:13px;font-size:16px}
.projects{width:min(1280px,calc(100% - 66px));margin:0 auto;padding:96px 0 111px;scroll-margin-top:15px}.projects-heading{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:39px}.section-kicker{font-size:11px;font-weight:800;letter-spacing:.18em;color:#a87c53}.projects h2,.about h2{font-family:Georgia,'Times New Roman',serif;font-weight:500;letter-spacing:-1.4px;font-size:clamp(34px,4.3vw,53px);margin:14px 0}.projects-heading p{color:var(--muted);font-size:15px;line-height:1.65;margin:0}.projects-counter{font-size:12px;color:#65727e;background:#eef1f2;border:1px solid #e4eaed;border-radius:35px;padding:12px 16px;white-space:nowrap}.projects-counter #results-count{font-weight:850;color:var(--ink)}.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.project-card{min-height:273px;display:flex;flex-direction:column;align-items:stretch;padding:26px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 9px 28px rgba(29,43,52,.035);transition:transform .22s var(--easing),box-shadow .22s var(--easing),border-color .22s}.project-card:not(.is-upcoming):hover{transform:translateY(-5px);box-shadow:0 16px 39px rgba(25,40,55,.11);border-color:#d2dbe0}.card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.project-symbol{display:grid;place-items:center;width:45px;height:45px;border-radius:13px;font-size:19px;font-weight:830;font-family:Georgia,serif}.hue-rose{background:#fbe6e8;color:#b45b70}.hue-amber{background:#fff1d9;color:#b08339}.hue-sky{background:#e6f2fb;color:#598aaf}.hue-teal{background:#e0f4ec;color:#3d8a72}.hue-indigo{background:#ebebfa;color:#666bad}.hue-lime{background:#e9f3e0;color:#6d9550}.hue-gray{background:#edf0f2;color:#80909a}.card-type{text-transform:uppercase;font-size:9px;letter-spacing:.11em;font-weight:800;color:#84909a}.project-card h3{font-size:21px;letter-spacing:-.5px;line-height:1.2;margin:22px 0 10px}.project-desc{margin:0;color:#74818b;font-size:13px;line-height:1.7}.card-link{display:block;margin-top:auto;padding-top:26px;font-size:11px;color:#a0744b;font-weight:800;letter-spacing:.045em;text-transform:uppercase}.project-card.is-upcoming{background:#f1f3f4;border-style:dashed;color:#7a858e}.is-upcoming .card-link{color:#9ca6ae}.search-result,.search-error{background:#fff;border:1px solid #e4e9ea;border-radius:12px;padding:16px 20px;margin-bottom:22px;color:#586b78;font-size:13px}.search-error{color:#9b4539;border-color:#f1cdc4;background:#fff2ef}
.about{background:#202f3d;color:#fff;padding:73px max(36px,calc((100vw - 1080px)/2));display:flex;align-items:center;gap:55px}.about-mark{border:2px solid rgba(255,255,255,.16);border-radius:35px;display:grid;place-items:center;font-family:Georgia,serif;font-size:66px;width:160px;height:160px;flex:none;color:#e7b88b}.about .section-kicker{color:#e4b789}.about h2{margin:11px 0 17px;font-size:39px}.about p{color:#c5cfd5;line-height:1.85;max-width:630px;font-size:14px;margin:0}.site-footer{min-height:98px;background:#172430;color:#a9bac6;display:flex;justify-content:space-between;align-items:center;padding:25px max(36px,calc((100vw - 1280px)/2));gap:25px;font-size:12px}.site-footer a{color:#f0c8a8}
/* CHAT : fenêtre indépendante de la façade */
body.chat-open:not(.ignore){/* Desktop: conserver la façade visible derrière le chat. */}.chat-app{position:fixed;inset:0;z-index:100;pointer-events:none}.chat-shell{pointer-events:auto;position:absolute;bottom:22px;right:24px;width:min(440px,calc(100vw - 32px));height:min(655px,calc(100dvh - 45px));display:flex;flex-direction:column;background:#fff;border:1px solid #e2e8eb;border-radius:20px;box-shadow:0 24px 90px rgba(6,16,29,.29);overflow:hidden;animation:popin .21s var(--easing)}@keyframes popin{from{opacity:.5;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.chat-header{background:#263b4b;color:#fff;display:flex;align-items:center;gap:10px;padding:12px 15px;min-height:70px;flex:none}.chat-avatar{display:grid;place-items:center;color:#f5cda8;background:#3d5365;width:37px;height:37px;flex:none;border-radius:12px;font-size:21px}.chat-heading{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.chat-heading strong{font-size:14px;font-weight:770}.chat-heading small{font-size:10px;color:#d1dbe1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-close-button{background:rgba(255,255,255,.14);color:white;border:0;width:33px;height:33px;border-radius:8px;flex:none;font-size:25px;line-height:1}.chat-close-button:hover{background:rgba(255,255,255,.27)}.push-button{flex:none;background:rgba(255,255,255,.12);color:white;border:1px solid rgba(255,255,255,.18);border-radius:8px;padding:10px 8px;font-weight:700;font-size:10px}.chat-notice{font-size:10px;line-height:1.5;padding:10px 16px;color:#788691;border-bottom:1px solid #edf0f2;text-align:center;background:#f9fafb;flex:none}#push-help{display:block;color:#556879;margin-top:5px}.chat-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:15px 17px 20px;background:linear-gradient(#fff,#fcfdfd)}.messages{display:flex;flex-direction:column;gap:12px;min-height:100%}.empty-chat{text-align:center;margin:auto;padding:35px 15px;color:#98a5af;line-height:1.7;font-size:12px}.empty-symbol{font-size:35px;color:#8da7bb}.message{max-width:85%;display:flex;flex-direction:column;gap:5px;align-items:flex-start}.message.mine{align-self:flex-end;align-items:flex-end}.message.theirs{align-self:flex-start}.bubble{background:#f0f3f6;color:#2c3d4a;border-radius:16px 16px 16px 4px;padding:11px 14px;font-size:13px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}.message.mine .bubble{background:#355b75;color:#fff;border-radius:16px 16px 4px 16px}.message-meta{font-size:9px;color:#99a7b0;padding:0 4px}.image-link{display:block;max-width:100%;line-height:0}.message-image{display:block;max-width:100%;max-height:260px;object-fit:contain;box-shadow:0 5px 15px rgba(20,29,56,.1);border-radius:14px;cursor:zoom-in}.image-expired{background:#f0f3f5;color:#748490;padding:14px;border-radius:10px;font-size:12px;border:1px dashed #cbd4da}.older-button{display:block;margin:0 auto 13px;padding:9px 13px;border-radius:20px;border:0;background:#f0f4f6;color:#476378;font-size:11px;font-weight:750}.chat-alert{padding:10px 13px;margin:8px 15px 0;border-radius:10px;border:1px solid #f3d5cf;background:#fff3f1;color:#aa5545;font-size:11px;flex:none}.chat-alert.success{border-color:#c6ebda;background:#f1faf5;color:#427c65}.composer{background:#fff;border-top:1px solid #edf0f1;display:flex;align-items:flex-end;gap:9px;padding:12px 13px 7px;flex:none}.photo-picker{display:grid;place-items:center;cursor:pointer;flex:none;width:41px;height:41px;border-radius:12px;background:#f0f5f7;color:#48718c;font-size:27px;line-height:1}.composer textarea{background:#f8fafb;border:1px solid #e1e9ed;outline:none;border-radius:12px;flex:1;min-width:0;min-height:41px;max-height:130px;padding:10px 13px;resize:none;font-size:13px;line-height:1.4}.composer textarea:focus{border-color:#a3bdcf}.composer button[type=submit]{display:grid;place-items:center;border:0;border-radius:11px;background:#335b76;color:white;font-size:18px;flex:none;width:41px;height:41px;padding:0}.chat-bottom{background:#fff;display:flex;justify-content:space-between;align-items:center;gap:6px;padding:0 13px 10px;color:#a0aab2;font-size:10px;flex:none}.logout-button{border:0;background:none;color:#778792;font-size:10px;white-space:nowrap;text-decoration:underline;text-underline-offset:2px}.logout-button:hover{color:#344d60}
@media(max-width:900px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-header{padding:0 27px}.site-footer{padding:25px 28px}.about{padding:60px 35px}}
@media(max-width:650px){.site-header{height:74px;padding:0 20px}.brand img{width:112px;height:50px}.site-header nav{gap:12px;font-size:10px}.site-header nav a:nth-child(2){display:none}.hero{min-height:550px;height:auto}.hero-media video{display:none}.hero-content{width:calc(100% - 32px);padding:145px 0 105px}.hero h1{font-size:clamp(45px,12vw,64px);line-height:1.13;letter-spacing:-1.7px;margin:23px 0}.hero-content>p:not(.search-hint){font-size:13px;line-height:1.8;margin-bottom:29px}.eyebrow{font-size:9px}#search-form{gap:7px;padding:6px 6px 6px 11px}#search-form input{font-size:12px;padding:12px 0}#search-form button[type=submit]{padding:13px 11px;font-size:11px}.search-icon{font-size:19px}.search-hint{font-size:11px}.scroll-cue{bottom:28px}.projects{width:calc(100% - 34px);padding:65px 0 73px}.projects-heading{align-items:start;flex-direction:column;gap:19px;margin-bottom:24px}.projects-heading h2{font-size:37px}.projects-heading p{font-size:13px}.projects-counter{padding:8px 14px}.project-grid{grid-template-columns:1fr;gap:14px}.project-card{min-height:228px;padding:22px}.project-card h3{margin-top:16px}.card-link{padding-top:19px}.about{padding:59px 21px;gap:22px}.about-mark{width:75px;height:75px;font-size:32px;border-radius:17px}.about h2{font-size:30px;line-height:1.12}.about p{font-size:12px}.site-footer{padding:22px 19px;font-size:10px}
 /* Sur téléphone, fenêtre intégralement plein écran avec une croix facilement accessible. */
 body.chat-open{overflow:hidden}.chat-app{pointer-events:auto;background:#fff}.chat-shell{inset:0;bottom:0;right:0;width:100%;height:100dvh;height:100svh;max-height:none;border:0;border-radius:0;box-shadow:none;animation:none}.chat-header{padding:12px max(13px,env(safe-area-inset-right)) 12px max(13px,env(safe-area-inset-left));min-height:67px}.chat-heading strong{font-size:13px}.chat-heading small{font-size:10px}.chat-close-button{height:40px;width:40px;font-size:31px;border-radius:10px}.chat-scroll{padding:15px 14px}.composer{padding:12px 12px 6px}.chat-bottom{padding-bottom:max(10px,env(safe-area-inset-bottom))}.chat-notice{padding:8px 12px;font-size:10px}
}
@media(max-width:355px){.chat-avatar{display:none}.push-button{font-size:9px;padding:9px 6px}.chat-heading strong{font-size:12px}.site-header nav a:first-child{display:none}.about-mark{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}.hero-media video{display:none}}

.footer-links{display:flex;flex-wrap:wrap;align-items:center;gap:15px;font-size:11px}.footer-links a{opacity:.72}.footer-links a:hover{opacity:1}
@media(max-width:650px){.footer-links{justify-content:center;gap:9px 16px}.site-footer{flex-wrap:wrap;justify-content:center;text-align:center}}

/* V5 : sélecteurs d'émojis et GIF dans la fenêtre du chat */
.media-launch{flex:none;display:grid;place-items:center;border:0;border-radius:10px;background:#f0f5f7;color:#415e76;width:37px;height:41px;padding:0;font-size:22px;touch-action:manipulation}
.media-launch:hover,.media-launch[aria-expanded="true"]{background:#e2ebf2;color:#21435d}
.gif-launch{font-weight:850;font-size:11px;letter-spacing:-.03em}
.media-picker{position:absolute;z-index:4;left:12px;right:12px;bottom:98px;height:325px;max-height:calc(100% - 160px);min-height:0;background:#fff;border:1px solid #dbe4ea;border-radius:17px;box-shadow:0 14px 50px rgba(13,29,45,.2);display:flex;flex-direction:column;overflow:hidden}
.media-picker-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eef1f3;padding:8px 12px;gap:10px;flex:none}
.media-tabs{display:flex;gap:6px}.media-tab{border:0;background:transparent;border-radius:9px;padding:9px 12px;color:#687e8c;font-size:12px;font-weight:730}.media-tab.is-active{background:#eaf1f6;color:#284f6b}
.media-picker-close{border:0;border-radius:7px;width:33px;height:33px;background:#f0f3f5;font-size:23px;color:#4b6375;line-height:1}
.media-panel{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.emoji-panel{padding:12px}
.emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}.emoji-grid button{display:grid;place-items:center;padding:3px 0;background:transparent;border:0;border-radius:9px;min-height:38px;font-size:24px}.emoji-grid button:hover,.emoji-grid button:focus-visible{background:#edf2f5;outline:2px solid transparent}
.gif-panel{display:flex;flex-direction:column;gap:8px;padding:10px}.gif-panel[hidden]{display:none!important}
#gif-search{flex:none;width:100%;border:1px solid #dfe7eb;border-radius:10px;padding:10px 12px;font-size:16px;color:#233746;outline:none}#gif-search:focus{border-color:#a2becf}
.gif-feedback{flex:none;font-size:11px;color:#657889;min-height:17px}
.gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;overflow-y:auto;min-height:0;flex:1;align-content:start}
.gif-result{display:block;border:0;background:#eef2f4;padding:0;min-height:82px;max-height:125px;overflow:hidden;border-radius:9px;aspect-ratio:1.25;position:relative}.gif-result img{width:100%;height:100%;object-fit:cover;display:block}.gif-result:hover{outline:2px solid #547d98}
.giphy-attribution{display:flex;align-items:center;justify-content:center;gap:5px;font-size:10px;color:#606c77;flex:none;min-height:17px}.giphy-attribution strong{font-weight:900;letter-spacing:.08em;color:#17232d}.giphy-bars{display:flex;height:11px;width:13px;align-items:stretch;gap:1px;transform:skewY(-5deg)}.giphy-bars i{display:block;width:3px;background:#00ff99}.giphy-bars i:nth-child(2){background:#00ccff}.giphy-bars i:nth-child(3){background:#9933ff}.giphy-bars i:nth-child(4){background:#ff5b3a}
.gif-frame{display:grid;place-items:center;min-width:150px;min-height:95px;max-width:min(100%,290px);border-radius:13px;overflow:hidden;background:#eef2f5;color:#738393;font-size:11px}.gif-frame img{display:block;max-width:100%;width:100%;max-height:260px;object-fit:contain}.gif-credit{font-size:10px;color:#7b8d9c;margin:1px 3px 0}.gif-credit a{text-decoration:underline}
@media(max-width:650px){
  /* Sur iOS la police <16 px provoque un zoom automatique au focus. */
  #search-form input,.composer textarea,#gif-search{font-size:16px!important}
  #search-form button[type=submit]{min-height:44px}
  .chat-app{position:fixed;inset:auto!important;top:var(--chat-visual-top,0px)!important;left:var(--chat-visual-left,0px)!important;width:var(--chat-visual-width,100%)!important;height:var(--chat-visual-height,100dvh)!important;max-height:none!important;overflow:hidden;touch-action:pan-y;}
  .chat-shell{position:absolute!important;inset:0!important;width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;border:0;border-radius:0;display:flex;flex-direction:column;overflow:hidden}
  .chat-header,.chat-notice,.chat-bottom,.composer{flex-shrink:0}
  .chat-header{padding-top:max(9px,env(safe-area-inset-top));gap:7px}
  .chat-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .composer{gap:5px;padding:8px 9px 5px;min-width:0;align-items:flex-end}
  .composer textarea{padding:10px 8px;min-height:42px;max-height:120px}
  .photo-picker,.media-launch,.composer button[type=submit]{width:37px;height:42px;min-width:0}
  .chat-bottom{padding-bottom:max(5px,env(safe-area-inset-bottom))}
  .media-picker{left:6px;right:6px;bottom:95px;height:min(350px,calc(100% - 155px));max-height:calc(100% - 155px)}
  .emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr))}
}
@media(max-width:360px){.composer{gap:3px;padding-inline:6px}.photo-picker,.media-launch,.composer button[type=submit]{width:34px}.chat-avatar{display:none}}
@media(max-height:440px){.media-picker{max-height:calc(100% - 125px);bottom:75px}.chat-header{min-height:52px;padding-block:6px}}

/* Diagnostic OneSignal à l'intérieur de la Web App (v5.2.7). */
.push-debug-button{display:block;margin:6px auto 0;border:1px solid #adc0c9;background:#eef4f7;color:#355a70;border-radius:8px;padding:6px 10px;font-size:11px;font-weight:700;cursor:pointer}
.push-debug-button[hidden],.push-debug-report[hidden]{display:none!important}
.push-debug-report{text-align:left;margin:8px 0 0;padding:8px;border-radius:8px;background:#eaf0f3;color:#324c5d;white-space:pre-wrap;overflow-wrap:anywhere;overflow-y:auto;max-height:30dvh;font:10px/1.6 ui-monospace,SFMono-Regular,monospace}

/* V5.2.9 : supprimer les bandeaux d’information sans masquer les alertes utiles. */
.chat-notice:not(:has(#push-help:not([hidden]), #push-debug-button:not([hidden]), #push-debug-report:not([hidden]))){display:none}
.chat-bottom{justify-content:flex-end}

/* V5.2.14 — Portrait original intégré dans l'entête, sans retouche.
   La forme circulaire est obtenue exclusivement par CSS. */
.site-header .header-actions{display:flex;align-items:center;gap:24px;min-width:0}
.site-header .header-portrait{display:block;position:relative;flex:0 0 56px;width:56px;height:56px;overflow:hidden;border-radius:50%;border:2px solid #f2c69f;background:#324452;box-shadow:0 4px 16px rgba(0,0,0,.26),0 0 0 3px rgba(255,255,255,.13);transition:transform .2s ease,box-shadow .2s ease}
.site-header .header-portrait img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.site-header .header-portrait:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.34),0 0 0 3px rgba(255,255,255,.18)}
.site-header .header-portrait:focus-visible{outline:3px solid #fff;outline-offset:5px}
@media(max-width:900px){.site-header .header-actions{gap:17px}.site-header .header-portrait{flex-basis:49px;width:49px;height:49px}}
@media(max-width:650px){.site-header .header-actions{gap:12px}.site-header .header-portrait{flex-basis:40px;width:40px;height:40px;border-width:2px;box-shadow:0 3px 10px rgba(0,0,0,.25)}.site-header nav{gap:12px}}
@media(max-width:355px){.site-header .header-actions{gap:8px}.site-header .header-portrait{flex-basis:38px;width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){.site-header .header-portrait{transition:none}}


/* V5.2.19 — Sur smartphone, un toucher sur la photo du header l'agrandit sur place.
   Pas de popup, pas de navigation automatique : simple zoom local et lisible. */
@media (max-width:650px) {
  .site-header .header-portrait {
    transform-origin: right center;
    touch-action: manipulation;
    will-change: transform;
  }
  .site-header .header-portrait.is-expanded-mobile,
  .site-header .header-portrait.is-expanded-mobile:hover {
    transform: scale(2.4);
    z-index: 14;
    box-shadow: 0 10px 30px rgba(0,0,0,.38), 0 0 0 4px rgba(255,255,255,.18);
  }
  body.header-portrait-expanded .site-header nav {
    opacity: .38;
    transition: opacity .18s ease;
  }
}
@media (max-width:355px) {
  .site-header .header-portrait.is-expanded-mobile,
  .site-header .header-portrait.is-expanded-mobile:hover {
    transform: scale(2.2);
  }
}
@media (prefers-reduced-motion:reduce) {
  .site-header .header-portrait,
  body.header-portrait-expanded .site-header nav {
    transition: none;
  }
}


/* V5.2.20 — Visionneuse des photos privees. L'overlay est dans #chat-app,
   donc l'utilisateur revient au tchat sans navigation ni deconnexion. */
.chat-photo-viewer {
  position:absolute;
  inset:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:76px 18px 28px;
  background:rgba(6,13,21,.94);
  pointer-events:auto;
  isolation:isolate;
  -webkit-tap-highlight-color:transparent;
}
.chat-photo-viewer-image {
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  border-radius:7px;
  box-shadow:0 12px 35px rgba(0,0,0,.24);
}
.chat-photo-viewer-close {
  position:absolute;
  top:max(13px,env(safe-area-inset-top));
  right:max(13px,env(safe-area-inset-right));
  z-index:1;
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  padding:0;
  border:1px solid rgba(255,255,255,.46);
  border-radius:50%;
  background:rgba(255,255,255,.16);
  color:white;
  font-size:33px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
}
.chat-photo-viewer-close:hover,.chat-photo-viewer-close:focus-visible {
  background:rgba(255,255,255,.3);
  outline:2px solid white;
  outline-offset:2px;
}
@media(max-width:650px) {
  .chat-photo-viewer {
    padding:calc(70px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
  }
}


/* V5.2.22 — Presence du destinataire et confirmations de lecture. */
.chat-presence{display:flex;flex:1;min-width:0;align-items:center;gap:9px}
.peer-presence-dot{display:block;width:12px;height:12px;flex:0 0 12px;border-radius:50%;background:#9da9b4;border:2px solid rgba(255,255,255,.7);box-shadow:0 0 0 3px rgba(255,255,255,.11);transition:background-color .18s ease}
.peer-presence-dot.is-online{background:#35c879;box-shadow:0 0 0 3px rgba(53,200,121,.14)}
.chat-presence strong{font-size:14px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peer-presence-label{font-size:10px;color:#d5e0e8;white-space:nowrap;margin-left:auto}
.read-receipt{display:inline-block;margin-left:6px;font-size:13px;letter-spacing:-2px;font-weight:800;color:#a4b3bf;white-space:nowrap;vertical-align:-1px}
.read-receipt.is-read{color:#2eaa78}
@media(max-width:650px){.chat-presence{gap:7px}.chat-presence strong{font-size:13px}.peer-presence-label{font-size:10px}}
@media(prefers-reduced-motion:reduce){.peer-presence-dot{transition:none}}

/* TOCABENS V3 — options non intrusives dans les bulles */
.chat-reply-preview{display:flex;justify-content:space-between;align-items:center;background:#e9f0f4;color:#2b4858;padding:6px 12px;font-size:12px;border-radius:8px}
.chat-reply-preview[hidden]{display:none}.chat-reply-preview button{border:0;background:none;font-size:20px;cursor:pointer}
.v3-message-actions{display:flex;gap:2px;margin:3px 2px}.v3-message-actions button{background:transparent;border:0;cursor:pointer;font-size:13px;padding:3px;opacity:.75}
.v3-message-actions button:hover{opacity:1}.v3-reactions,.v3-replied{display:block;font-size:11px;opacity:.8;margin:3px 4px}

.search-suggestions{display:flex;flex-wrap:wrap;gap:8px;max-width:700px;margin:10px auto 0;justify-content:center}
.search-suggestions[hidden]{display:none}.search-suggestions button{border:1px solid rgba(255,255,255,.4);border-radius:16px;padding:6px 12px;background:rgba(20,30,40,.8);color:#fff;cursor:pointer;font-size:12px}

#gallery-button{border:0;border-radius:8px;padding:6px;background:rgba(255,255,255,.15);color:inherit;cursor:pointer}
.v3-gallery{overflow:auto;max-height:45vh;background:#fff;padding:12px;border-bottom:1px solid #d7e0e8}
.v3-gallery[hidden]{display:none}.v3-gallery-head{display:flex;justify-content:space-between;font-weight:650;font-size:13px;margin-bottom:8px}
.v3-gallery-head button{border:0;background:transparent;cursor:pointer;font-size:20px}
.v3-gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;font-size:12px}
.v3-gallery-item{border:0;padding:0;background:none;cursor:pointer;aspect-ratio:1}
.v3-gallery-item img{width:100%;height:100%;object-fit:cover;border-radius:7px}

/* Fonctions facultatives du chat administrées hors de www. */
.composer [hidden],.chat-modal [hidden]{display:none!important}

/* V4.2 : barre de saisie mobile, accès médias sans débordement horizontal. */
@media(max-width:560px){
 .composer{display:flex;flex-wrap:wrap;gap:5px 7px;padding:8px 10px 6px}
 .composer textarea{order:0;flex:1 1 calc(100% - 58px);min-width:0}
 .composer button[type=submit]{order:1;flex:none}
 .composer .photo-picker,.composer .media-launch{order:2;flex:1 0 30px;min-width:30px;max-width:none;width:auto;height:38px;font-size:19px}
 .composer [hidden]{display:none!important}
}

/* V4.2.1 — Correctif desktop : les inputs natifs ne doivent pas masquer les boutons de medias.
   Les labels restent cliquables et pilotent les inputs associes. */
.composer input[type="file"] { display: none !important; }

/* Deux rangées dans le chat flottant sur ordinateur :
   outils medias sur la premiere, texte + envoi sur la seconde. */
@media (min-width: 561px) {
  .composer {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) 42px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 6px;
    row-gap: 8px;
    padding: 11px 12px 8px;
    min-width: 0;
  }
  .composer > .photo-picker,
  .composer > .media-launch {
    grid-row: 1;
    width: 41px;
    max-width: 100%;
    height: 40px;
    justify-self: start;
  }
  .composer > label[for="photo-file"] { grid-column: 1; }
  .composer > label[for="audio-file"] { grid-column: 2; }
  .composer > label[for="video-file"] { grid-column: 3; }
  .composer > #emoji-picker-button { grid-column: 4; }
  .composer > #gif-picker-button { grid-column: 5; }
  .composer > #voice-button { grid-column: 6; }
  .composer > #message-input {
    grid-column: 1 / 7;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
  .composer > #send-button {
    grid-column: 7;
    grid-row: 2;
    justify-self: end;
  }
}

/* V4.2.2 : actions des messages en menu discret, au survol PC / clic tactile. */
.message { position:relative; }
.v3-message-actions {
  display:none;
  align-items:center;
  gap:3px;
  padding:4px 5px;
  margin:3px 0 0;
  width:max-content;
  max-width:100%;
  border-radius:13px;
  border:1px solid #e0e8ed;
  background:#fff;
  box-shadow:0 5px 20px rgba(27,50,65,.10);
}
.message.actions-open > .v3-message-actions {display:flex;}
.v3-message-actions .v3-action-button {
  display:grid;
  place-items:center;
  flex:none;
  width:32px;
  height:32px;
  padding:5px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#637789;
  opacity:1;
  cursor:pointer;
  transition:background .13s ease,color .13s ease;
}
.v3-message-actions .v3-action-button:hover,
.v3-message-actions .v3-action-button:focus-visible {background:#eaf2f6;color:#214a63;outline:none;}
.v3-message-actions .v3-action-button.is-destructive:hover,
.v3-message-actions .v3-action-button.is-destructive:focus-visible {background:#fff0ee;color:#bd3d39;}
.v3-message-more {display:none;border:0;border-radius:8px;background:transparent;color:#7c8992;cursor:pointer;padding:2px 5px;line-height:1;}
@media (hover:none), (pointer:coarse) {
  .message:not(.message-deleted) > .v3-message-more {display:grid;place-items:center;align-self:flex-end;margin-top:0;}
  .message.theirs > .v3-message-more {align-self:flex-start;}
  .v3-message-actions .v3-action-button {width:38px;height:38px;}
}
.v3-message-more:focus-visible {outline:2px solid #3c708f;outline-offset:2px;}
@media(prefers-reduced-motion:reduce){.v3-message-actions .v3-action-button{transition:none;}}

/* V4.2.3 — réactions en coin de bulle, citations lisibles. */
.message {position:relative;}
.message > .v3-reactions {
  position:absolute;top:-8px;right:5px;left:auto;z-index:2;
  margin:0;padding:3px 7px;min-height:22px;
  display:inline-flex;align-items:center;gap:2px;
  border-radius:999px;background:#fff;border:1px solid #e2eaf0;
  color:#34485b;font-size:12px;line-height:1.1;opacity:1;
  box-shadow:0 3px 10px rgba(20,38,52,.1);pointer-events:none;
}
.message.theirs > .v3-reactions {left:5px;right:auto;}
.message > .v3-replied {
  display:flex;flex-direction:column;gap:3px;
  width:100%;max-width:100%;box-sizing:border-box;
  padding:8px 11px;margin:0 0 4px;border-radius:9px;
  border-left:3px solid #8ab1c5;background:#eaf2f6;
  color:#3a5565;font-size:11px;line-height:1.35;opacity:1;
  overflow-wrap:anywhere;
}
.message > .v3-replied strong {font-size:10px;font-weight:750;}
.message > .v3-replied span {display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;}
.message.mine > .v3-replied {background:#e7eef3;border-left-color:#557e97;}
.chat-reply-preview #reply-label {display:block;min-width:0;overflow-wrap:anywhere;white-space:normal;line-height:1.45;max-height:5em;overflow:hidden;}
/* Le menu reste invisible tant que le JS n'a pas validé le délai de survol. */
.message:not(.actions-open) > .v3-message-actions {display:none !important;}
